diff options
| author | miod <> | 2014-08-07 20:02:23 +0000 |
|---|---|---|
| committer | miod <> | 2014-08-07 20:02:23 +0000 |
| commit | cfb04bdfd0fc6c114e72a57e4c98cf38bd7ff605 (patch) | |
| tree | 3edb8354ad6b2884901d930a4a6006640b51962b /src/lib/libssl/t1_enc.c | |
| parent | 52fafe121652f8c5058ec964bbbf0d342db8037c (diff) | |
| download | openbsd-cfb04bdfd0fc6c114e72a57e4c98cf38bd7ff605.tar.gz openbsd-cfb04bdfd0fc6c114e72a57e4c98cf38bd7ff605.tar.bz2 openbsd-cfb04bdfd0fc6c114e72a57e4c98cf38bd7ff605.zip | |
Oops, revert changes commited by mistake. The previous commit was supposed
to only apply to s23_srvr.c.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/t1_enc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index bec8328269..6ad721bd8a 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: t1_enc.c,v 1.68 2014/08/07 19:46:31 miod Exp $ */ | 1 | /* $OpenBSD: t1_enc.c,v 1.69 2014/08/07 20:02:23 miod Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -319,7 +319,7 @@ tls1_aead_ctx_init(SSL_AEAD_CTX **aead_ctx) | |||
| 319 | 319 | ||
| 320 | static int | 320 | static int |
| 321 | tls1_change_cipher_state_aead(SSL *s, char is_read, const unsigned char *key, | 321 | tls1_change_cipher_state_aead(SSL *s, char is_read, const unsigned char *key, |
| 322 | unsigned int key_len, const unsigned char *iv, unsigned int iv_len) | 322 | unsigned key_len, const unsigned char *iv, unsigned iv_len) |
| 323 | { | 323 | { |
| 324 | const EVP_AEAD *aead = s->s3->tmp.new_aead; | 324 | const EVP_AEAD *aead = s->s3->tmp.new_aead; |
| 325 | SSL_AEAD_CTX *aead_ctx; | 325 | SSL_AEAD_CTX *aead_ctx; |
| @@ -856,7 +856,6 @@ tls1_enc(SSL *s, int send) | |||
| 856 | rec->length += pad; | 856 | rec->length += pad; |
| 857 | } | 857 | } |
| 858 | } else if ((bs != 1) && send) { | 858 | } else if ((bs != 1) && send) { |
| 859 | /* XXX divide by zero if bs == 0 (should not happen) */ | ||
| 860 | i = bs - ((int)l % bs); | 859 | i = bs - ((int)l % bs); |
| 861 | 860 | ||
| 862 | /* Add weird padding of upto 256 bytes */ | 861 | /* Add weird padding of upto 256 bytes */ |
| @@ -1121,7 +1120,7 @@ tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen, | |||
| 1121 | currentvalpos++; | 1120 | currentvalpos++; |
| 1122 | val[currentvalpos] = contextlen & 0xff; | 1121 | val[currentvalpos] = contextlen & 0xff; |
| 1123 | currentvalpos++; | 1122 | currentvalpos++; |
| 1124 | if (contextlen != 0 && context != NULL) { | 1123 | if ((contextlen > 0) || (context != NULL)) { |
| 1125 | memcpy(val + currentvalpos, context, contextlen); | 1124 | memcpy(val + currentvalpos, context, contextlen); |
| 1126 | } | 1125 | } |
| 1127 | } | 1126 | } |
