mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-26 04:18:29 +02:00
Small update to make sure SSL check can be turned off
This commit is contained in:
parent
76e754212c
commit
919e027d29
1 changed files with 11 additions and 9 deletions
|
@ -267,18 +267,20 @@ $server->on('Receive', function(\Swoole\Server $serv, int $fd, int $reactorId, s
|
||||||
$xmlString = $xml->asXML();
|
$xmlString = $xml->asXML();
|
||||||
$trans = createTransaction($pdo, $clid, $clTRID, $xmlString);
|
$trans = createTransaction($pdo, $clid, $clTRID, $xmlString);
|
||||||
|
|
||||||
$fingerprint = getClientFingerprint($serv, $fd);
|
if (!empty($c['mandatory_client_ssl'])) {
|
||||||
|
$fingerprint = getClientFingerprint($serv, $fd);
|
||||||
|
|
||||||
if (!$fingerprint) {
|
if (!$fingerprint) {
|
||||||
sendEppError($conn, $pdo, 2201, 'Client certificate authentication failed: no certificate provided', $clTRID);
|
sendEppError($conn, $pdo, 2201, 'Client certificate authentication failed: no certificate provided', $clTRID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$storedFingerprint = getFingerprint($pdo, $clid);
|
$storedFingerprint = getFingerprint($pdo, $clid);
|
||||||
|
|
||||||
if (!$storedFingerprint || strcasecmp($fingerprint, $storedFingerprint) !== 0) {
|
if (!$storedFingerprint || strcasecmp($fingerprint, $storedFingerprint) !== 0) {
|
||||||
sendEppError($conn, $pdo, 2201, 'Client certificate authentication failed: incorrect certificate', $clTRID);
|
sendEppError($conn, $pdo, 2201, 'Client certificate authentication failed: incorrect certificate', $clTRID);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkLogin($pdo, $clID, $pw)) {
|
if (checkLogin($pdo, $clID, $pw)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue