diff options
author | Nils Larsch <nils@openssl.org> | 2005-07-16 12:37:36 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-07-16 12:37:36 +0000 |
commit | 3eeaab4bed46e3320947d0f609b82007b65b5a46 (patch) | |
tree | 3d5136c2646cb283e543b4db9cb47eb997bd4132 /engines/e_4758cca.c | |
parent | 57eb1d32508b2debfbab605ebf9ac156c4008272 (diff) |
make
./configure no-deprecated [no-dsa] [no-dh] [no-ec] [no-rsa]
make depend all test
work again
PR: 1159
Diffstat (limited to 'engines/e_4758cca.c')
-rw-r--r-- | engines/e_4758cca.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/e_4758cca.c b/engines/e_4758cca.c index 7d850a854b..0f1dae7567 100644 --- a/engines/e_4758cca.c +++ b/engines/e_4758cca.c @@ -61,7 +61,9 @@ #include <openssl/objects.h> #include <openssl/engine.h> #include <openssl/rand.h> +#ifndef OPENSSL_NO_RSA #include <openssl/rsa.h> +#endif #include <openssl/bn.h> #ifndef OPENSSL_NO_HW @@ -109,8 +111,10 @@ static int getModulusAndExponent(const unsigned char *token, long *exponentLengt static int cca_get_random_bytes(unsigned char*, int ); static int cca_random_status(void); +#ifndef OPENSSL_NO_RSA static void cca_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, int idx,long argl, void *argp); +#endif /* Function pointers for CCA verbs */ /*---------------------------------*/ @@ -154,7 +158,9 @@ static const char* n_pkaDecrypt = CSNDPKD; #endif static const char* n_randomNumberGenerate = CSNBRNG; +#ifndef OPENSSL_NO_RSA static int hndidx = -1; +#endif static DSO *dso = NULL; /* openssl engine initialization structures */ @@ -221,8 +227,10 @@ static int bind_helper(ENGINE *e) !ENGINE_set_init_function(e, ibm_4758_cca_init) || !ENGINE_set_finish_function(e, ibm_4758_cca_finish) || !ENGINE_set_ctrl_function(e, ibm_4758_cca_ctrl) || +#ifndef OPENSSL_NO_RSA !ENGINE_set_load_privkey_function(e, ibm_4758_load_privkey) || !ENGINE_set_load_pubkey_function(e, ibm_4758_load_pubkey) || +#endif !ENGINE_set_cmd_defns(e, cca4758_cmd_defns)) return 0; /* Ensure the error handling is set up */ @@ -304,8 +312,10 @@ static int ibm_4758_cca_init(ENGINE *e) } #endif +#ifndef OPENSSL_NO_RSA hndidx = RSA_get_ex_new_index(0, "IBM 4758 CCA RSA key handle", NULL, NULL, cca_ex_free); +#endif return 1; err: @@ -313,13 +323,15 @@ err: DSO_free(dso); dso = NULL; +#ifndef OPENSSL_NO_RSA keyRecordRead = (F_KEYRECORDREAD)0; - randomNumberGenerate = (F_RANDOMNUMBERGENERATE)0; digitalSignatureGenerate = (F_DIGITALSIGNATUREGENERATE)0; digitalSignatureVerify = (F_DIGITALSIGNATUREVERIFY)0; publicKeyExtract = (F_PUBLICKEYEXTRACT)0; pkaEncrypt = (F_PKAENCRYPT)0; pkaDecrypt = (F_PKADECRYPT)0; +#endif + randomNumberGenerate = (F_RANDOMNUMBERGENERATE)0; return 0; } @@ -339,6 +351,7 @@ static int ibm_4758_cca_finish(ENGINE *e) return 0; } dso = NULL; +#ifndef OPENSSL_NO_RSA keyRecordRead = (F_KEYRECORDREAD)0; randomNumberGenerate = (F_RANDOMNUMBERGENERATE)0; digitalSignatureGenerate = (F_DIGITALSIGNATUREGENERATE)0; @@ -346,6 +359,8 @@ static int ibm_4758_cca_finish(ENGINE *e) publicKeyExtract = (F_PUBLICKEYEXTRACT)0; pkaEncrypt = (F_PKAENCRYPT)0; pkaDecrypt = (F_PKADECRYPT)0; +#endif + randomNumberGenerate = (F_RANDOMNUMBERGENERATE)0; return 1; } @@ -951,12 +966,14 @@ static int cca_get_random_bytes(unsigned char* buf, int num) return 1; } +#ifndef OPENSSL_NO_RSA static void cca_ex_free(void *obj, void *item, CRYPTO_EX_DATA *ad, int idx, long argl, void *argp) { if (item) OPENSSL_free(item); } +#endif /* Goo to handle building as a dynamic engine */ #ifndef OPENSSL_NO_DYNAMIC_ENGINE |