]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/store/store_locl.h
STORE tests: add PKCS#12 tests
[thirdparty/openssl.git] / crypto / store / store_locl.h
CommitLineData
71a5516d
RL
1/*
2 * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10#include "internal/thread_once.h"
11#include <openssl/dsa.h>
12#include <openssl/engine.h>
13#include <openssl/evp.h>
14#include <openssl/lhash.h>
15#include <openssl/x509.h>
16#include <openssl/store.h>
17
18/*-
19 * OSSL_STORE_INFO stuff
20 * ---------------------
21 */
22
23struct ossl_store_info_st {
24 int type;
25 union {
26 struct {
27 char *name;
28 char *desc;
29 } name; /* when type == OSSL_STORE_INFO_NAME */
30
31 EVP_PKEY *params; /* when type == OSSL_STORE_INFO_PARAMS */
32 EVP_PKEY *pkey; /* when type == OSSL_STORE_INFO_PKEY */
33 X509 *x509; /* when type == OSSL_STORE_INFO_CERT */
34 X509_CRL *crl; /* when type == OSSL_STORE_INFO_CRL */
35 void *data; /* used internally */
36 } _;
37};
38
39DEFINE_STACK_OF(OSSL_STORE_INFO)
40
41/*-
42 * OSSL_STORE_LOADER stuff
43 * -----------------------
44 */
45
46int ossl_store_register_loader_int(OSSL_STORE_LOADER *loader);
47OSSL_STORE_LOADER *ossl_store_unregister_loader_int(const char *scheme);
48
49/* loader stuff */
50struct ossl_store_loader_st {
51 const char *scheme;
52 OSSL_STORE_open_fn open;
53 OSSL_STORE_ctrl_fn ctrl;
54 OSSL_STORE_load_fn load;
55 OSSL_STORE_eof_fn eof;
56 OSSL_STORE_error_fn error;
57 OSSL_STORE_close_fn close;
58};
59DEFINE_LHASH_OF(OSSL_STORE_LOADER);
60
61const OSSL_STORE_LOADER *ossl_store_get0_loader_int(const char *scheme);
62void ossl_store_destroy_loaders_int(void);
63
64/*-
65 * OSSL_STORE init stuff
66 * ---------------------
67 */
68
69int ossl_store_init_once(void);
9c6da42d 70int ossl_store_file_loader_init(void);