summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/engine/engine.h')
-rw-r--r--src/lib/libcrypto/engine/engine.h55
1 files changed, 42 insertions, 13 deletions
diff --git a/src/lib/libcrypto/engine/engine.h b/src/lib/libcrypto/engine/engine.h
index f503595ece..7fbd95f634 100644
--- a/src/lib/libcrypto/engine/engine.h
+++ b/src/lib/libcrypto/engine/engine.h
@@ -88,16 +88,15 @@
88#include <openssl/ecdsa.h> 88#include <openssl/ecdsa.h>
89#endif 89#endif
90#include <openssl/rand.h> 90#include <openssl/rand.h>
91#include <openssl/store.h>
92#include <openssl/ui.h> 91#include <openssl/ui.h>
93#include <openssl/err.h> 92#include <openssl/err.h>
94#endif 93#endif
95 94
96#include <openssl/x509.h>
97
98#include <openssl/ossl_typ.h> 95#include <openssl/ossl_typ.h>
99#include <openssl/symhacks.h> 96#include <openssl/symhacks.h>
100 97
98#include <openssl/x509.h>
99
101#ifdef __cplusplus 100#ifdef __cplusplus
102extern "C" { 101extern "C" {
103#endif 102#endif
@@ -113,6 +112,8 @@ extern "C" {
113#define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 112#define ENGINE_METHOD_CIPHERS (unsigned int)0x0040
114#define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 113#define ENGINE_METHOD_DIGESTS (unsigned int)0x0080
115#define ENGINE_METHOD_STORE (unsigned int)0x0100 114#define ENGINE_METHOD_STORE (unsigned int)0x0100
115#define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200
116#define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400
116/* Obvious all-or-nothing cases. */ 117/* Obvious all-or-nothing cases. */
117#define ENGINE_METHOD_ALL (unsigned int)0xFFFF 118#define ENGINE_METHOD_ALL (unsigned int)0xFFFF
118#define ENGINE_METHOD_NONE (unsigned int)0x0000 119#define ENGINE_METHOD_NONE (unsigned int)0x0000
@@ -297,7 +298,8 @@ typedef int (*ENGINE_SSL_CLIENT_CERT_PTR)(ENGINE *, SSL *ssl,
297 * parameter is non-NULL it is set to the size of the returned array. */ 298 * parameter is non-NULL it is set to the size of the returned array. */
298typedef int (*ENGINE_CIPHERS_PTR)(ENGINE *, const EVP_CIPHER **, const int **, int); 299typedef int (*ENGINE_CIPHERS_PTR)(ENGINE *, const EVP_CIPHER **, const int **, int);
299typedef int (*ENGINE_DIGESTS_PTR)(ENGINE *, const EVP_MD **, const int **, int); 300typedef int (*ENGINE_DIGESTS_PTR)(ENGINE *, const EVP_MD **, const int **, int);
300 301typedef int (*ENGINE_PKEY_METHS_PTR)(ENGINE *, EVP_PKEY_METHOD **, const int **, int);
302typedef int (*ENGINE_PKEY_ASN1_METHS_PTR)(ENGINE *, EVP_PKEY_ASN1_METHOD **, const int **, int);
301/* STRUCTURE functions ... all of these functions deal with pointers to ENGINE 303/* STRUCTURE functions ... all of these functions deal with pointers to ENGINE
302 * structures where the pointers have a "structural reference". This means that 304 * structures where the pointers have a "structural reference". This means that
303 * their reference is to allowed access to the structure but it does not imply 305 * their reference is to allowed access to the structure but it does not imply
@@ -329,19 +331,20 @@ void ENGINE_load_aep(void);
329void ENGINE_load_atalla(void); 331void ENGINE_load_atalla(void);
330void ENGINE_load_chil(void); 332void ENGINE_load_chil(void);
331void ENGINE_load_cswift(void); 333void ENGINE_load_cswift(void);
332#ifndef OPENSSL_NO_GMP
333void ENGINE_load_gmp(void);
334#endif
335void ENGINE_load_nuron(void); 334void ENGINE_load_nuron(void);
336void ENGINE_load_sureware(void); 335void ENGINE_load_sureware(void);
337void ENGINE_load_ubsec(void); 336void ENGINE_load_ubsec(void);
338#endif
339void ENGINE_load_cryptodev(void);
340void ENGINE_load_padlock(void); 337void ENGINE_load_padlock(void);
341void ENGINE_load_builtin_engines(void);
342#ifndef OPENSSL_NO_CAPIENG
343void ENGINE_load_capi(void); 338void ENGINE_load_capi(void);
339#ifndef OPENSSL_NO_GMP
340void ENGINE_load_gmp(void);
341#endif
342#ifndef OPENSSL_NO_GOST
343void ENGINE_load_gost(void);
344#endif
344#endif 345#endif
346void ENGINE_load_cryptodev(void);
347void ENGINE_load_builtin_engines(void);
345 348
346/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation 349/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation
347 * "registry" handling. */ 350 * "registry" handling. */
@@ -392,6 +395,14 @@ int ENGINE_register_digests(ENGINE *e);
392void ENGINE_unregister_digests(ENGINE *e); 395void ENGINE_unregister_digests(ENGINE *e);
393void ENGINE_register_all_digests(void); 396void ENGINE_register_all_digests(void);
394 397
398int ENGINE_register_pkey_meths(ENGINE *e);
399void ENGINE_unregister_pkey_meths(ENGINE *e);
400void ENGINE_register_all_pkey_meths(void);
401
402int ENGINE_register_pkey_asn1_meths(ENGINE *e);
403void ENGINE_unregister_pkey_asn1_meths(ENGINE *e);
404void ENGINE_register_all_pkey_asn1_meths(void);
405
395/* These functions register all support from the above categories. Note, use of 406/* These functions register all support from the above categories. Note, use of
396 * these functions can result in static linkage of code your application may not 407 * these functions can result in static linkage of code your application may not
397 * need. If you only need a subset of functionality, consider using more 408 * need. If you only need a subset of functionality, consider using more
@@ -471,6 +482,8 @@ int ENGINE_set_load_ssl_client_cert_function(ENGINE *e,
471 ENGINE_SSL_CLIENT_CERT_PTR loadssl_f); 482 ENGINE_SSL_CLIENT_CERT_PTR loadssl_f);
472int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f); 483int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);
473int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f); 484int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);
485int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f);
486int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f);
474int ENGINE_set_flags(ENGINE *e, int flags); 487int ENGINE_set_flags(ENGINE *e, int flags);
475int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns); 488int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
476/* These functions allow control over any per-structure ENGINE data. */ 489/* These functions allow control over any per-structure ENGINE data. */
@@ -507,8 +520,16 @@ ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e);
507ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e); 520ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e);
508ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e); 521ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);
509ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e); 522ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);
523ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e);
524ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e);
510const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid); 525const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);
511const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid); 526const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);
527const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid);
528const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid);
529const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
530 const char *str, int len);
531const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,
532 const char *str, int len);
512const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e); 533const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
513int ENGINE_get_flags(const ENGINE *e); 534int ENGINE_get_flags(const ENGINE *e);
514 535
@@ -560,6 +581,8 @@ ENGINE *ENGINE_get_default_RAND(void);
560 * ciphering or digesting corresponding to "nid". */ 581 * ciphering or digesting corresponding to "nid". */
561ENGINE *ENGINE_get_cipher_engine(int nid); 582ENGINE *ENGINE_get_cipher_engine(int nid);
562ENGINE *ENGINE_get_digest_engine(int nid); 583ENGINE *ENGINE_get_digest_engine(int nid);
584ENGINE *ENGINE_get_pkey_meth_engine(int nid);
585ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid);
563 586
564/* This sets a new default ENGINE structure for performing RSA 587/* This sets a new default ENGINE structure for performing RSA
565 * operations. If the result is non-zero (success) then the ENGINE 588 * operations. If the result is non-zero (success) then the ENGINE
@@ -575,6 +598,8 @@ int ENGINE_set_default_DH(ENGINE *e);
575int ENGINE_set_default_RAND(ENGINE *e); 598int ENGINE_set_default_RAND(ENGINE *e);
576int ENGINE_set_default_ciphers(ENGINE *e); 599int ENGINE_set_default_ciphers(ENGINE *e);
577int ENGINE_set_default_digests(ENGINE *e); 600int ENGINE_set_default_digests(ENGINE *e);
601int ENGINE_set_default_pkey_meths(ENGINE *e);
602int ENGINE_set_default_pkey_asn1_meths(ENGINE *e);
578 603
579/* The combination "set" - the flags are bitwise "OR"d from the 604/* The combination "set" - the flags are bitwise "OR"d from the
580 * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()" 605 * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()"
@@ -703,7 +728,7 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
703 * values. */ 728 * values. */
704void *ENGINE_get_static_state(void); 729void *ENGINE_get_static_state(void);
705 730
706#if defined(__OpenBSD__) || defined(__FreeBSD__) 731#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
707void ENGINE_setup_bsd_cryptodev(void); 732void ENGINE_setup_bsd_cryptodev(void);
708#endif 733#endif
709 734
@@ -732,13 +757,15 @@ void ERR_load_ENGINE_strings(void);
732#define ENGINE_F_ENGINE_GET_DEFAULT_TYPE 177 757#define ENGINE_F_ENGINE_GET_DEFAULT_TYPE 177
733#define ENGINE_F_ENGINE_GET_DIGEST 186 758#define ENGINE_F_ENGINE_GET_DIGEST 186
734#define ENGINE_F_ENGINE_GET_NEXT 115 759#define ENGINE_F_ENGINE_GET_NEXT 115
760#define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 193
761#define ENGINE_F_ENGINE_GET_PKEY_METH 192
735#define ENGINE_F_ENGINE_GET_PREV 116 762#define ENGINE_F_ENGINE_GET_PREV 116
736#define ENGINE_F_ENGINE_INIT 119 763#define ENGINE_F_ENGINE_INIT 119
737#define ENGINE_F_ENGINE_LIST_ADD 120 764#define ENGINE_F_ENGINE_LIST_ADD 120
738#define ENGINE_F_ENGINE_LIST_REMOVE 121 765#define ENGINE_F_ENGINE_LIST_REMOVE 121
739#define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150 766#define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150
740#define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151 767#define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151
741#define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 192 768#define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 194
742#define ENGINE_F_ENGINE_NEW 122 769#define ENGINE_F_ENGINE_NEW 122
743#define ENGINE_F_ENGINE_REMOVE 123 770#define ENGINE_F_ENGINE_REMOVE 123
744#define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189 771#define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189
@@ -767,6 +794,7 @@ void ERR_load_ENGINE_strings(void);
767#define ENGINE_R_DSO_FAILURE 104 794#define ENGINE_R_DSO_FAILURE 104
768#define ENGINE_R_DSO_NOT_FOUND 132 795#define ENGINE_R_DSO_NOT_FOUND 132
769#define ENGINE_R_ENGINES_SECTION_ERROR 148 796#define ENGINE_R_ENGINES_SECTION_ERROR 148
797#define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102
770#define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 798#define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105
771#define ENGINE_R_ENGINE_SECTION_ERROR 149 799#define ENGINE_R_ENGINE_SECTION_ERROR 149
772#define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 800#define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128
@@ -793,6 +821,7 @@ void ERR_load_ENGINE_strings(void);
793#define ENGINE_R_RSA_NOT_IMPLEMENTED 141 821#define ENGINE_R_RSA_NOT_IMPLEMENTED 141
794#define ENGINE_R_UNIMPLEMENTED_CIPHER 146 822#define ENGINE_R_UNIMPLEMENTED_CIPHER 146
795#define ENGINE_R_UNIMPLEMENTED_DIGEST 147 823#define ENGINE_R_UNIMPLEMENTED_DIGEST 147
824#define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101
796#define ENGINE_R_VERSION_INCOMPATIBILITY 145 825#define ENGINE_R_VERSION_INCOMPATIBILITY 145
797 826
798#ifdef __cplusplus 827#ifdef __cplusplus