2
0

property_lcl.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #include <openssl/crypto.h>
  11. #include "internal/property.h"
  12. typedef struct ossl_property_list_st OSSL_PROPERTY_LIST;
  13. typedef int OSSL_PROPERTY_IDX;
  14. /* Property string functions */
  15. OSSL_PROPERTY_IDX ossl_property_name(OPENSSL_CTX *ctx, const char *s,
  16. int create);
  17. OSSL_PROPERTY_IDX ossl_property_value(OPENSSL_CTX *ctx, const char *s,
  18. int create);
  19. /* Property list functions */
  20. int ossl_property_parse_init(OPENSSL_CTX *ctx);
  21. void ossl_property_free(OSSL_PROPERTY_LIST *p);
  22. int ossl_property_has_optional(const OSSL_PROPERTY_LIST *query);
  23. int ossl_property_match_count(const OSSL_PROPERTY_LIST *query,
  24. const OSSL_PROPERTY_LIST *defn);
  25. OSSL_PROPERTY_LIST *ossl_property_merge(const OSSL_PROPERTY_LIST *a,
  26. const OSSL_PROPERTY_LIST *b);
  27. /* Property definition functions */
  28. OSSL_PROPERTY_LIST *ossl_parse_property(OPENSSL_CTX *ctx, const char *s);
  29. /* Property query functions */
  30. OSSL_PROPERTY_LIST *ossl_parse_query(OPENSSL_CTX *ctx, const char *s);
  31. /* Property definition cache functions */
  32. OSSL_PROPERTY_LIST *ossl_prop_defn_get(OPENSSL_CTX *ctx, const char *prop);
  33. int ossl_prop_defn_set(OPENSSL_CTX *ctx, const char *prop,
  34. OSSL_PROPERTY_LIST *pl);
  35. /* Property cache lock / unlock */
  36. int ossl_property_write_lock(OSSL_METHOD_STORE *);
  37. int ossl_property_read_lock(OSSL_METHOD_STORE *);
  38. int ossl_property_unlock(OSSL_METHOD_STORE *);