summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pem/pem_seal.c
diff options
context:
space:
mode:
authormiod <>2014-04-13 15:25:35 +0000
committermiod <>2014-04-13 15:25:35 +0000
commit1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a (patch)
tree74f4ff344980894c7c9ceeab9b81176ac7572566 /src/lib/libcrypto/pem/pem_seal.c
parent92349eb53934e1b3e9b807e603d45417a6320d21 (diff)
downloadopenbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.gz
openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.tar.bz2
openbsd-1fb5cf10c3e597dbb1ecc4dd423bba727fd7721a.zip
Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.
Diffstat (limited to 'src/lib/libcrypto/pem/pem_seal.c')
-rw-r--r--src/lib/libcrypto/pem/pem_seal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pem/pem_seal.c b/src/lib/libcrypto/pem/pem_seal.c
index 59690b56ae..b6b4e13498 100644
--- a/src/lib/libcrypto/pem/pem_seal.c
+++ b/src/lib/libcrypto/pem/pem_seal.c
@@ -96,7 +96,8 @@ int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type,
96 EVP_EncodeInit(&ctx->encode); 96 EVP_EncodeInit(&ctx->encode);
97 97
98 EVP_MD_CTX_init(&ctx->md); 98 EVP_MD_CTX_init(&ctx->md);
99 EVP_SignInit(&ctx->md,md_type); 99 if (!EVP_SignInit(&ctx->md,md_type))
100 goto err;
100 101
101 EVP_CIPHER_CTX_init(&ctx->cipher); 102 EVP_CIPHER_CTX_init(&ctx->cipher);
102 ret=EVP_SealInit(&ctx->cipher,type,ek,ekl,iv,pubk,npubk); 103 ret=EVP_SealInit(&ctx->cipher,type,ek,ekl,iv,pubk,npubk);
@@ -163,7 +164,8 @@ int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl,
163 goto err; 164 goto err;
164 } 165 }
165 166
166 EVP_EncryptFinal_ex(&ctx->cipher,s,(int *)&i); 167 if (!EVP_EncryptFinal_ex(&ctx->cipher,s,(int *)&i))
168 goto err;
167 EVP_EncodeUpdate(&ctx->encode,out,&j,s,i); 169 EVP_EncodeUpdate(&ctx->encode,out,&j,s,i);
168 *outl=j; 170 *outl=j;
169 out+=j; 171 out+=j;