diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2009-08-05 23:18:44 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2009-08-05 23:18:44 +0000 |
commit | d30613227dac670592caf71e43ec737d5d2c8b4e (patch) | |
tree | 7c9b2b94f258894a7729f3c27f721216b829ceb4 /socket.c | |
parent | 9d1fb0f612794c8287ed5a8f0a53e71fcb3ae5fa (diff) | |
download | fetchmail-d30613227dac670592caf71e43ec737d5d2c8b4e.tar.gz fetchmail-d30613227dac670592caf71e43ec737d5d2c8b4e.tar.bz2 fetchmail-d30613227dac670592caf71e43ec737d5d2c8b4e.zip |
Report Subject Alternative Name before checking for NULs.
svn path=/branches/BRANCH_6-3/; revision=5396
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -660,6 +660,10 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict ) if (gn->type == GEN_DNS) { char *p1 = (char *)gn->d.ia5->data; char *p2 = _ssl_server_cname; + if (outlevel >= O_VERBOSE) { + report(stdout, GT_("Subject Alternative Name: %s\n"), (tt = sdump(p1, (size_t)gn->d.ia5->length))); + xfree(tt); + } /* Name contains embedded NUL characters, so we complain. This * is likely a certificate spoofing attack. */ if ((size_t)gn->d.ia5->length != strlen(p1)) { @@ -667,10 +671,6 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict ) sk_GENERAL_NAME_free(gens); return 0; } - if (outlevel >= O_VERBOSE) { - report(stdout, GT_("Subject Alternative Name: %s\n"), (tt = sdump(p1, (size_t)gn->d.ia5->length))); - xfree(tt); - } if (*p1 == '*') { ++p1; n = strlen(p2) - strlen(p1); |