Skip to content

Commit

Permalink
ec: print out return code for EVP_PKEY_CTX_set_ec_param_enc
Browse files Browse the repository at this point in the history
  • Loading branch information
danbev committed Jul 3, 2020
1 parent e4d7ff1 commit 446f641
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ int main(int arc, char *argv[]) {
// or OPENSSL_EC_NAMED_CURVE. The default for OpenSSL 3.x is named curve
int ret = EVP_PKEY_CTX_set_ec_param_enc(ctx, OPENSSL_EC_NAMED_CURVE);
if (ret <= 0) {
error_and_exit("EVP_PKEY_CTX_set_ec_param_enc is returning 0. Why?");
printf("EVP_PKEY_CTX_set_ec_param_enc retuned: %d\n", ret);
error_and_exit("EVP_PKEY_CTX_set_ec_param_enc failed");
}

EVP_PKEY* params = NULL;
Expand Down

0 comments on commit 446f641

Please sign in to comment.