{"id":3912,"date":"2022-12-20T17:28:23","date_gmt":"2022-12-20T20:28:23","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ossl_store-man7\/"},"modified":"2022-12-20T17:28:23","modified_gmt":"2022-12-20T20:28:23","slug":"ossl_store-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ossl_store-man7\/","title":{"rendered":"OSSL_STORE (man7)"},"content":{"rendered":"<h1 align=\"center\">OSSL_STORE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COPYRIGHT\">COPYRIGHT<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ossl_store \u2212 Store retrieval functions<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">#include <openssl\/store.h><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>General<\/b> <br \/> A <small>STORE<\/small> is a layer of functionality to retrieve a number of supported objects from a repository of any kind, addressable as a filename or as a <small>URI.<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The functionality supports the pattern &#8220;open a channel to the repository&#8221;, &#8220;loop and retrieve one object at a time&#8221;, and &#8220;finish up by closing the channel&#8221;.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The retrieved objects are returned as a wrapper type <b><small>OSSL_STORE_INFO<\/small><\/b> , from which an OpenSSL type can be retrieved.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>URI<\/small> schemes and loaders<\/b> <br \/> Support for a <small>URI<\/small> scheme is called a <small>STORE<\/small> &#8220;loader&#8221;, and can be added dynamically from the calling application or from a loadable engine.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Support for the \u2019file\u2019 scheme is built into &#8220;libcrypto&#8221;. See <b>ossl_store\u2212file<\/b>(7) for more information.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>UI_METHOD<\/small> and pass phrases<\/b> <br \/> The <b><small>OSS_STORE<\/small><\/b> <small>API<\/small> does nothing to enforce any specific format or encoding on the pass phrase that the <b><small>UI_METHOD<\/small><\/b> provides. However, the pass phrase is expected to be <small>UTF\u22128<\/small> encoded. The result of any other encoding is undefined.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>A generic call<\/b> <br \/> OSSL_STORE_CTX *ctx = OSSL_STORE_open(&#8220;file:\/foo\/bar\/data.pem&#8221;); <br \/> \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var <br \/> bodies manpages.csv script_extrae_body.sh script.sh usr OSSL_STORE_eof() simulates file semantics for any repository to signal <br \/> bodies manpages.csv script_extrae_body.sh script.sh usr that no more data can be expected <br \/> bodies\/ usr\/ <br \/> while (!OSSL_STORE_eof(ctx)) { <br \/> OSSL_STORE_INFO *info = OSSL_STORE_load(ctx); <br \/> \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var <br \/> bodies manpages.csv script_extrae_body.sh script.sh usr Do whatever is necessary with the OSSL_STORE_INFO, <br \/> bodies manpages.csv script_extrae_body.sh script.sh usr here just one example <br \/> bodies\/ usr\/ <br \/> switch (OSSL_STORE_INFO_get_type(info)) { <br \/> case OSSL_STORE_INFO_CERT: <br \/> \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Print the X.509 certificate text bodies\/ usr\/ <br \/> X509_print_fp(stdout, OSSL_STORE_INFO_get0_CERT(info)); <br \/> \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var Print the X.509 certificate PEM output bodies\/ usr\/ <br \/> PEM_write_X509(stdout, OSSL_STORE_INFO_get0_CERT(info)); <br \/> break; <br \/> } <br \/> } <br \/> OSSL_STORE_close(ctx);<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><small>OSSL_STORE_INFO<\/small><\/b> (3), <b><small>OSSL_STORE_LOADER<\/small><\/b> (3), <b>OSSL_STORE_open<\/b>(3), <b>OSSL_STORE_expect<\/b>(3), <b><small>OSSL_STORE_SEARCH<\/small><\/b> (3)<\/p>\n<h2>COPYRIGHT <a name=\"COPYRIGHT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright 2016\u22122021 The OpenSSL Project Authors. All Rights Reserved.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Licensed under the OpenSSL license (the &#8220;License&#8221;). You may not use this file except in compliance with the License. You can obtain a copy in the file <small>LICENSE<\/small> in the source distribution or at <https:\/\/www.openssl.org\/source\/license.html>.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ossl_store \u2212 Store retrieval functions <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,972,1005],"class_list":["post-3912","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-man7","tag-ossl_store"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3912"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3912\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}