X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=engines%2Fe_sureware.c;h=58fa9a98ee23b7b18dfdd03ec980fb339dcaaac2;hb=448da15fbfebcd7c454159b0efa46ad2897890da;hp=66ffaf24bbc2fb4796913e2d24a1a70a61279809;hpb=fbeaa3c47d05dd90781bdf13b9004fd274512e74;p=oweals%2Fopenssl.git diff --git a/engines/e_sureware.c b/engines/e_sureware.c index 66ffaf24bb..58fa9a98ee 100644 --- a/engines/e_sureware.c +++ b/engines/e_sureware.c @@ -57,9 +57,15 @@ #include #include #include +#ifndef OPENSSL_NO_RSA #include +#endif +#ifndef OPENSSL_NO_DSA #include +#endif +#ifndef OPENSSL_NO_DH #include +#endif #include #ifndef OPENSSL_NO_HW @@ -82,10 +88,12 @@ static int surewarehk_modexp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx); /* RSA stuff */ +#ifndef OPENSSL_NO_RSA static int surewarehk_rsa_priv_dec(int flen,const unsigned char *from,unsigned char *to, RSA *rsa,int padding); static int surewarehk_rsa_sign(int flen,const unsigned char *from,unsigned char *to, RSA *rsa,int padding); +#endif /* RAND stuff */ static int surewarehk_rand_bytes(unsigned char *buf, int num); @@ -968,11 +976,13 @@ static DSA_SIG * surewarehk_dsa_do_sign(const unsigned char *from, int flen, DSA if (!p_surewarehk_Dsa_Sign) { SUREWAREerr(SUREWARE_F_SUREWAREHK_DSA_DO_SIGN,ENGINE_R_NOT_INITIALISED); + goto err; } /* extract ref to private key */ else if (!(hptr=DSA_get_ex_data(dsa, dsaHndidx))) { SUREWAREerr(SUREWARE_F_SUREWAREHK_DSA_DO_SIGN,SUREWARE_R_MISSING_KEY_COMPONENTS); + goto err; } else {