From: Et7f3 Date: Sat, 6 Apr 2024 19:09:30 +0000 (+0200) Subject: ossl_store.pod: Correct the example of OSSL_STORE API usage X-Git-Tag: openssl-3.4.0-alpha1~477 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5412c94a399d3923b2dec2431ead60288d857c8;p=thirdparty%2Fopenssl.git ossl_store.pod: Correct the example of OSSL_STORE API usage Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/24056) --- diff --git a/doc/man7/ossl_store.pod b/doc/man7/ossl_store.pod index a2c6260061f..d613d803642 100644 --- a/doc/man7/ossl_store.pod +++ b/doc/man7/ossl_store.pod @@ -44,7 +44,11 @@ other encoding is undefined. =head2 A generic call - OSSL_STORE_CTX *ctx = OSSL_STORE_open("file:/foo/bar/data.pem"); + #include /* for UI_get_default_method */ + #include + + OSSL_STORE_CTX *ctx = OSSL_STORE_open("file:/foo/bar/data.pem", + UI_get_default_method(), NULL, NULL, NULL); /* * OSSL_STORE_eof() simulates file semantics for any repository to signal @@ -65,6 +69,7 @@ other encoding is undefined. PEM_write_X509(stdout, OSSL_STORE_INFO_get0_CERT(info)); break; } + OSSL_STORE_INFO_free(info); } OSSL_STORE_close(ctx);