examples/openssl: print out contents of EVP_PKEY
@@ -21,6 +21,10 @@ int LLVMFuzzerTestOneInput(const uint8_t* buf, size_t len) {
EVP_PKEY* key = d2i_AutoPrivateKey(NULL, &buf, len);
if (key == NULL) {
fprintf(stderr, "%s", ERR_error_string(ERR_get_error(), NULL));
+ } else {
+ BIO* out = BIO_new_fp(stdout, BIO_NOCLOSE);
+ EVP_PKEY_print_private(out, key, 4, NULL);
+ BIO_free(out);
}
EVP_PKEY_free(key);
return 0;
