No fprintf in the txt_db component
[openssl.git] / engines / e_sureware.c
index 9e56a7d28eab712248f86ce6218c8044b5d32a2a..fb5e55c930a8e1b4fa26c16315390bf7cf46faf9 100644 (file)
@@ -560,8 +560,7 @@ static int surewarehk_init(ENGINE *e)
 
     return 1;
  err:
-    if (surewarehk_dso)
-        DSO_free(surewarehk_dso);
+    DSO_free(surewarehk_dso);
     surewarehk_dso = NULL;
     p_surewarehk_Init = NULL;
     p_surewarehk_Finish = NULL;
@@ -890,7 +889,7 @@ static int surewarehk_rsa_priv_dec(int flen, const unsigned char *from,
                     ENGINE_R_NOT_INITIALISED);
     }
     /* extract ref to private key */
-    else if (!(hptr = RSA_get_ex_data(rsa, rsaHndidx))) {
+    else if ((hptr = RSA_get_ex_data(rsa, rsaHndidx)) == NULL) {
         SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_DEC,
                     SUREWARE_R_MISSING_KEY_COMPONENTS);
         goto err;
@@ -965,7 +964,7 @@ static int surewarehk_rsa_sign(int flen, const unsigned char *from,
         SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_SIGN, ENGINE_R_NOT_INITIALISED);
     }
     /* extract ref to private key */
-    else if (!(hptr = RSA_get_ex_data(rsa, rsaHndidx))) {
+    else if ((hptr = RSA_get_ex_data(rsa, rsaHndidx)) == NULL) {
         SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_SIGN,
                     SUREWARE_R_MISSING_KEY_COMPONENTS);
     } else {
@@ -1003,7 +1002,7 @@ static DSA_SIG *surewarehk_dsa_do_sign(const unsigned char *from, int flen,
         goto err;
     }
     /* extract ref to private key */
-    else if (!(hptr = DSA_get_ex_data(dsa, dsaHndidx))) {
+    else if ((hptr = DSA_get_ex_data(dsa, dsaHndidx)) == NULL) {
         SUREWAREerr(SUREWARE_F_SUREWAREHK_DSA_DO_SIGN,
                     SUREWARE_R_MISSING_KEY_COMPONENTS);
         goto err;