{
    "mode": "man",
    "parameter": "OSSL_STORE",
    "section": "7SSL",
    "url": "https://www.chedong.com/phpMan.php/man/OSSL_STORE/7SSL/json",
    "generated": "2026-08-14T02:44:05Z",
    "synopsis": "#include <openssl/store.h>",
    "sections": {
        "NAME": {
            "content": "osslstore - Store retrieval functions\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "#include <openssl/store.h>\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "",
            "subsections": [
                {
                    "name": "General",
                    "content": "A STORE is a layer of functionality to retrieve a number of supported objects from a\nrepository of any kind, addressable as a filename or as a URI.\n\nThe functionality supports the pattern \"open a channel to the repository\", \"loop and retrieve\none object at a time\", and \"finish up by closing the channel\".\n\nThe retrieved objects are returned as a wrapper type OSSLSTOREINFO, from which an OpenSSL\ntype can be retrieved.\n"
                },
                {
                    "name": "URI schemes and loaders",
                    "content": "Support for a URI scheme is called a STORE \"loader\", and can be added dynamically from the\ncalling application or from a loadable engine.\n\nSupport for the 'file' scheme is built into \"libcrypto\".  See osslstore-file(7) for more\ninformation.\n"
                },
                {
                    "name": "UI_METHOD and pass phrases",
                    "content": "The OSSSTORE API does nothing to enforce any specific format or encoding on the pass phrase\nthat the UIMETHOD provides.  However, the pass phrase is expected to be UTF-8 encoded.  The\nresult of any other encoding is undefined.\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "",
            "subsections": [
                {
                    "name": "A generic call",
                    "content": "OSSLSTORECTX *ctx = OSSLSTOREopen(\"file:/foo/bar/data.pem\");\n\n/*\n* OSSLSTOREeof() simulates file semantics for any repository to signal\n* that no more data can be expected\n*/\nwhile (!OSSLSTOREeof(ctx)) {\nOSSLSTOREINFO *info = OSSLSTOREload(ctx);\n\n/*\n* Do whatever is necessary with the OSSLSTOREINFO,\n* here just one example\n*/\nswitch (OSSLSTOREINFOgettype(info)) {\ncase OSSLSTOREINFOCERT:\n/* Print the X.509 certificate text */\nX509printfp(stdout, OSSLSTOREINFOget0CERT(info));\n/* Print the X.509 certificate PEM output */\nPEMwriteX509(stdout, OSSLSTOREINFOget0CERT(info));\nbreak;\n}\n}\n\nOSSLSTOREclose(ctx);\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "OSSLSTOREINFO(3), OSSLSTORELOADER(3), OSSLSTOREopen(3), OSSLSTOREexpect(3),\nOSSLSTORESEARCH(3)\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.\n\nLicensed under the Apache License 2.0 (the \"License\").  You may not use this file except in\ncompliance with the License.  You can obtain a copy in the file LICENSE in the source\ndistribution or at <https://www.openssl.org/source/license.html>.\n\n3.0.13                                       2026-07-29                             OSSLSTORE(7SSL)",
            "subsections": []
        }
    },
    "summary": "osslstore - Store retrieval functions",
    "flags": [],
    "examples": [
        "OSSLSTORECTX *ctx = OSSLSTOREopen(\"file:/foo/bar/data.pem\");",
        "/*",
        "* OSSLSTOREeof() simulates file semantics for any repository to signal",
        "* that no more data can be expected",
        "*/",
        "while (!OSSLSTOREeof(ctx)) {",
        "OSSLSTOREINFO *info = OSSLSTOREload(ctx);",
        "/*",
        "* Do whatever is necessary with the OSSLSTOREINFO,",
        "* here just one example",
        "*/",
        "switch (OSSLSTOREINFOgettype(info)) {",
        "case OSSLSTOREINFOCERT:",
        "/* Print the X.509 certificate text */",
        "X509printfp(stdout, OSSLSTOREINFOget0CERT(info));",
        "/* Print the X.509 certificate PEM output */",
        "PEMwriteX509(stdout, OSSLSTOREINFOget0CERT(info));",
        "break;",
        "OSSLSTOREclose(ctx);"
    ],
    "see_also": [
        {
            "name": "OSSLSTOREINFO",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/OSSLSTOREINFO/3/json"
        },
        {
            "name": "OSSLSTORELOADER",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/OSSLSTORELOADER/3/json"
        },
        {
            "name": "OSSLSTOREopen",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/OSSLSTOREopen/3/json"
        },
        {
            "name": "OSSLSTOREexpect",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/OSSLSTOREexpect/3/json"
        },
        {
            "name": "OSSLSTORESEARCH",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/OSSLSTORESEARCH/3/json"
        }
    ]
}