summaryrefslogtreecommitdiff
path: root/src/tls_remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls_remote.c')
-rw-r--r--src/tls_remote.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tls_remote.c b/src/tls_remote.c
index fd72033..dde4dff 100644
--- a/src/tls_remote.c
+++ b/src/tls_remote.c
@@ -56,7 +56,6 @@ int tls_conn(SSL *ssl, int smtpfd)
int tls_checkpeer(SSL *ssl, X509 *cert, const stralloc host, const int flag, const int verify)
{
- STACK_OF(GENERAL_NAME) * extensions;
const GENERAL_NAME *ext;
char buf[SSL_NAME_LEN];
char *dnsname = 0;
@@ -74,7 +73,7 @@ int tls_checkpeer(SSL *ssl, X509 *cert, const stralloc host, const int flag, con
/* X.509 CA DN/SAN name validation against DNS */
if (host.len && fflag > 4) {
- extensions = (GENERAL_NAME *)X509_get_ext_d2i(cert, NID_subject_alt_name, 0, 0);
+ GENERAL_NAMES *extensions = X509_get_ext_d2i(cert, NID_subject_alt_name, 0, 0);
num = sk_GENERAL_NAME_num(extensions); /* num = 0, if no SAN extensions */
for (i = 0; i < num; ++i) {