Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1243)
#endif
SSL_SESSION_print(bio, SSL_get_session(s));
- if (keymatexportlabel != NULL) {
+ if ((SSL_get_session(s) != NULL) &&
+ (keymatexportlabel != NULL)) {
BIO_printf(bio, "Keying material exporter:\n");
BIO_printf(bio, " Label: '%s'\n", keymatexportlabel);
BIO_printf(bio, " Length: %i bytes\n", keymatexportlen);