]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
ossl_store.pod: Correct the example of OSSL_STORE API usage
authorEt7f3 <cadeaudeelie@gmail.com>
Sat, 6 Apr 2024 19:09:30 +0000 (21:09 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 19 Jun 2024 16:56:11 +0000 (18:56 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24056)

doc/man7/ossl_store.pod

index a2c6260061fdc47b430ee9db146c9c09f626db95..d613d8036425585b12eae2dbeab50b78fdbac6a5 100644 (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);