]> git.ipfire.org Git - thirdparty/openssl.git/blame - include/internal/property.h
Modify ossl_method_store_add() to handle reference counting
[thirdparty/openssl.git] / include / internal / property.h
CommitLineData
1bdbdaff
P
1/*
2 * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
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
11#ifndef HEADER_PROPERTY_H
12# define HEADER_PROPERTY_H
13
1aedc35f
MC
14#include "internal/cryptlib.h"
15
1bdbdaff
P
16typedef struct ossl_method_store_st OSSL_METHOD_STORE;
17
18/* Implementation store functions */
1aedc35f 19OSSL_METHOD_STORE *ossl_method_store_new(OPENSSL_CTX *ctx);
1bdbdaff
P
20void ossl_method_store_free(OSSL_METHOD_STORE *store);
21int ossl_method_store_add(OSSL_METHOD_STORE *store, int nid,
22 const char *properties, void *implementation,
b1d40ddf 23 int (*implementation_up_ref)(void *),
1bdbdaff
P
24 void (*implementation_destruct)(void *));
25int ossl_method_store_remove(OSSL_METHOD_STORE *store,
26 int nid, const void *implementation);
27int ossl_method_store_fetch(OSSL_METHOD_STORE *store, int nid,
28 const char *prop_query, void **result);
29int ossl_method_store_set_global_properties(OSSL_METHOD_STORE *store,
30 const char *prop_query);
31
c2969ff6 32/* property query cache functions */
1bdbdaff
P
33int ossl_method_store_cache_get(OSSL_METHOD_STORE *store, int nid,
34 const char *prop_query, void **result);
35int ossl_method_store_cache_set(OSSL_METHOD_STORE *store, int nid,
36 const char *prop_query, void *result);
1bdbdaff 37#endif