{
    "content": [
        {
            "type": "text",
            "text": "# ossl_store(7ssl) (man)\n\n**Summary:** osslstore - Store retrieval functions\n\n**Synopsis:** #include <openssl/store.h>\n\n## Examples\n\n- `OSSLSTORECTX *ctx = OSSLSTOREopen(\"file:/foo/bar/data.pem\");`\n- `/*`\n- `* OSSLSTOREeof() simulates file semantics for any repository to signal`\n- `* that no more data can be expected`\n- `*/`\n- `while (!OSSLSTOREeof(ctx)) {`\n- `OSSLSTOREINFO *info = OSSLSTOREload(ctx);`\n- `/*`\n- `* Do whatever is necessary with the OSSLSTOREINFO,`\n- `* here just one example`\n- `*/`\n- `switch (OSSLSTOREINFOgettype(info)) {`\n- `case OSSLSTOREINFOCERT:`\n- `/* Print the X.509 certificate text */`\n- `X509printfp(stdout, OSSLSTOREINFOget0CERT(info));`\n- `/* Print the X.509 certificate PEM output */`\n- `PEMwriteX509(stdout, OSSLSTOREINFOget0CERT(info));`\n- `break;`\n- `OSSLSTOREclose(ctx);`\n\n## See Also\n\n- OSSLSTOREINFO(3)\n- OSSLSTORELOADER(3)\n- OSSLSTOREopen(3)\n- OSSLSTOREexpect(3)\n- OSSLSTORESEARCH(3)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (1 lines) — 2 subsections\n  - General (9 lines)\n  - URI schemes and loaders (11 lines)\n- **EXAMPLES** (1 lines) — 1 subsections\n  - A generic call (25 lines)\n- **SEE ALSO** (3 lines)\n- **COPYRIGHT** (9 lines)\n\n## Full Content\n\n### NAME\n\nosslstore - Store retrieval functions\n\n### SYNOPSIS\n\n#include <openssl/store.h>\n\n### DESCRIPTION\n\n#### General\n\nA 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\n#### URI schemes and loaders\n\nSupport 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\nUIMETHOD and pass phrases\nThe 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\n### EXAMPLES\n\n#### A generic call\n\nOSSLSTORECTX *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\n### SEE ALSO\n\nOSSLSTOREINFO(3), OSSLSTORELOADER(3), OSSLSTOREopen(3), OSSLSTOREexpect(3),\nOSSLSTORESEARCH(3)\n\n### COPYRIGHT\n\nCopyright 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\n\n\n3.0.2                                        2026-04-07                             OSSLSTORE(7SSL)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ossl_store",
        "section": "7ssl",
        "mode": "man",
        "summary": "osslstore - Store retrieval functions",
        "synopsis": "#include <openssl/store.h>",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 1,
                "subsections": [
                    {
                        "name": "General",
                        "lines": 9
                    },
                    {
                        "name": "URI schemes and loaders",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "A generic call",
                        "lines": 25
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            }
        ]
    }
}