Skip to content

Commit 43585f7

Browse files
Code review feedback: Add documentation, minor test improvements
1 parent 24ed80f commit 43585f7

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎doc/dox_comments/header_files/ssl.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7245,6 +7245,11 @@ int wolfSSL_want(WOLFSSL* ssl);
72457245
the list of checks to perform. dn holds the domain name to check
72467246
against the peer certificate when it’s received.
72477247

7248+
dn must be a fully qualified domain name or "localhost", otherwise
7249+
SSL_FAILURE is returned. To also accept single-label names such as
7250+
"intranet", as issued by some private PKIs, build wolfSSL with
7251+
WOLFSSL_ALLOW_SINGLE_LABEL_HOSTNAME defined.
7252+
72487253
\return SSL_SUCCESS upon success.
72497254
\return SSL_FAILURE will be returned if a memory error was encountered.
72507255

‎tests/api/test_ossl_x509.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1778,7 +1778,7 @@ int test_wolfssl_local_IsValidFQDN(void) {
17781778
{"com", SINGLE_LABEL_OK}, /* single label */
17791779
{"123.456", 0}, /* all-numeric final label (no alpha) */
17801780
{"example.123", 0}, /* all-numeric TLD (no alpha) */
1781-
{"a", SINGLE_LABEL_OK}, /* single label, too short */
1781+
{"a", SINGLE_LABEL_OK}, /* single label, one character */
17821782
{"example.123a", 1}, /* TLD with at least one letter -- valid */
17831783
};
17841784

‎tests/api/test_tls.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,8 @@ static int test_single_label_host(const char* name, int expectRet,
717717
WOLFSSL_SUCCESS);
718718
ExpectIntEQ(wolfSSL_use_certificate_file(ssl_s, cert,
719719
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
720+
ExpectIntEQ(wolfSSL_use_PrivateKey_file(ssl_s, svrKeyFile,
721+
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
720722
wolfSSL_set_verify(ssl_c, WOLFSSL_VERIFY_PEER, NULL);
721723

722724
ExpectIntEQ(wolfSSL_check_domain_name(ssl_c, name), expectRet);

0 commit comments

Comments
 (0)