summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/engine.h
diff options
context:
space:
mode:
authordjm <>2010-10-01 22:59:01 +0000
committerdjm <>2010-10-01 22:59:01 +0000
commitfe047d8b632246cb2db3234a0a4f32e5c318857b (patch)
tree939b752540947d33507b3acc48d76a8bfb7c3dc3 /src/lib/libcrypto/engine/engine.h
parent2ea67f4aa254b09ded62e6e14fc893bbe6381579 (diff)
downloadopenbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.gz
openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.bz2
openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.zip
resolve conflicts, fix local changes
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 ecab9453ba..8ad11b15d7 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,20 +331,21 @@ 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);
337void ENGINE_load_padlock(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
338#endif 345#endif
339void ENGINE_load_cryptodev(void); 346void ENGINE_load_cryptodev(void);
340void ENGINE_load_aesni(void); 347void ENGINE_load_aesni(void);
341void ENGINE_load_padlock(void);
342void ENGINE_load_builtin_engines(void); 348void ENGINE_load_builtin_engines(void);
343#ifndef OPENSSL_NO_CAPIENG
344void ENGINE_load_capi(void);
345#endif
346 349
347/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation 350/* Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation
348 * "registry" handling. */ 351 * "registry" handling. */
@@ -393,6 +396,14 @@ int ENGINE_register_digests(ENGINE *e);
393void ENGINE_unregister_digests(ENGINE *e); 396void ENGINE_unregister_digests(ENGINE *e);
394void ENGINE_register_all_digests(void); 397void ENGINE_register_all_digests(void);
395 398
399int ENGINE_register_pkey_meths(ENGINE *e);
400void ENGINE_unregister_pkey_meths(ENGINE *e);
401void ENGINE_register_all_pkey_meths(void);
402
403int ENGINE_register_pkey_asn1_meths(ENGINE *e);
404void ENGINE_unregister_pkey_asn1_meths(ENGINE *e);
405void ENGINE_register_all_pkey_asn1_meths(void);
406
396/* These functions register all support from the above categories. Note, use of 407/* These functions register all support from the above categories. Note, use of
397 * these functions can result in static linkage of code your application may not 408 * these functions can result in static linkage of code your application may not
398 * need. If you only need a subset of functionality, consider using more 409 * need. If you only need a subset of functionality, consider using more
@@ -472,6 +483,8 @@ int ENGINE_set_load_ssl_client_cert_function(ENGINE *e,
472 ENGINE_SSL_CLIENT_CERT_PTR loadssl_f); 483 ENGINE_SSL_CLIENT_CERT_PTR loadssl_f);
473int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f); 484int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);
474int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f); 485int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);
486int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f);
487int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f);
475int ENGINE_set_flags(ENGINE *e, int flags); 488int ENGINE_set_flags(ENGINE *e, int flags);
476int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns); 489int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
477/* These functions allow control over any per-structure ENGINE data. */ 490/* These functions allow control over any per-structure ENGINE data. */
@@ -508,8 +521,16 @@ ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e);
508ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e); 521ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e);
509ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e); 522ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);
510ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e); 523ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);
524ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e);
525ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e);
511const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid); 526const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);
512const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid); 527const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);
528const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid);
529const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid);
530const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
531 const char *str, int len);
532const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,
533 const char *str, int len);
513const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e); 534const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
514int ENGINE_get_flags(const ENGINE *e); 535int ENGINE_get_flags(const ENGINE *e);
515 536
@@ -561,6 +582,8 @@ ENGINE *ENGINE_get_default_RAND(void);
561 * ciphering or digesting corresponding to "nid". */ 582 * ciphering or digesting corresponding to "nid". */
562ENGINE *ENGINE_get_cipher_engine(int nid); 583ENGINE *ENGINE_get_cipher_engine(int nid);
563ENGINE *ENGINE_get_digest_engine(int nid); 584ENGINE *ENGINE_get_digest_engine(int nid);
585ENGINE *ENGINE_get_pkey_meth_engine(int nid);
586ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid);
564 587
565/* This sets a new default ENGINE structure for performing RSA 588/* This sets a new default ENGINE structure for performing RSA
566 * operations. If the result is non-zero (success) then the ENGINE 589 * operations. If the result is non-zero (success) then the ENGINE
@@ -576,6 +599,8 @@ int ENGINE_set_default_DH(ENGINE *e);
576int ENGINE_set_default_RAND(ENGINE *e); 599int ENGINE_set_default_RAND(ENGINE *e);
577int ENGINE_set_default_ciphers(ENGINE *e); 600int ENGINE_set_default_ciphers(ENGINE *e);
578int ENGINE_set_default_digests(ENGINE *e); 601int ENGINE_set_default_digests(ENGINE *e);
602int ENGINE_set_default_pkey_meths(ENGINE *e);
603int ENGINE_set_default_pkey_asn1_meths(ENGINE *e);
579 604
580/* The combination "set" - the flags are bitwise "OR"d from the 605/* The combination "set" - the flags are bitwise "OR"d from the
581 * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()" 606 * ENGINE_METHOD_*** defines above. As with the "ENGINE_register_complete()"
@@ -704,7 +729,7 @@ typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
704 * values. */ 729 * values. */
705void *ENGINE_get_static_state(void); 730void *ENGINE_get_static_state(void);
706 731
707#if defined(__OpenBSD__) || defined(__FreeBSD__) 732#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)
708void ENGINE_setup_bsd_cryptodev(void); 733void ENGINE_setup_bsd_cryptodev(void);
709#endif 734#endif
710 735
@@ -733,13 +758,15 @@ void ERR_load_ENGINE_strings(void);
733#define ENGINE_F_ENGINE_GET_DEFAULT_TYPE 177 758#define ENGINE_F_ENGINE_GET_DEFAULT_TYPE 177
734#define ENGINE_F_ENGINE_GET_DIGEST 186 759#define ENGINE_F_ENGINE_GET_DIGEST 186
735#define ENGINE_F_ENGINE_GET_NEXT 115 760#define ENGINE_F_ENGINE_GET_NEXT 115
761#define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 193
762#define ENGINE_F_ENGINE_GET_PKEY_METH 192
736#define ENGINE_F_ENGINE_GET_PREV 116 763#define ENGINE_F_ENGINE_GET_PREV 116
737#define ENGINE_F_ENGINE_INIT 119 764#define ENGINE_F_ENGINE_INIT 119
738#define ENGINE_F_ENGINE_LIST_ADD 120 765#define ENGINE_F_ENGINE_LIST_ADD 120
739#define ENGINE_F_ENGINE_LIST_REMOVE 121 766#define ENGINE_F_ENGINE_LIST_REMOVE 121
740#define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150 767#define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 150
741#define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151 768#define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 151
742#define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 192 769#define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 194
743#define ENGINE_F_ENGINE_NEW 122 770#define ENGINE_F_ENGINE_NEW 122
744#define ENGINE_F_ENGINE_REMOVE 123 771#define ENGINE_F_ENGINE_REMOVE 123
745#define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189 772#define ENGINE_F_ENGINE_SET_DEFAULT_STRING 189
@@ -768,6 +795,7 @@ void ERR_load_ENGINE_strings(void);
768#define ENGINE_R_DSO_FAILURE 104 795#define ENGINE_R_DSO_FAILURE 104
769#define ENGINE_R_DSO_NOT_FOUND 132 796#define ENGINE_R_DSO_NOT_FOUND 132
770#define ENGINE_R_ENGINES_SECTION_ERROR 148 797#define ENGINE_R_ENGINES_SECTION_ERROR 148
798#define ENGINE_R_ENGINE_CONFIGURATION_ERROR 102
771#define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105 799#define ENGINE_R_ENGINE_IS_NOT_IN_LIST 105
772#define ENGINE_R_ENGINE_SECTION_ERROR 149 800#define ENGINE_R_ENGINE_SECTION_ERROR 149
773#define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128 801#define ENGINE_R_FAILED_LOADING_PRIVATE_KEY 128
@@ -794,6 +822,7 @@ void ERR_load_ENGINE_strings(void);
794#define ENGINE_R_RSA_NOT_IMPLEMENTED 141 822#define ENGINE_R_RSA_NOT_IMPLEMENTED 141
795#define ENGINE_R_UNIMPLEMENTED_CIPHER 146 823#define ENGINE_R_UNIMPLEMENTED_CIPHER 146
796#define ENGINE_R_UNIMPLEMENTED_DIGEST 147 824#define ENGINE_R_UNIMPLEMENTED_DIGEST 147
825#define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD 101
797#define ENGINE_R_VERSION_INCOMPATIBILITY 145 826#define ENGINE_R_VERSION_INCOMPATIBILITY 145
798 827
799#ifdef __cplusplus 828#ifdef __cplusplus