summaryrefslogtreecommitdiffstats
path: root/crypto/property/property_local.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-06-01 20:02:24 +0200
committerPauli <pauli@openssl.org>2021-06-05 20:29:47 +1000
commit6ec3b2cf4992a304b4ab36f7b9e9ff130bd495b7 (patch)
tree348097b950d9bc6de530d93dfe8f0c70cc8bd983 /crypto/property/property_local.h
parent0b3fe363e6188dcb854d480180c9af91cc613f2c (diff)
property: Add functionality to query data from a property definition
This required making some OSSL_PROPERTY types a little less private. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15570)
Diffstat (limited to 'crypto/property/property_local.h')
-rw-r--r--crypto/property/property_local.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/crypto/property/property_local.h b/crypto/property/property_local.h
index 8cc3a51270..db1b0a5ee4 100644
--- a/crypto/property/property_local.h
+++ b/crypto/property/property_local.h
@@ -13,6 +13,27 @@
typedef int OSSL_PROPERTY_IDX;
+typedef enum {
+ OSSL_PROPERTY_OPER_EQ, OSSL_PROPERTY_OPER_NE, OSSL_PROPERTY_OVERRIDE
+} OSSL_PROPERTY_OPER;
+
+struct ossl_property_definition_st {
+ OSSL_PROPERTY_IDX name_idx;
+ OSSL_PROPERTY_TYPE type;
+ OSSL_PROPERTY_OPER oper;
+ unsigned int optional : 1;
+ union {
+ int64_t int_val; /* Signed integer */
+ OSSL_PROPERTY_IDX str_val; /* String */
+ } v;
+};
+
+struct ossl_property_list_st {
+ int n;
+ unsigned int has_optional : 1;
+ OSSL_PROPERTY_DEFINITION properties[1];
+};
+
/* Property string functions */
OSSL_PROPERTY_IDX ossl_property_name(OSSL_LIB_CTX *ctx, const char *s,
int create);