diff options
author | djm <> | 2009-01-05 21:36:39 +0000 |
---|---|---|
committer | djm <> | 2009-01-05 21:36:39 +0000 |
commit | 13c662ccd1d22d856f1f2defeea26dd18c0af043 (patch) | |
tree | e0d2d687fbd4e4e9eb6bc4b178ea069817f0aba4 /src/lib/libcrypto/evp | |
parent | acc5957d1b6d6872ce50e4100edebccea0476481 (diff) | |
download | openbsd-13c662ccd1d22d856f1f2defeea26dd18c0af043.tar.gz openbsd-13c662ccd1d22d856f1f2defeea26dd18c0af043.tar.bz2 openbsd-13c662ccd1d22d856f1f2defeea26dd18c0af043.zip |
update to openssl-0.9.8i; tested by several, especially krw@
Diffstat (limited to 'src/lib/libcrypto/evp')
-rw-r--r-- | src/lib/libcrypto/evp/Makefile | 54 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp.h | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_enc.c | 13 |
3 files changed, 44 insertions, 25 deletions
diff --git a/src/lib/libcrypto/evp/Makefile b/src/lib/libcrypto/evp/Makefile index 8f2555c7e5..9de56dc03d 100644 --- a/src/lib/libcrypto/evp/Makefile +++ b/src/lib/libcrypto/evp/Makefile | |||
@@ -135,13 +135,17 @@ bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | |||
135 | bio_ok.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_ok.c | 135 | bio_ok.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_ok.c |
136 | c_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | 136 | c_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
137 | c_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 137 | c_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
138 | c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 138 | c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h |
139 | c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 139 | c_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h |
140 | c_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | 140 | c_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
141 | c_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 141 | c_all.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
142 | c_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 142 | c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
143 | c_all.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 143 | c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
144 | c_all.o: ../../include/openssl/symhacks.h ../cryptlib.h c_all.c | 144 | c_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
145 | c_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
146 | c_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
147 | c_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
148 | c_all.o: ../cryptlib.h c_all.c | ||
145 | c_allc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | 149 | c_allc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
146 | c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 150 | c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
147 | c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | 151 | c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h |
@@ -170,13 +174,17 @@ c_alld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | |||
170 | c_alld.o: ../cryptlib.h c_alld.c | 174 | c_alld.o: ../cryptlib.h c_alld.c |
171 | digest.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | 175 | digest.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
172 | digest.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 176 | digest.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
173 | digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | 177 | digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h |
174 | digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 178 | digest.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h |
175 | digest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | 179 | digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h |
176 | digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 180 | digest.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
177 | digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | 181 | digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
178 | digest.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 182 | digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
179 | digest.o: ../../include/openssl/symhacks.h ../cryptlib.h digest.c | 183 | digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
184 | digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
185 | digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
186 | digest.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
187 | digest.o: ../cryptlib.h digest.c | ||
180 | e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | 188 | e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h |
181 | e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h | 189 | e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h |
182 | e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 190 | e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
@@ -312,13 +320,17 @@ evp_acnf.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_acnf.c | |||
312 | evp_enc.o: ../../e_os.h ../../include/openssl/asn1.h | 320 | evp_enc.o: ../../e_os.h ../../include/openssl/asn1.h |
313 | evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 321 | evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
314 | evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | 322 | evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
315 | evp_enc.o: ../../include/openssl/engine.h ../../include/openssl/err.h | 323 | evp_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h |
316 | evp_enc.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | 324 | evp_enc.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h |
317 | evp_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 325 | evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
318 | evp_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 326 | evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
319 | evp_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | 327 | evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
320 | evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 328 | evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
321 | evp_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_enc.c evp_locl.h | 329 | evp_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h |
330 | evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
331 | evp_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
332 | evp_enc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
333 | evp_enc.o: ../cryptlib.h evp_enc.c evp_locl.h | ||
322 | evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 334 | evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
323 | evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | 335 | evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h |
324 | evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 336 | evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index c19d764c15..1aa2d6fb35 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
@@ -303,6 +303,8 @@ struct env_md_ctx_st | |||
303 | * cleaned */ | 303 | * cleaned */ |
304 | #define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data | 304 | #define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data |
305 | * in EVP_MD_CTX_cleanup */ | 305 | * in EVP_MD_CTX_cleanup */ |
306 | #define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008 /* Allow use of non FIPS digest | ||
307 | * in FIPS mode */ | ||
306 | 308 | ||
307 | struct evp_cipher_st | 309 | struct evp_cipher_st |
308 | { | 310 | { |
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index a1904993bf..6e582c458d 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c | |||
@@ -279,7 +279,12 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
279 | { | 279 | { |
280 | int i,j,bl; | 280 | int i,j,bl; |
281 | 281 | ||
282 | OPENSSL_assert(inl > 0); | 282 | if (inl <= 0) |
283 | { | ||
284 | *outl = 0; | ||
285 | return inl == 0; | ||
286 | } | ||
287 | |||
283 | if(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0) | 288 | if(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0) |
284 | { | 289 | { |
285 | if(ctx->cipher->do_cipher(ctx,out,in,inl)) | 290 | if(ctx->cipher->do_cipher(ctx,out,in,inl)) |
@@ -381,10 +386,10 @@ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
381 | int fix_len; | 386 | int fix_len; |
382 | unsigned int b; | 387 | unsigned int b; |
383 | 388 | ||
384 | if (inl == 0) | 389 | if (inl <= 0) |
385 | { | 390 | { |
386 | *outl=0; | 391 | *outl = 0; |
387 | return 1; | 392 | return inl == 0; |
388 | } | 393 | } |
389 | 394 | ||
390 | if (ctx->flags & EVP_CIPH_NO_PADDING) | 395 | if (ctx->flags & EVP_CIPH_NO_PADDING) |