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>
master
Jouni Malinen 5 years ago
parent 19dd7a736e
commit f3cca8b1ea

@ -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))

Loading…
Cancel
Save