Fix sign comparison warning & replace unsigned int with uint32_t for nIn.
[novacoin.git] / src / ecies.cpp
index 101b322..502bc96 100644 (file)
@@ -224,7 +224,6 @@ static int store_cipher_body(
     if (EVP_EncryptFinal_ex(&cipher, body, &out_len) != 1) {
         SET_OSSL_ERROR("Error while finalizing the data using the symmetric cipher");
         EVP_CIPHER_CTX_cleanup(&cipher);
-        cryptogram_free(cryptogram);
         return 0;
     }
 
@@ -524,7 +523,7 @@ unsigned char * ecies_decrypt(const ies_ctx_t *ctx, const cryptogram_t *cryptogr
 {
     unsigned char *envelope_key = NULL, *output = NULL;
 
-    if (!ctx || !cryptogram || !length || !error) {
+    if (!ctx || !cryptogram || !length) {
         SET_ERROR("Invalid argument");
         goto err;
     }