VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.7/crypto/property/property_local.h@ 105945

最後變更 在這個檔案從105945是 104078,由 vboxsync 提交於 8 月 前

openssl-3.1.5: Applied and adjusted our OpenSSL changes to 3.1.4. bugref:10638

檔案大小: 1.9 KB
 
1/*
2 * Copyright 2019-2022 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#include <openssl/crypto.h>
12#include "internal/property.h"
13
14typedef int OSSL_PROPERTY_IDX;
15
16typedef enum {
17 OSSL_PROPERTY_OPER_EQ, OSSL_PROPERTY_OPER_NE, OSSL_PROPERTY_OVERRIDE
18} OSSL_PROPERTY_OPER;
19
20struct ossl_property_definition_st {
21 OSSL_PROPERTY_IDX name_idx;
22 OSSL_PROPERTY_TYPE type;
23 OSSL_PROPERTY_OPER oper;
24 unsigned int optional : 1;
25 union {
26 int64_t int_val; /* Signed integer */
27 OSSL_PROPERTY_IDX str_val; /* String */
28 } v;
29};
30
31struct ossl_property_list_st {
32 int num_properties;
33 unsigned int has_optional : 1;
34 OSSL_PROPERTY_DEFINITION properties[1];
35};
36
37#define OSSL_PROPERTY_TRUE 1
38#define OSSL_PROPERTY_FALSE 2
39
40/* Property string functions */
41OSSL_PROPERTY_IDX ossl_property_name(OSSL_LIB_CTX *ctx, const char *s,
42 int create);
43const char *ossl_property_name_str(OSSL_LIB_CTX *ctx, OSSL_PROPERTY_IDX idx);
44OSSL_PROPERTY_IDX ossl_property_value(OSSL_LIB_CTX *ctx, const char *s,
45 int create);
46const char *ossl_property_value_str(OSSL_LIB_CTX *ctx, OSSL_PROPERTY_IDX idx);
47
48/* Property list functions */
49void ossl_property_free(OSSL_PROPERTY_LIST *p);
50int ossl_property_has_optional(const OSSL_PROPERTY_LIST *query);
51
52/* Property definition cache functions */
53OSSL_PROPERTY_LIST *ossl_prop_defn_get(OSSL_LIB_CTX *ctx, const char *prop);
54int ossl_prop_defn_set(OSSL_LIB_CTX *ctx, const char *prop,
55 OSSL_PROPERTY_LIST **pl);
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette