Skip to content

Commit

Permalink
Make EVP_SealInit() return the correct value.
Browse files Browse the repository at this point in the history
  • Loading branch information
snhenson committed Dec 1, 2001
1 parent 21a85f1 commit 6a0dec9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crypto/evp/p_seal.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek
EVP_CIPHER_CTX_init(ctx);
if(!EVP_EncryptInit_ex(ctx,type,NULL,NULL,NULL)) return 0;
}
if (npubk <= 0) return(0);
if ((npubk <= 0) || !pubk)
return 1;
if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) <= 0)
return(0);
return 0;
if (EVP_CIPHER_CTX_iv_length(ctx))
RAND_pseudo_bytes(iv,EVP_CIPHER_CTX_iv_length(ctx));

Expand Down

0 comments on commit 6a0dec9

Please sign in to comment.