Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58e70cf

Browse files
committed
Follow the RFCs more closely in libpq server certificate hostname check.
The RFCs say that the CN must not be checked if a subjectAltName extensionof type dNSName is present. IOW, if subjectAltName extension is present,but there are no dNSNames, we can still check the CN.Alexey Klyukin
1 parent2df465e commit58e70cf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/interfaces/libpq/fe-secure-openssl.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,12 +626,13 @@ verify_peer_name_matches_certificate(PGconn *conn)
626626
sk_GENERAL_NAME_free(peer_san);
627627
}
628628
/*
629-
* If there is no subjectAltName extension, check the Common Name.
629+
* If there is no subjectAltName extension of type dNSName, check the
630+
* Common Name.
630631
*
631-
* (Per RFC 2818 and RFC 6125, if the subjectAltName extensionis present,
632-
* the CN must be ignored.)
632+
* (Per RFC 2818 and RFC 6125, if the subjectAltName extensionof type
633+
*dNSName is present,the CN must be ignored.)
633634
*/
634-
else
635+
if (names_examined==0)
635636
{
636637
X509_NAME*subject_name;
637638

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp