ossl_store.pod: Correct the example of OSSL_STORE API usage

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24056)
This commit is contained in:
Et7f3 2024-04-06 21:09:30 +02:00 committed by Tomas Mraz
parent f159d861e2
commit d5412c94a3

View File

@ -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 <openssl/ui.h> /* for UI_get_default_method */
#include <openssl/store.h>
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);