summaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-02-21 20:03:24 +0000
committerBen Laurie <ben@openssl.org>1999-02-21 20:03:24 +0000
commit06ab81f9f7b055a4456798cb9ef3266160438a08 (patch)
tree880b224a7f2e8224efeb0d4783ebe5e522d91c94 /ssl/s3_enc.c
parentabf87f79f7ebd7885e443f086a6e1a88b31f9af1 (diff)
Add support for new TLS export ciphersuites.
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r--ssl/s3_enc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index a655e12bec..d79d9272d6 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -141,7 +141,7 @@ int which;
MD5_CTX md;
int exp,n,i,j,k,cl;
- exp=(s->s3->tmp.new_cipher->algorithms & SSL_EXPORT)?1:0;
+ exp=SSL_C_IS_EXPORT(s->s3->tmp.new_cipher);
c=s->s3->tmp.new_sym_enc;
m=s->s3->tmp.new_hash;
if (s->s3->tmp.new_compression == NULL)
@@ -213,7 +213,8 @@ int which;
p=s->s3->tmp.key_block;
i=EVP_MD_size(m);
cl=EVP_CIPHER_key_length(c);
- j=exp ? (cl < 5 ? cl : 5) : cl;
+ j=exp ? (cl < SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher) ?
+ cl : SSL_C_EXPORT_KEYLENGTH(s->s3->tmp.new_cipher)) : cl;
/* Was j=(exp)?5:EVP_CIPHER_key_length(c); */
k=EVP_CIPHER_iv_length(c);
if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) ||
@@ -283,7 +284,7 @@ SSL *s;
unsigned char *p;
EVP_CIPHER *c;
EVP_MD *hash;
- int num,exp;
+ int num;
SSL_COMP *comp;
if (s->s3->tmp.key_block_length != 0)
@@ -299,8 +300,6 @@ SSL *s;
s->s3->tmp.new_hash=hash;
s->s3->tmp.new_compression=comp;
- exp=(s->session->cipher->algorithms & SSL_EXPORT)?1:0;
-
num=EVP_CIPHER_key_length(c)+EVP_MD_size(hash)+EVP_CIPHER_iv_length(c);
num*=2;