]> 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:57:52 +0000 (18:57 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24056)

(cherry picked from commit d5412c94a399d3923b2dec2431ead60288d857c8)

doc/man7/ossl_store.pod

index 3152cff104240a7363161ab9cf045c7043161354..81908def36abd64987b90dc49fe743d459b62ecd 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);