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>
This commit is contained in:
parent
19dd7a736e
commit
f3cca8b1ea
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue