projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21a85f1
)
Make EVP_SealInit() return the correct value.
author
Dr. Stephen Henson
<steve@openssl.org>
Sat, 1 Dec 2001 23:09:38 +0000
(23:09 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sat, 1 Dec 2001 23:09:38 +0000
(23:09 +0000)
crypto/evp/p_seal.c
patch
|
blob
|
history
diff --git
a/crypto/evp/p_seal.c
b/crypto/evp/p_seal.c
index ba2dd657aba8e639a91cf227f82104690258399f..5570ca3745648aeecdd8c5515bfa671e3095ae73 100644
(file)
--- a/
crypto/evp/p_seal.c
+++ b/
crypto/evp/p_seal.c
@@
-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));