summaryrefslogtreecommitdiffstats
path: root/apps/s_client.c
diff options
context:
space:
mode:
authorPeiwei Hu <jlu.hpw@foxmail.com>2021-11-15 00:27:31 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-22 14:43:44 +0100
commit40649e36c4c0c9438f62e1bf2ccb983f6854c662 (patch)
tree7b9fb64944a1ca50343e179a17399d033ca9b7ad /apps/s_client.c
parenta9ed63f1d1d8993a8b30fc978ce09674f97f061d (diff)
SSL_export_keying_material: fix return check
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17028)
Diffstat (limited to 'apps/s_client.c')
-rw-r--r--apps/s_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index d40f7c948f..e0748496de 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -3295,11 +3295,11 @@ static void print_stuff(BIO *bio, SSL *s, int full)
BIO_printf(bio, " Label: '%s'\n", keymatexportlabel);
BIO_printf(bio, " Length: %i bytes\n", keymatexportlen);
exportedkeymat = app_malloc(keymatexportlen, "export key");
- if (!SSL_export_keying_material(s, exportedkeymat,
+ if (SSL_export_keying_material(s, exportedkeymat,
keymatexportlen,
keymatexportlabel,
strlen(keymatexportlabel),
- NULL, 0, 0)) {
+ NULL, 0, 0) <= 0) {
BIO_printf(bio, " Error\n");
} else {
BIO_printf(bio, " Keying material: ");