aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/tls/TLSSocket.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2006-01-29 17:21:56 +0000
committerVincent Richard <[email protected]>2006-01-29 17:21:56 +0000
commitce5e7f9c52efb77bc0034dfeefa8f5f245e08117 (patch)
tree3e827eb3de5c216c38ee78c9cb0af5339da37749 /src/net/tls/TLSSocket.cpp
parentLink with Winsock under Windows. (diff)
downloadvmime-ce5e7f9c52efb77bc0034dfeefa8f5f245e08117.tar.gz
vmime-ce5e7f9c52efb77bc0034dfeefa8f5f245e08117.zip
Fixed segfault when cert data is NULL.
Diffstat (limited to 'src/net/tls/TLSSocket.cpp')
-rw-r--r--src/net/tls/TLSSocket.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net/tls/TLSSocket.cpp b/src/net/tls/TLSSocket.cpp
index 93066b98..18bb7b9c 100644
--- a/src/net/tls/TLSSocket.cpp
+++ b/src/net/tls/TLSSocket.cpp
@@ -286,6 +286,9 @@ ref <security::cert::certificateChain> TLSSocket::getPeerCertificates()
const gnutls_datum* rawData = gnutls_certificate_get_peers
(*m_session->m_gnutlsSession, &certCount);
+ if (rawData == NULL)
+ return NULL;
+
// Try X.509
gnutls_x509_crt* x509Certs = new gnutls_x509_crt[certCount];