diff options
author | Vincent Richard <[email protected]> | 2006-01-29 17:21:56 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2006-01-29 17:21:56 +0000 |
commit | ce5e7f9c52efb77bc0034dfeefa8f5f245e08117 (patch) | |
tree | 3e827eb3de5c216c38ee78c9cb0af5339da37749 /src/net/tls/TLSSocket.cpp | |
parent | Link with Winsock under Windows. (diff) | |
download | vmime-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.cpp | 3 |
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]; |