]> git.ipfire.org Git - thirdparty/openssl.git/blame - include/internal/property.h
Update copyright year
[thirdparty/openssl.git] / include / internal / property.h
CommitLineData
1bdbdaff 1/*
33388b44 2 * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
1bdbdaff
P
3 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
4 *
5 * Licensed under the Apache License 2.0 (the "License"). You may not use
6 * this file except in compliance with the License. You can obtain a copy
7 * in the file LICENSE in the source distribution or at
8 * https://www.openssl.org/source/license.html
9 */
10
ae4186b0
DMSP
11#ifndef OSSL_INTERNAL_PROPERTY_H
12# define OSSL_INTERNAL_PROPERTY_H
1bdbdaff 13
1aedc35f
MC
14#include "internal/cryptlib.h"
15
1bdbdaff 16typedef struct ossl_method_store_st OSSL_METHOD_STORE;
1793d270 17typedef struct ossl_property_list_st OSSL_PROPERTY_LIST;
1bdbdaff 18
505f4660
MC
19/* Initialisation */
20int ossl_property_parse_init(OPENSSL_CTX *ctx);
21
1793d270
RL
22/* Property definition parser */
23OSSL_PROPERTY_LIST *ossl_parse_property(OPENSSL_CTX *ctx, const char *defn);
24/* Property query parser */
25OSSL_PROPERTY_LIST *ossl_parse_query(OPENSSL_CTX *ctx, const char *s);
26/* Property checker of query vs definition */
27int ossl_property_match_count(const OSSL_PROPERTY_LIST *query,
28 const OSSL_PROPERTY_LIST *defn);
b305452f
RL
29/* Free a parsed property list */
30void ossl_property_free(OSSL_PROPERTY_LIST *p);
31
1793d270 32
1bdbdaff 33/* Implementation store functions */
1aedc35f 34OSSL_METHOD_STORE *ossl_method_store_new(OPENSSL_CTX *ctx);
1bdbdaff 35void ossl_method_store_free(OSSL_METHOD_STORE *store);
c1d56231
RL
36int ossl_method_store_add(OSSL_METHOD_STORE *store, const OSSL_PROVIDER *prov,
37 int nid, const char *properties, void *method,
38 int (*method_up_ref)(void *),
39 void (*method_destruct)(void *));
40int ossl_method_store_remove(OSSL_METHOD_STORE *store, int nid,
41 const void *method);
1bdbdaff
P
42int ossl_method_store_fetch(OSSL_METHOD_STORE *store, int nid,
43 const char *prop_query, void **result);
44int ossl_method_store_set_global_properties(OSSL_METHOD_STORE *store,
45 const char *prop_query);
46
c2969ff6 47/* property query cache functions */
1bdbdaff
P
48int ossl_method_store_cache_get(OSSL_METHOD_STORE *store, int nid,
49 const char *prop_query, void **result);
50int ossl_method_store_cache_set(OSSL_METHOD_STORE *store, int nid,
bdbf2df2
P
51 const char *prop_query, void *result,
52 int (*method_up_ref)(void *),
53 void (*method_destruct)(void *));
1bdbdaff 54#endif