aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-02-09 16:06:33 (GMT)
committerJouni Malinen <j@w1.fi>2019-02-09 23:43:50 (GMT)
commitf3cca8b1eab758bffbd90f179389a9702082c6a5 (patch)
tree922941c00b87a29bce4b339924fc7389b05e5ac0 /src/tls
parent19dd7a736ed9928505f1b9886e002210d0adf44b (diff)
downloadhostap-f3cca8b1eab758bffbd90f179389a9702082c6a5.zip
hostap-f3cca8b1eab758bffbd90f179389a9702082c6a5.tar.gz
hostap-f3cca8b1eab758bffbd90f179389a9702082c6a5.tar.bz2
TLS server: Check credentials have been configured before using them
Allow ServerHello to be built without local credential configuration. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/tls')
-rw-r--r--src/tls/tlsv1_server_write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tls/tlsv1_server_write.c b/src/tls/tlsv1_server_write.c
index bdc6c11..892b745 100644
--- a/src/tls/tlsv1_server_write.c
+++ b/src/tls/tlsv1_server_write.c
@@ -26,7 +26,7 @@ static size_t tls_server_cert_chain_der_len(struct tlsv1_server *conn)
size_t len = 0;
struct x509_certificate *cert;
- cert = conn->cred->cert;
+ cert = conn->cred ? conn->cred->cert : NULL;
while (cert) {
len += 3 + cert->cert_len;
if (x509_certificate_self_signed(cert))