summaryrefslogtreecommitdiff
path: root/src/lib/libssl
diff options
context:
space:
mode:
authormarkus <>2002-09-05 22:44:52 +0000
committermarkus <>2002-09-05 22:44:52 +0000
commit715a204e4615e4a70a466fcb383a9a57cad5e6b8 (patch)
tree2d2e93c4a34d1f7f04aba73706353332d7700641 /src/lib/libssl
parent15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (diff)
downloadopenbsd-715a204e4615e4a70a466fcb383a9a57cad5e6b8.tar.gz
openbsd-715a204e4615e4a70a466fcb383a9a57cad5e6b8.tar.bz2
openbsd-715a204e4615e4a70a466fcb383a9a57cad5e6b8.zip
import openssl-0.9.7-beta3
Diffstat (limited to 'src/lib/libssl')
-rw-r--r--src/lib/libssl/s23_clnt.c2
-rw-r--r--src/lib/libssl/s23_pkt.c2
-rw-r--r--src/lib/libssl/s23_srvr.c2
-rw-r--r--src/lib/libssl/s3_both.c2
-rw-r--r--src/lib/libssl/s3_clnt.c15
-rw-r--r--src/lib/libssl/s3_lib.c8
-rw-r--r--src/lib/libssl/s3_pkt.c2
-rw-r--r--src/lib/libssl/s3_srvr.c20
-rw-r--r--src/lib/libssl/ssl.h46
-rw-r--r--src/lib/libssl/ssl_asn1.c4
-rw-r--r--src/lib/libssl/ssl_ciph.c15
-rw-r--r--src/lib/libssl/ssl_err.c4
-rw-r--r--src/lib/libssl/ssl_lib.c4
-rw-r--r--src/lib/libssl/ssl_locl.h15
-rw-r--r--src/lib/libssl/ssl_rsa.c2
-rw-r--r--src/lib/libssl/ssl_sess.c2
-rw-r--r--src/lib/libssl/t1_clnt.c2
-rw-r--r--src/lib/libssl/t1_enc.c27
-rw-r--r--src/lib/libssl/t1_srvr.c2
-rw-r--r--src/lib/libssl/test/tcrl6
-rw-r--r--src/lib/libssl/test/testca6
-rw-r--r--src/lib/libssl/test/testgen6
-rw-r--r--src/lib/libssl/test/tpkcs76
-rw-r--r--src/lib/libssl/test/tpkcs7d6
-rw-r--r--src/lib/libssl/test/treq6
-rw-r--r--src/lib/libssl/test/trsa6
-rw-r--r--src/lib/libssl/test/tsid6
-rw-r--r--src/lib/libssl/test/tx5096
-rw-r--r--src/lib/libssl/tls1.h31
29 files changed, 186 insertions, 75 deletions
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c
index b2be8340fb..019e9aecee 100644
--- a/src/lib/libssl/s23_clnt.c
+++ b/src/lib/libssl/s23_clnt.c
@@ -57,11 +57,11 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "ssl_locl.h"
60#include <openssl/buffer.h> 61#include <openssl/buffer.h>
61#include <openssl/rand.h> 62#include <openssl/rand.h>
62#include <openssl/objects.h> 63#include <openssl/objects.h>
63#include <openssl/evp.h> 64#include <openssl/evp.h>
64#include "ssl_locl.h"
65 65
66static SSL_METHOD *ssl23_get_client_method(int ver); 66static SSL_METHOD *ssl23_get_client_method(int ver);
67static int ssl23_client_hello(SSL *s); 67static int ssl23_client_hello(SSL *s);
diff --git a/src/lib/libssl/s23_pkt.c b/src/lib/libssl/s23_pkt.c
index f45e1ce3d8..4ca6a1b258 100644
--- a/src/lib/libssl/s23_pkt.c
+++ b/src/lib/libssl/s23_pkt.c
@@ -59,9 +59,9 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <errno.h> 60#include <errno.h>
61#define USE_SOCKETS 61#define USE_SOCKETS
62#include "ssl_locl.h"
62#include <openssl/evp.h> 63#include <openssl/evp.h>
63#include <openssl/buffer.h> 64#include <openssl/buffer.h>
64#include "ssl_locl.h"
65 65
66int ssl23_write_bytes(SSL *s) 66int ssl23_write_bytes(SSL *s)
67 { 67 {
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c
index 9e89cc7f9a..8743b61cbb 100644
--- a/src/lib/libssl/s23_srvr.c
+++ b/src/lib/libssl/s23_srvr.c
@@ -110,11 +110,11 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113#include "ssl_locl.h"
113#include <openssl/buffer.h> 114#include <openssl/buffer.h>
114#include <openssl/rand.h> 115#include <openssl/rand.h>
115#include <openssl/objects.h> 116#include <openssl/objects.h>
116#include <openssl/evp.h> 117#include <openssl/evp.h>
117#include "ssl_locl.h"
118 118
119static SSL_METHOD *ssl23_get_server_method(int ver); 119static SSL_METHOD *ssl23_get_server_method(int ver);
120int ssl23_get_client_hello(SSL *s); 120int ssl23_get_client_hello(SSL *s);
diff --git a/src/lib/libssl/s3_both.c b/src/lib/libssl/s3_both.c
index 58a24cd883..8864366f59 100644
--- a/src/lib/libssl/s3_both.c
+++ b/src/lib/libssl/s3_both.c
@@ -112,12 +112,12 @@
112#include <limits.h> 112#include <limits.h>
113#include <string.h> 113#include <string.h>
114#include <stdio.h> 114#include <stdio.h>
115#include "ssl_locl.h"
115#include <openssl/buffer.h> 116#include <openssl/buffer.h>
116#include <openssl/rand.h> 117#include <openssl/rand.h>
117#include <openssl/objects.h> 118#include <openssl/objects.h>
118#include <openssl/evp.h> 119#include <openssl/evp.h>
119#include <openssl/x509.h> 120#include <openssl/x509.h>
120#include "ssl_locl.h"
121 121
122/* send s->init_buf in records of type 'type' (SSL3_RT_HANDSHAKE or SSL3_RT_CHANGE_CIPHER_SPEC) */ 122/* send s->init_buf in records of type 'type' (SSL3_RT_HANDSHAKE or SSL3_RT_CHANGE_CIPHER_SPEC) */
123int ssl3_do_write(SSL *s, int type) 123int ssl3_do_write(SSL *s, int type)
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c
index e5853ede95..2699b5863b 100644
--- a/src/lib/libssl/s3_clnt.c
+++ b/src/lib/libssl/s3_clnt.c
@@ -110,13 +110,14 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113#include "ssl_locl.h"
114#include "kssl_lcl.h"
113#include <openssl/buffer.h> 115#include <openssl/buffer.h>
114#include <openssl/rand.h> 116#include <openssl/rand.h>
115#include <openssl/objects.h> 117#include <openssl/objects.h>
116#include <openssl/evp.h> 118#include <openssl/evp.h>
117#include "ssl_locl.h"
118#include "kssl_lcl.h"
119#include <openssl/md5.h> 119#include <openssl/md5.h>
120#include "cryptlib.h"
120 121
121static SSL_METHOD *ssl3_get_client_method(int ver); 122static SSL_METHOD *ssl3_get_client_method(int ver);
122static int ssl3_client_hello(SSL *s); 123static int ssl3_client_hello(SSL *s);
@@ -545,6 +546,7 @@ static int ssl3_client_hello(SSL *s)
545 *(p++)=i; 546 *(p++)=i;
546 if (i != 0) 547 if (i != 0)
547 { 548 {
549 die(i <= sizeof s->session->session_id);
548 memcpy(p,s->session->session_id,i); 550 memcpy(p,s->session->session_id,i);
549 p+=i; 551 p+=i;
550 } 552 }
@@ -626,6 +628,14 @@ static int ssl3_get_server_hello(SSL *s)
626 /* get the session-id */ 628 /* get the session-id */
627 j= *(p++); 629 j= *(p++);
628 630
631 if(j > sizeof s->session->session_id)
632 {
633 al=SSL_AD_ILLEGAL_PARAMETER;
634 SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,
635 SSL_R_SSL3_SESSION_ID_TOO_LONG);
636 goto f_err;
637 }
638
629 if ((j != 0) && (j != SSL3_SESSION_ID_SIZE)) 639 if ((j != 0) && (j != SSL3_SESSION_ID_SIZE))
630 { 640 {
631 /* SSLref returns 16 :-( */ 641 /* SSLref returns 16 :-( */
@@ -1588,6 +1598,7 @@ static int ssl3_send_client_key_exchange(SSL *s)
1588 SSL_MAX_MASTER_KEY_LENGTH); 1598 SSL_MAX_MASTER_KEY_LENGTH);
1589 EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl); 1599 EVP_EncryptFinal_ex(&ciph_ctx,&(epms[outl]),&padl);
1590 outl += padl; 1600 outl += padl;
1601 die(outl <= sizeof epms);
1591 EVP_CIPHER_CTX_cleanup(&ciph_ctx); 1602 EVP_CIPHER_CTX_cleanup(&ciph_ctx);
1592 1603
1593 /* KerberosWrapper.EncryptedPreMasterSecret */ 1604 /* KerberosWrapper.EncryptedPreMasterSecret */
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c
index 686992406c..14b2f13ae2 100644
--- a/src/lib/libssl/s3_lib.c
+++ b/src/lib/libssl/s3_lib.c
@@ -129,7 +129,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
129 SSL3_TXT_RSA_NULL_MD5, 129 SSL3_TXT_RSA_NULL_MD5,
130 SSL3_CK_RSA_NULL_MD5, 130 SSL3_CK_RSA_NULL_MD5,
131 SSL_kRSA|SSL_aRSA|SSL_eNULL |SSL_MD5|SSL_SSLV3, 131 SSL_kRSA|SSL_aRSA|SSL_eNULL |SSL_MD5|SSL_SSLV3,
132 SSL_NOT_EXP, 132 SSL_NOT_EXP|SSL_STRONG_NONE,
133 0, 133 0,
134 0, 134 0,
135 0, 135 0,
@@ -142,7 +142,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
142 SSL3_TXT_RSA_NULL_SHA, 142 SSL3_TXT_RSA_NULL_SHA,
143 SSL3_CK_RSA_NULL_SHA, 143 SSL3_CK_RSA_NULL_SHA,
144 SSL_kRSA|SSL_aRSA|SSL_eNULL |SSL_SHA1|SSL_SSLV3, 144 SSL_kRSA|SSL_aRSA|SSL_eNULL |SSL_SHA1|SSL_SSLV3,
145 SSL_NOT_EXP, 145 SSL_NOT_EXP|SSL_STRONG_NONE,
146 0, 146 0,
147 0, 147 0,
148 0, 148 0,
@@ -490,7 +490,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
490 SSL3_TXT_FZA_DMS_NULL_SHA, 490 SSL3_TXT_FZA_DMS_NULL_SHA,
491 SSL3_CK_FZA_DMS_NULL_SHA, 491 SSL3_CK_FZA_DMS_NULL_SHA,
492 SSL_kFZA|SSL_aFZA |SSL_eNULL |SSL_SHA1|SSL_SSLV3, 492 SSL_kFZA|SSL_aFZA |SSL_eNULL |SSL_SHA1|SSL_SSLV3,
493 SSL_NOT_EXP, 493 SSL_NOT_EXP|SSL_STRONG_NONE,
494 0, 494 0,
495 0, 495 0,
496 0, 496 0,
@@ -504,7 +504,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
504 SSL3_TXT_FZA_DMS_FZA_SHA, 504 SSL3_TXT_FZA_DMS_FZA_SHA,
505 SSL3_CK_FZA_DMS_FZA_SHA, 505 SSL3_CK_FZA_DMS_FZA_SHA,
506 SSL_kFZA|SSL_aFZA |SSL_eFZA |SSL_SHA1|SSL_SSLV3, 506 SSL_kFZA|SSL_aFZA |SSL_eFZA |SSL_SHA1|SSL_SSLV3,
507 SSL_NOT_EXP, 507 SSL_NOT_EXP|SSL_STRONG_NONE,
508 0, 508 0,
509 0, 509 0,
510 0, 510 0,
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c
index 43e8502b66..6ccea9aee5 100644
--- a/src/lib/libssl/s3_pkt.c
+++ b/src/lib/libssl/s3_pkt.c
@@ -112,9 +112,9 @@
112#include <stdio.h> 112#include <stdio.h>
113#include <errno.h> 113#include <errno.h>
114#define USE_SOCKETS 114#define USE_SOCKETS
115#include "ssl_locl.h"
115#include <openssl/evp.h> 116#include <openssl/evp.h>
116#include <openssl/buffer.h> 117#include <openssl/buffer.h>
117#include "ssl_locl.h"
118 118
119static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, 119static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
120 unsigned int len, int create_empty_fragment); 120 unsigned int len, int create_empty_fragment);
diff --git a/src/lib/libssl/s3_srvr.c b/src/lib/libssl/s3_srvr.c
index 99b6a86983..782b57f57a 100644
--- a/src/lib/libssl/s3_srvr.c
+++ b/src/lib/libssl/s3_srvr.c
@@ -114,15 +114,16 @@
114 114
115 115
116#include <stdio.h> 116#include <stdio.h>
117#include "ssl_locl.h"
118#include "kssl_lcl.h"
117#include <openssl/buffer.h> 119#include <openssl/buffer.h>
118#include <openssl/rand.h> 120#include <openssl/rand.h>
119#include <openssl/objects.h> 121#include <openssl/objects.h>
120#include <openssl/evp.h> 122#include <openssl/evp.h>
121#include <openssl/x509.h> 123#include <openssl/x509.h>
122#include <openssl/krb5_asn.h> 124#include <openssl/krb5_asn.h>
123#include "ssl_locl.h"
124#include "kssl_lcl.h"
125#include <openssl/md5.h> 125#include <openssl/md5.h>
126#include "cryptlib.h"
126 127
127static SSL_METHOD *ssl3_get_server_method(int ver); 128static SSL_METHOD *ssl3_get_server_method(int ver);
128static int ssl3_get_client_hello(SSL *s); 129static int ssl3_get_client_hello(SSL *s);
@@ -964,6 +965,7 @@ static int ssl3_send_server_hello(SSL *s)
964 s->session->session_id_length=0; 965 s->session->session_id_length=0;
965 966
966 sl=s->session->session_id_length; 967 sl=s->session->session_id_length;
968 die(sl <= sizeof s->session->session_id);
967 *(p++)=sl; 969 *(p++)=sl;
968 memcpy(p,s->session->session_id,sl); 970 memcpy(p,s->session->session_id,sl);
969 p+=sl; 971 p+=sl;
@@ -1559,8 +1561,8 @@ static int ssl3_get_client_key_exchange(SSL *s)
1559 EVP_CIPHER *enc = NULL; 1561 EVP_CIPHER *enc = NULL;
1560 unsigned char iv[EVP_MAX_IV_LENGTH]; 1562 unsigned char iv[EVP_MAX_IV_LENGTH];
1561 unsigned char pms[SSL_MAX_MASTER_KEY_LENGTH 1563 unsigned char pms[SSL_MAX_MASTER_KEY_LENGTH
1562 + EVP_MAX_IV_LENGTH + 1]; 1564 + EVP_MAX_BLOCK_LENGTH];
1563 int padl, outl = sizeof(pms); 1565 int padl, outl;
1564 krb5_timestamp authtime = 0; 1566 krb5_timestamp authtime = 0;
1565 krb5_ticket_times ttimes; 1567 krb5_ticket_times ttimes;
1566 1568
@@ -1583,6 +1585,16 @@ static int ssl3_get_client_key_exchange(SSL *s)
1583 enc_pms.data = (char *)p; 1585 enc_pms.data = (char *)p;
1584 p+=enc_pms.length; 1586 p+=enc_pms.length;
1585 1587
1588 /* Note that the length is checked again below,
1589 ** after decryption
1590 */
1591 if(enc.pms_length > sizeof pms)
1592 {
1593 SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
1594 SSL_R_DATA_LENGTH_TOO_LONG);
1595 goto err;
1596 }
1597
1586 if (n != enc_ticket.length + authenticator.length + 1598 if (n != enc_ticket.length + authenticator.length +
1587 enc_pms.length + 6) 1599 enc_pms.length + 6)
1588 { 1600 {
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index 833f761690..d9949e8eb2 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -253,7 +253,7 @@ extern "C" {
253#define SSL_TXT_RC4 "RC4" 253#define SSL_TXT_RC4 "RC4"
254#define SSL_TXT_RC2 "RC2" 254#define SSL_TXT_RC2 "RC2"
255#define SSL_TXT_IDEA "IDEA" 255#define SSL_TXT_IDEA "IDEA"
256#define SSL_TXT_AES "AESdraft" /* AES ciphersuites are not yet official (thus excluded from 'ALL') */ 256#define SSL_TXT_AES "AES"
257#define SSL_TXT_MD5 "MD5" 257#define SSL_TXT_MD5 "MD5"
258#define SSL_TXT_SHA1 "SHA1" 258#define SSL_TXT_SHA1 "SHA1"
259#define SSL_TXT_SHA "SHA" 259#define SSL_TXT_SHA "SHA"
@@ -266,6 +266,23 @@ extern "C" {
266#define SSL_TXT_TLSV1 "TLSv1" 266#define SSL_TXT_TLSV1 "TLSv1"
267#define SSL_TXT_ALL "ALL" 267#define SSL_TXT_ALL "ALL"
268 268
269/*
270 * COMPLEMENTOF* definitions. These identifiers are used to (de-select)
271 * ciphers normally not being used.
272 * Example: "RC4" will activate all ciphers using RC4 including ciphers
273 * without authentication, which would normally disabled by DEFAULT (due
274 * the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT"
275 * will make sure that it is also disabled in the specific selection.
276 * COMPLEMENTOF* identifiers are portable between version, as adjustments
277 * to the default cipher setup will also be included here.
278 *
279 * COMPLEMENTOFDEFAULT does not experience the same special treatment that
280 * DEFAULT gets, as only selection is being done and no sorting as needed
281 * for DEFAULT.
282 */
283#define SSL_TXT_CMPALL "COMPLEMENTOFALL"
284#define SSL_TXT_CMPDEF "COMPLEMENTOFDEFAULT"
285
269/* The following cipher list is used by default. 286/* The following cipher list is used by default.
270 * It also is substituted when an application-defined cipher list string 287 * It also is substituted when an application-defined cipher list string
271 * starts with 'DEFAULT'. */ 288 * starts with 'DEFAULT'. */
@@ -429,6 +446,7 @@ typedef struct ssl_session_st
429 struct ssl_session_st *prev,*next; 446 struct ssl_session_st *prev,*next;
430 } SSL_SESSION; 447 } SSL_SESSION;
431 448
449
432#define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L 450#define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L
433#define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L 451#define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L
434#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L 452#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L
@@ -439,6 +457,19 @@ typedef struct ssl_session_st
439#define SSL_OP_TLS_D5_BUG 0x00000100L 457#define SSL_OP_TLS_D5_BUG 0x00000100L
440#define SSL_OP_TLS_BLOCK_PADDING_BUG 0x00000200L 458#define SSL_OP_TLS_BLOCK_PADDING_BUG 0x00000200L
441 459
460/* Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added
461 * in OpenSSL 0.9.6d. Usually (depending on the application protocol)
462 * the workaround is not needed. Unfortunately some broken SSL/TLS
463 * implementations cannot handle it at all, which is why we include
464 * it in SSL_OP_ALL. */
465#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 0x00000800L /* added in 0.9.6e */
466
467/* SSL_OP_ALL: various bug workarounds that should be rather harmless.
468 * This used to be 0x000FFFFFL before 0.9.7. */
469#define SSL_OP_ALL 0x00000FFFL
470
471/* As server, disallow session resumption on renegotiation */
472#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L
442/* If set, always create a new key when using tmp_dh parameters */ 473/* If set, always create a new key when using tmp_dh parameters */
443#define SSL_OP_SINGLE_DH_USE 0x00100000L 474#define SSL_OP_SINGLE_DH_USE 0x00100000L
444/* Set to always use the tmp_rsa key when doing RSA operations, 475/* Set to always use the tmp_rsa key when doing RSA operations,
@@ -452,8 +483,10 @@ typedef struct ssl_session_st
452 * (version 3.1) was announced in the client hello. Normally this is 483 * (version 3.1) was announced in the client hello. Normally this is
453 * forbidden to prevent version rollback attacks. */ 484 * forbidden to prevent version rollback attacks. */
454#define SSL_OP_TLS_ROLLBACK_BUG 0x00800000L 485#define SSL_OP_TLS_ROLLBACK_BUG 0x00800000L
455/* As server, disallow session resumption on renegotiation */ 486
456#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x01000000L 487#define SSL_OP_NO_SSLv2 0x01000000L
488#define SSL_OP_NO_SSLv3 0x02000000L
489#define SSL_OP_NO_TLSv1 0x04000000L
457 490
458/* The next flag deliberately changes the ciphertest, this is a check 491/* The next flag deliberately changes the ciphertest, this is a check
459 * for the PKCS#1 attack */ 492 * for the PKCS#1 attack */
@@ -461,11 +494,7 @@ typedef struct ssl_session_st
461#define SSL_OP_PKCS1_CHECK_2 0x10000000L 494#define SSL_OP_PKCS1_CHECK_2 0x10000000L
462#define SSL_OP_NETSCAPE_CA_DN_BUG 0x20000000L 495#define SSL_OP_NETSCAPE_CA_DN_BUG 0x20000000L
463#define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x40000000L 496#define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x40000000L
464#define SSL_OP_ALL 0x000FFFFFL
465 497
466#define SSL_OP_NO_SSLv2 0x01000000L
467#define SSL_OP_NO_SSLv3 0x02000000L
468#define SSL_OP_NO_TLSv1 0x04000000L
469 498
470/* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success 499/* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success
471 * when just a single record has been written): */ 500 * when just a single record has been written): */
@@ -479,6 +508,7 @@ typedef struct ssl_session_st
479 * is blocking: */ 508 * is blocking: */
480#define SSL_MODE_AUTO_RETRY 0x00000004L 509#define SSL_MODE_AUTO_RETRY 0x00000004L
481 510
511
482/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, 512/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value,
483 * they cannot be used to clear bits. */ 513 * they cannot be used to clear bits. */
484 514
@@ -1637,6 +1667,7 @@ void ERR_load_SSL_strings(void);
1637#define SSL_R_INVALID_COMMAND 280 1667#define SSL_R_INVALID_COMMAND 280
1638#define SSL_R_INVALID_PURPOSE 278 1668#define SSL_R_INVALID_PURPOSE 278
1639#define SSL_R_INVALID_TRUST 279 1669#define SSL_R_INVALID_TRUST 279
1670#define SSL_R_KEY_ARG_TOO_LONG 1112
1640#define SSL_R_KRB5 1104 1671#define SSL_R_KRB5 1104
1641#define SSL_R_KRB5_C_CC_PRINC 1094 1672#define SSL_R_KRB5_C_CC_PRINC 1094
1642#define SSL_R_KRB5_C_GET_CRED 1095 1673#define SSL_R_KRB5_C_GET_CRED 1095
@@ -1716,6 +1747,7 @@ void ERR_load_SSL_strings(void);
1716#define SSL_R_SHORT_READ 219 1747#define SSL_R_SHORT_READ 219
1717#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220 1748#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220
1718#define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221 1749#define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221
1750#define SSL_R_SSL3_SESSION_ID_TOO_LONG 1113
1719#define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222 1751#define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222
1720#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 1752#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042
1721#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 1753#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020
diff --git a/src/lib/libssl/ssl_asn1.c b/src/lib/libssl/ssl_asn1.c
index c5eeeb6bc5..1638c6b525 100644
--- a/src/lib/libssl/ssl_asn1.c
+++ b/src/lib/libssl/ssl_asn1.c
@@ -58,10 +58,11 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include <stdlib.h> 60#include <stdlib.h>
61#include "ssl_locl.h"
61#include <openssl/asn1_mac.h> 62#include <openssl/asn1_mac.h>
62#include <openssl/objects.h> 63#include <openssl/objects.h>
63#include <openssl/x509.h> 64#include <openssl/x509.h>
64#include "ssl_locl.h" 65#include "cryptlib.h"
65 66
66typedef struct ssl_session_asn1_st 67typedef struct ssl_session_asn1_st
67 { 68 {
@@ -296,6 +297,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, unsigned char **pp,
296 os.length=i; 297 os.length=i;
297 298
298 ret->session_id_length=os.length; 299 ret->session_id_length=os.length;
300 die(os.length <= sizeof ret->session_id);
299 memcpy(ret->session_id,os.data,os.length); 301 memcpy(ret->session_id,os.data,os.length);
300 302
301 M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING); 303 M_ASN1_D2I_get(osp,d2i_ASN1_OCTET_STRING);
diff --git a/src/lib/libssl/ssl_ciph.c b/src/lib/libssl/ssl_ciph.c
index cdd8dde128..37f58886a6 100644
--- a/src/lib/libssl/ssl_ciph.c
+++ b/src/lib/libssl/ssl_ciph.c
@@ -100,9 +100,10 @@ typedef struct cipher_order_st
100 } CIPHER_ORDER; 100 } CIPHER_ORDER;
101 101
102static const SSL_CIPHER cipher_aliases[]={ 102static const SSL_CIPHER cipher_aliases[]={
103 /* Don't include eNULL unless specifically enabled. 103 /* Don't include eNULL unless specifically enabled. */
104 * Similarly, don't include AES in ALL because these ciphers are not yet official. */ 104 {0,SSL_TXT_ALL, 0,SSL_ALL & ~SSL_eNULL, SSL_ALL ,0,0,0,SSL_ALL,SSL_ALL}, /* must be first */
105 {0,SSL_TXT_ALL, 0,SSL_ALL & ~SSL_eNULL & ~SSL_AES, SSL_ALL ,0,0,0,SSL_ALL,SSL_ALL}, /* must be first */ 105 {0,SSL_TXT_CMPALL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0}, /* COMPLEMENT OF ALL */
106 {0,SSL_TXT_CMPDEF,0,SSL_ADH, 0,0,0,0,SSL_AUTH_MASK,0},
106 {0,SSL_TXT_kKRB5,0,SSL_kKRB5,0,0,0,0,SSL_MKEY_MASK,0}, /* VRS Kerberos5 */ 107 {0,SSL_TXT_kKRB5,0,SSL_kKRB5,0,0,0,0,SSL_MKEY_MASK,0}, /* VRS Kerberos5 */
107 {0,SSL_TXT_kRSA,0,SSL_kRSA, 0,0,0,0,SSL_MKEY_MASK,0}, 108 {0,SSL_TXT_kRSA,0,SSL_kRSA, 0,0,0,0,SSL_MKEY_MASK,0},
108 {0,SSL_TXT_kDHr,0,SSL_kDHr, 0,0,0,0,SSL_MKEY_MASK,0}, 109 {0,SSL_TXT_kDHr,0,SSL_kDHr, 0,0,0,0,SSL_MKEY_MASK,0},
@@ -999,10 +1000,10 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
999 case SSL_AES: 1000 case SSL_AES:
1000 switch(cipher->strength_bits) 1001 switch(cipher->strength_bits)
1001 { 1002 {
1002 case 128: enc="AESdraft(128)"; break; 1003 case 128: enc="AES(128)"; break;
1003 case 192: enc="AESdraft(192)"; break; 1004 case 192: enc="AES(192)"; break;
1004 case 256: enc="AESdraft(256)"; break; 1005 case 256: enc="AES(256)"; break;
1005 default: enc="AESdraft(?""?""?)"; break; 1006 default: enc="AES(?""?""?)"; break;
1006 } 1007 }
1007 break; 1008 break;
1008 default: 1009 default:
diff --git a/src/lib/libssl/ssl_err.c b/src/lib/libssl/ssl_err.c
index c32c4ef6e9..0cad32c855 100644
--- a/src/lib/libssl/ssl_err.c
+++ b/src/lib/libssl/ssl_err.c
@@ -1,6 +1,6 @@
1/* ssl/ssl_err.c */ 1/* ssl/ssl_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -275,6 +275,7 @@ static ERR_STRING_DATA SSL_str_reasons[]=
275{SSL_R_INVALID_COMMAND ,"invalid command"}, 275{SSL_R_INVALID_COMMAND ,"invalid command"},
276{SSL_R_INVALID_PURPOSE ,"invalid purpose"}, 276{SSL_R_INVALID_PURPOSE ,"invalid purpose"},
277{SSL_R_INVALID_TRUST ,"invalid trust"}, 277{SSL_R_INVALID_TRUST ,"invalid trust"},
278{SSL_R_KEY_ARG_TOO_LONG ,"key arg too long"},
278{SSL_R_KRB5 ,"krb5"}, 279{SSL_R_KRB5 ,"krb5"},
279{SSL_R_KRB5_C_CC_PRINC ,"krb5 client cc principal (no tkt?)"}, 280{SSL_R_KRB5_C_CC_PRINC ,"krb5 client cc principal (no tkt?)"},
280{SSL_R_KRB5_C_GET_CRED ,"krb5 client get cred"}, 281{SSL_R_KRB5_C_GET_CRED ,"krb5 client get cred"},
@@ -354,6 +355,7 @@ static ERR_STRING_DATA SSL_str_reasons[]=
354{SSL_R_SHORT_READ ,"short read"}, 355{SSL_R_SHORT_READ ,"short read"},
355{SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE,"signature for non signing certificate"}, 356{SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE,"signature for non signing certificate"},
356{SSL_R_SSL23_DOING_SESSION_ID_REUSE ,"ssl23 doing session id reuse"}, 357{SSL_R_SSL23_DOING_SESSION_ID_REUSE ,"ssl23 doing session id reuse"},
358{SSL_R_SSL3_SESSION_ID_TOO_LONG ,"ssl3 session id too long"},
357{SSL_R_SSL3_SESSION_ID_TOO_SHORT ,"ssl3 session id too short"}, 359{SSL_R_SSL3_SESSION_ID_TOO_SHORT ,"ssl3 session id too short"},
358{SSL_R_SSLV3_ALERT_BAD_CERTIFICATE ,"sslv3 alert bad certificate"}, 360{SSL_R_SSLV3_ALERT_BAD_CERTIFICATE ,"sslv3 alert bad certificate"},
359{SSL_R_SSLV3_ALERT_BAD_RECORD_MAC ,"sslv3 alert bad record mac"}, 361{SSL_R_SSLV3_ALERT_BAD_RECORD_MAC ,"sslv3 alert bad record mac"},
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index df307a80c5..ab172aeaec 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -116,11 +116,11 @@
116# include <assert.h> 116# include <assert.h>
117#endif 117#endif
118#include <stdio.h> 118#include <stdio.h>
119#include "ssl_locl.h"
120#include "kssl_lcl.h"
119#include <openssl/objects.h> 121#include <openssl/objects.h>
120#include <openssl/lhash.h> 122#include <openssl/lhash.h>
121#include <openssl/x509v3.h> 123#include <openssl/x509v3.h>
122#include "ssl_locl.h"
123#include "kssl_lcl.h"
124 124
125const char *SSL_version_str=OPENSSL_VERSION_TEXT; 125const char *SSL_version_str=OPENSSL_VERSION_TEXT;
126 126
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 17e9bef832..fe4ac839cf 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -293,16 +293,17 @@
293#define SSL_NOT_EXP 0x00000001L 293#define SSL_NOT_EXP 0x00000001L
294#define SSL_EXPORT 0x00000002L 294#define SSL_EXPORT 0x00000002L
295 295
296#define SSL_STRONG_MASK 0x0000007cL 296#define SSL_STRONG_MASK 0x000000fcL
297#define SSL_EXP40 0x00000004L 297#define SSL_STRONG_NONE 0x00000004L
298#define SSL_EXP40 0x00000008L
298#define SSL_MICRO (SSL_EXP40) 299#define SSL_MICRO (SSL_EXP40)
299#define SSL_EXP56 0x00000008L 300#define SSL_EXP56 0x00000010L
300#define SSL_MINI (SSL_EXP56) 301#define SSL_MINI (SSL_EXP56)
301#define SSL_LOW 0x00000010L 302#define SSL_LOW 0x00000020L
302#define SSL_MEDIUM 0x00000020L 303#define SSL_MEDIUM 0x00000040L
303#define SSL_HIGH 0x00000040L 304#define SSL_HIGH 0x00000080L
304 305
305/* we have used 0000007f - 25 bits left to go */ 306/* we have used 000000ff - 24 bits left to go */
306 307
307/* 308/*
308 * Macros to check the export status and cipher strength for export ciphers. 309 * Macros to check the export status and cipher strength for export ciphers.
diff --git a/src/lib/libssl/ssl_rsa.c b/src/lib/libssl/ssl_rsa.c
index 1cf8e20934..03828b6632 100644
--- a/src/lib/libssl/ssl_rsa.c
+++ b/src/lib/libssl/ssl_rsa.c
@@ -57,12 +57,12 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "ssl_locl.h"
60#include <openssl/bio.h> 61#include <openssl/bio.h>
61#include <openssl/objects.h> 62#include <openssl/objects.h>
62#include <openssl/evp.h> 63#include <openssl/evp.h>
63#include <openssl/x509.h> 64#include <openssl/x509.h>
64#include <openssl/pem.h> 65#include <openssl/pem.h>
65#include "ssl_locl.h"
66 66
67static int ssl_set_cert(CERT *c, X509 *x509); 67static int ssl_set_cert(CERT *c, X509 *x509);
68static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey); 68static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey);
diff --git a/src/lib/libssl/ssl_sess.c b/src/lib/libssl/ssl_sess.c
index 6424f775e2..8bfc382bb6 100644
--- a/src/lib/libssl/ssl_sess.c
+++ b/src/lib/libssl/ssl_sess.c
@@ -60,6 +60,7 @@
60#include <openssl/lhash.h> 60#include <openssl/lhash.h>
61#include <openssl/rand.h> 61#include <openssl/rand.h>
62#include "ssl_locl.h" 62#include "ssl_locl.h"
63#include "cryptlib.h"
63 64
64static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); 65static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
65static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s); 66static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s);
@@ -250,6 +251,7 @@ int ssl_get_new_session(SSL *s, int session)
250 ss->session_id_length=0; 251 ss->session_id_length=0;
251 } 252 }
252 253
254 die(s->sid_ctx_length <= sizeof ss->sid_ctx);
253 memcpy(ss->sid_ctx,s->sid_ctx,s->sid_ctx_length); 255 memcpy(ss->sid_ctx,s->sid_ctx,s->sid_ctx_length);
254 ss->sid_ctx_length=s->sid_ctx_length; 256 ss->sid_ctx_length=s->sid_ctx_length;
255 s->session=ss; 257 s->session=ss;
diff --git a/src/lib/libssl/t1_clnt.c b/src/lib/libssl/t1_clnt.c
index 9745630a00..9ad518f9f4 100644
--- a/src/lib/libssl/t1_clnt.c
+++ b/src/lib/libssl/t1_clnt.c
@@ -57,11 +57,11 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "ssl_locl.h"
60#include <openssl/buffer.h> 61#include <openssl/buffer.h>
61#include <openssl/rand.h> 62#include <openssl/rand.h>
62#include <openssl/objects.h> 63#include <openssl/objects.h>
63#include <openssl/evp.h> 64#include <openssl/evp.h>
64#include "ssl_locl.h"
65 65
66static SSL_METHOD *tls1_get_client_method(int ver); 66static SSL_METHOD *tls1_get_client_method(int ver);
67static SSL_METHOD *tls1_get_client_method(int ver) 67static SSL_METHOD *tls1_get_client_method(int ver)
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c
index b80525f3ba..5290bf6665 100644
--- a/src/lib/libssl/t1_enc.c
+++ b/src/lib/libssl/t1_enc.c
@@ -110,10 +110,10 @@
110 */ 110 */
111 111
112#include <stdio.h> 112#include <stdio.h>
113#include "ssl_locl.h"
113#include <openssl/comp.h> 114#include <openssl/comp.h>
114#include <openssl/evp.h> 115#include <openssl/evp.h>
115#include <openssl/hmac.h> 116#include <openssl/hmac.h>
116#include "ssl_locl.h"
117#include <openssl/md5.h> 117#include <openssl/md5.h>
118 118
119static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec, 119static void tls1_P_hash(const EVP_MD *md, const unsigned char *sec,
@@ -483,14 +483,25 @@ printf("\nkey block\n");
483{ int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); } 483{ int z; for (z=0; z<num; z++) printf("%02X%c",p1[z],((z+1)%16)?' ':'\n'); }
484#endif 484#endif
485 485
486 /* enable vulnerability countermeasure for CBC ciphers with 486 if (!(s->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS))
487 * known-IV problem (http://www.openssl.org/~bodo/tls-cbc.txt) */ 487 {
488 s->s3->need_empty_fragments = 1; 488 /* enable vulnerability countermeasure for CBC ciphers with
489#ifndef NO_RC4 489 * known-IV problem (http://www.openssl.org/~bodo/tls-cbc.txt)
490 if ((s->session->cipher != NULL) && ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)) 490 */
491 s->s3->need_empty_fragments = 0; 491 s->s3->need_empty_fragments = 1;
492
493 if (s->session->cipher != NULL)
494 {
495 if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_eNULL)
496 s->s3->need_empty_fragments = 0;
497
498#ifndef OPENSSL_NO_RC4
499 if ((s->session->cipher->algorithms & SSL_ENC_MASK) == SSL_RC4)
500 s->s3->need_empty_fragments = 0;
492#endif 501#endif
493 502 }
503 }
504
494 return(1); 505 return(1);
495err: 506err:
496 SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,ERR_R_MALLOC_FAILURE); 507 SSLerr(SSL_F_TLS1_SETUP_KEY_BLOCK,ERR_R_MALLOC_FAILURE);
diff --git a/src/lib/libssl/t1_srvr.c b/src/lib/libssl/t1_srvr.c
index 996b7ca8e2..6e765e587f 100644
--- a/src/lib/libssl/t1_srvr.c
+++ b/src/lib/libssl/t1_srvr.c
@@ -57,12 +57,12 @@
57 */ 57 */
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "ssl_locl.h"
60#include <openssl/buffer.h> 61#include <openssl/buffer.h>
61#include <openssl/rand.h> 62#include <openssl/rand.h>
62#include <openssl/objects.h> 63#include <openssl/objects.h>
63#include <openssl/evp.h> 64#include <openssl/evp.h>
64#include <openssl/x509.h> 65#include <openssl/x509.h>
65#include "ssl_locl.h"
66 66
67static SSL_METHOD *tls1_get_server_method(int ver); 67static SSL_METHOD *tls1_get_server_method(int ver);
68static SSL_METHOD *tls1_get_server_method(int ver) 68static SSL_METHOD *tls1_get_server_method(int ver)
diff --git a/src/lib/libssl/test/tcrl b/src/lib/libssl/test/tcrl
index acaf8f3c47..f71ef7a863 100644
--- a/src/lib/libssl/test/tcrl
+++ b/src/lib/libssl/test/tcrl
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=../apps:$PATH 3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
4export PATH 8export PATH
5 9
6cmd='../apps/openssl crl' 10cmd='../apps/openssl crl'
diff --git a/src/lib/libssl/test/testca b/src/lib/libssl/test/testca
index 88c186b6ab..8215ebb5d1 100644
--- a/src/lib/libssl/test/testca
+++ b/src/lib/libssl/test/testca
@@ -1,7 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3SH="/bin/sh" 3SH="/bin/sh"
4PATH=../apps:$PATH 4if test "$OSTYPE" = msdosdjgpp; then
5 PATH=./apps\;../apps\;$PATH
6else
7 PATH=../apps:$PATH
8fi
5export SH PATH 9export SH PATH
6 10
7SSLEAY_CONFIG="-config CAss.cnf" 11SSLEAY_CONFIG="-config CAss.cnf"
diff --git a/src/lib/libssl/test/testgen b/src/lib/libssl/test/testgen
index 6a4b6b9221..55c496f4bc 100644
--- a/src/lib/libssl/test/testgen
+++ b/src/lib/libssl/test/testgen
@@ -6,7 +6,11 @@ CA=../certs/testca.pem
6 6
7/bin/rm -f $T.1 $T.2 $T.key 7/bin/rm -f $T.1 $T.2 $T.key
8 8
9PATH=../apps:$PATH; 9if test "$OSTYPE" = msdosdjgpp; then
10 PATH=../apps\;$PATH;
11else
12 PATH=../apps:$PATH;
13fi
10export PATH 14export PATH
11 15
12echo "generating certificate request" 16echo "generating certificate request"
diff --git a/src/lib/libssl/test/tpkcs7 b/src/lib/libssl/test/tpkcs7
index 15bbba42c0..cf3bd9fadb 100644
--- a/src/lib/libssl/test/tpkcs7
+++ b/src/lib/libssl/test/tpkcs7
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=../apps:$PATH 3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
4export PATH 8export PATH
5 9
6cmd='../apps/openssl pkcs7' 10cmd='../apps/openssl pkcs7'
diff --git a/src/lib/libssl/test/tpkcs7d b/src/lib/libssl/test/tpkcs7d
index 46e5aa2bd6..18f9311b06 100644
--- a/src/lib/libssl/test/tpkcs7d
+++ b/src/lib/libssl/test/tpkcs7d
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=../apps:$PATH 3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
4export PATH 8export PATH
5 9
6cmd='../apps/openssl pkcs7' 10cmd='../apps/openssl pkcs7'
diff --git a/src/lib/libssl/test/treq b/src/lib/libssl/test/treq
index 9f5eb7eea5..47a8273cde 100644
--- a/src/lib/libssl/test/treq
+++ b/src/lib/libssl/test/treq
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=../apps:$PATH 3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
4export PATH 8export PATH
5 9
6cmd='../apps/openssl req -config ../apps/openssl.cnf' 10cmd='../apps/openssl req -config ../apps/openssl.cnf'
diff --git a/src/lib/libssl/test/trsa b/src/lib/libssl/test/trsa
index bd6c07650a..413e2ec0a0 100644
--- a/src/lib/libssl/test/trsa
+++ b/src/lib/libssl/test/trsa
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=../apps:$PATH 3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
4export PATH 8export PATH
5 9
6if ../apps/openssl no-rsa; then 10if ../apps/openssl no-rsa; then
diff --git a/src/lib/libssl/test/tsid b/src/lib/libssl/test/tsid
index 9e0854516c..40a1dfa97c 100644
--- a/src/lib/libssl/test/tsid
+++ b/src/lib/libssl/test/tsid
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=../apps:$PATH 3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
4export PATH 8export PATH
5 9
6cmd='../apps/openssl sess_id' 10cmd='../apps/openssl sess_id'
diff --git a/src/lib/libssl/test/tx509 b/src/lib/libssl/test/tx509
index 35169f3a43..d380963abc 100644
--- a/src/lib/libssl/test/tx509
+++ b/src/lib/libssl/test/tx509
@@ -1,6 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3PATH=../apps:$PATH 3if test "$OSTYPE" = msdosdjgpp; then
4 PATH=../apps\;$PATH
5else
6 PATH=../apps:$PATH
7fi
4export PATH 8export PATH
5 9
6cmd='../apps/openssl x509' 10cmd='../apps/openssl x509'
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h
index 88ec5fb527..38838ea9a5 100644
--- a/src/lib/libssl/tls1.h
+++ b/src/lib/libssl/tls1.h
@@ -96,7 +96,7 @@ extern "C" {
96#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065 96#define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065
97#define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066 97#define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066
98 98
99 /* AES ciphersuites from draft ietf-tls-ciphersuite-03.txt */ 99/* AES ciphersuites from RFC3268 */
100 100
101#define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F 101#define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F
102#define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030 102#define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030
@@ -126,20 +126,21 @@ extern "C" {
126#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA "EXP1024-RC4-SHA" 126#define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA "EXP1024-RC4-SHA"
127#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA "EXP1024-DHE-DSS-RC4-SHA" 127#define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA "EXP1024-DHE-DSS-RC4-SHA"
128#define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA" 128#define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA"
129 /* AES ciphersuites from draft-ietf-tls-ciphersuite-06.txt */ 129
130#define TLS1_TXT_RSA_WITH_AES_128_SHA "AESdraft128-SHA" 130/* AES ciphersuites from RFC3268 */
131#define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AESdraft128-SHA" 131#define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA"
132#define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AESdraft128-SHA" 132#define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA"
133#define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AESdraft128-SHA" 133#define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA"
134#define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AESdraft128-SHA" 134#define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA"
135#define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AESdraft128-SHA" 135#define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA"
136 136#define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA"
137#define TLS1_TXT_RSA_WITH_AES_256_SHA "AESdraft256-SHA" 137
138#define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AESdraft256-SHA" 138#define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA"
139#define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AESdraft256-SHA" 139#define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA"
140#define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AESdraft256-SHA" 140#define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA"
141#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AESdraft256-SHA" 141#define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA"
142#define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AESdraft256-SHA" 142#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA"
143#define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA"
143 144
144 145
145#define TLS_CT_RSA_SIGN 1 146#define TLS_CT_RSA_SIGN 1