Compare commits
20 Commits
OpenSSL_0_
...
OpenSSL_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84c1d096e4 | ||
|
|
39c06a8b73 | ||
|
|
c0a48f4cfd | ||
|
|
1254766dad | ||
|
|
b73de7334a | ||
|
|
a71f9eeb9f | ||
|
|
d76434fe5a | ||
|
|
ac3b89d8e5 | ||
|
|
e59199444c | ||
|
|
90f6da7be5 | ||
|
|
ad4875986f | ||
|
|
b2359d5116 | ||
|
|
84d964a59f | ||
|
|
6c8aa1ec9c | ||
|
|
6d62e85d84 | ||
|
|
a01461da99 | ||
|
|
9576c150a4 | ||
|
|
56f940edc9 | ||
|
|
aa61140a59 | ||
|
|
8ca0db580e |
14
CHANGES
14
CHANGES
@@ -2,7 +2,19 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.6g and 0.9.6h [21 Dec 2002]
|
||||
Changes between 0.9.6h and 0.9.6i [19 Feb 2003]
|
||||
|
||||
*) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
|
||||
via timing by performing a MAC computation even if incorrrect
|
||||
block cipher padding has been found. This is a countermeasure
|
||||
against active attacks where the attacker has to distinguish
|
||||
between bad padding and a MAC verification error. (CAN-2003-0078)
|
||||
|
||||
[Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
|
||||
Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
|
||||
Martin Vuagnoux (EPFL, Ilion)]
|
||||
|
||||
Changes between 0.9.6g and 0.9.6h [5 Dec 2002]
|
||||
|
||||
*) New function OPENSSL_cleanse(), which is used to cleanse a section of
|
||||
memory from it's contents. This is done with a counter that will
|
||||
|
||||
48
FAQ
48
FAQ
@@ -63,7 +63,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 0.9.6h was released on 5 December 2002.
|
||||
OpenSSL 0.9.7a was released on February 19, 2003.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@@ -184,18 +184,30 @@ for permission to use their software with OpenSSL.
|
||||
|
||||
Cryptographic software needs a source of unpredictable data to work
|
||||
correctly. Many open source operating systems provide a "randomness
|
||||
device" that serves this purpose. On other systems, applications have
|
||||
to call the RAND_add() or RAND_seed() function with appropriate data
|
||||
before generating keys or performing public key encryption.
|
||||
(These functions initialize the pseudo-random number generator, PRNG.)
|
||||
device" (/dev/urandom or /dev/random) that serves this purpose.
|
||||
All OpenSSL versions try to use /dev/urandom by default; starting with
|
||||
version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not
|
||||
available.
|
||||
|
||||
Some broken applications do not do this. As of version 0.9.5, the
|
||||
OpenSSL functions that need randomness report an error if the random
|
||||
number generator has not been seeded with at least 128 bits of
|
||||
randomness. If this error occurs, please contact the author of the
|
||||
application you are using. It is likely that it never worked
|
||||
correctly. OpenSSL 0.9.5 and later make the error visible by refusing
|
||||
to perform potentially insecure encryption.
|
||||
On other systems, applications have to call the RAND_add() or
|
||||
RAND_seed() function with appropriate data before generating keys or
|
||||
performing public key encryption. (These functions initialize the
|
||||
pseudo-random number generator, PRNG.) Some broken applications do
|
||||
not do this. As of version 0.9.5, the OpenSSL functions that need
|
||||
randomness report an error if the random number generator has not been
|
||||
seeded with at least 128 bits of randomness. If this error occurs and
|
||||
is not discussed in the documentation of the application you are
|
||||
using, please contact the author of that application; it is likely
|
||||
that it never worked correctly. OpenSSL 0.9.5 and later make the
|
||||
error visible by refusing to perform potentially insecure encryption.
|
||||
|
||||
If you are using Solaris 8, you can add /dev/urandom and /dev/random
|
||||
devices by installing patch 112438 (Sparc) or 112439 (x86), which are
|
||||
available via the Patchfinder at <URL: http://sunsolve.sun.com>
|
||||
(Solaris 9 includes these devices by default). For /dev/random support
|
||||
for earlier Solaris versions, see Sun's statement at
|
||||
<URL: http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski>
|
||||
(the SUNWski package is available in patch 105710).
|
||||
|
||||
On systems without /dev/urandom and /dev/random, it is a good idea to
|
||||
use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for
|
||||
@@ -228,18 +240,6 @@ OpenSSL command line tools. Applications using the OpenSSL library
|
||||
provide their own configuration options to specify the entropy source,
|
||||
please check out the documentation coming the with application.
|
||||
|
||||
For Solaris 2.6, Tim Nibbe <tnibbe@sprint.net> and others have suggested
|
||||
installing the SUNski package from Sun patch 105710-01 (Sparc) which
|
||||
adds a /dev/random device and make sure it gets used, usually through
|
||||
$RANDFILE. There are probably similar patches for the other Solaris
|
||||
versions. An official statement from Sun with respect to /dev/random
|
||||
support can be found at
|
||||
http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski
|
||||
However, be warned that /dev/random is usually a blocking device, which
|
||||
may have some effects on OpenSSL.
|
||||
A third party /dev/random solution for Solaris is available at
|
||||
http://www.cosy.sbg.ac.at/~andi/
|
||||
|
||||
|
||||
* Why do I get an "unable to write 'random state'" error message?
|
||||
|
||||
|
||||
6
INSTALL
6
INSTALL
@@ -129,8 +129,8 @@
|
||||
standard headers). If it is a problem with OpenSSL itself, please
|
||||
report the problem to <openssl-bugs@openssl.org> (note that your
|
||||
message will be recorded in the request tracker publicly readable
|
||||
via http://www.openssl.org/rt2.html and will be forwarded to a public
|
||||
mailing list). Include the output of "make report" in your message.
|
||||
via http://www.openssl.org/support/rt2.html and will be forwarded to a
|
||||
public mailing list). Include the output of "make report" in your message.
|
||||
Please check out the request tracker. Maybe the bug was already
|
||||
reported or has already been fixed.
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
in Makefile.ssl and run "make clean; make". Please send a bug
|
||||
report to <openssl-bugs@openssl.org>, including the output of
|
||||
"make report" in order to be added to the request tracker at
|
||||
http://www.openssl.org/rt2.html.
|
||||
http://www.openssl.org/support/rt2.html.
|
||||
|
||||
4. If everything tests ok, install OpenSSL with
|
||||
|
||||
|
||||
4
NEWS
4
NEWS
@@ -5,6 +5,10 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i:
|
||||
|
||||
o Important security related bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h:
|
||||
|
||||
o New configuration targets for Tandem OSS and A/UX.
|
||||
|
||||
4
README
4
README
@@ -1,7 +1,7 @@
|
||||
|
||||
OpenSSL 0.9.6h 5 Dec 2002
|
||||
OpenSSL 0.9.6i Feb 19 2003
|
||||
|
||||
Copyright (c) 1998-2002 The OpenSSL Project
|
||||
Copyright (c) 1998-2003 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
All rights reserved.
|
||||
|
||||
|
||||
7
STATUS
7
STATUS
@@ -1,10 +1,13 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2002/12/05 21:40:43 $
|
||||
______________ $Date: 2003/02/19 12:34:17 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.7: Under development...
|
||||
o OpenSSL 0.9.8: Under development...
|
||||
o OpenSSL 0.9.7a: Released on February 19th, 2003
|
||||
o OpenSSL 0.9.7: Released on December 31st, 2002
|
||||
o OpenSSL 0.9.6i: Released on February 19th, 2003
|
||||
o OpenSSL 0.9.6h: Released on December 5th, 2002
|
||||
o OpenSSL 0.9.6g: Released on August 9th, 2002
|
||||
o OpenSSL 0.9.6f: Released on August 8th, 2002
|
||||
|
||||
@@ -241,7 +241,7 @@ typedef struct bio_method_st
|
||||
long (_far *ctrl)();
|
||||
int (_far *create)();
|
||||
int (_far *destroy)();
|
||||
long (_fat *callback_ctrl)();
|
||||
long (_far *callback_ctrl)();
|
||||
} BIO_METHOD;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/safestack.h>
|
||||
@@ -205,10 +206,18 @@ int CRYPTO_get_new_dynlockid(void)
|
||||
i=sk_CRYPTO_dynlock_find(dyn_locks,NULL);
|
||||
/* If there was none, push, thereby creating a new one */
|
||||
if (i == -1)
|
||||
i=sk_CRYPTO_dynlock_push(dyn_locks,pointer);
|
||||
/* Since sk_push() returns the number of items on the
|
||||
stack, not the location of the pushed item, we need
|
||||
to transform the returned number into a position,
|
||||
by decreasing it. */
|
||||
i=sk_CRYPTO_dynlock_push(dyn_locks,pointer) - 1;
|
||||
else
|
||||
/* If we found a place with a NULL pointer, put our pointer
|
||||
in it. */
|
||||
sk_CRYPTO_dynlock_set(dyn_locks,i,pointer);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_DYNLOCK);
|
||||
|
||||
if (!i)
|
||||
if (i == -1)
|
||||
{
|
||||
dynlock_destroy_callback(pointer->data,__FILE__,__LINE__);
|
||||
OPENSSL_free(pointer);
|
||||
@@ -400,16 +409,17 @@ void CRYPTO_lock(int mode, int type, const char *file, int line)
|
||||
#endif
|
||||
if (type < 0)
|
||||
{
|
||||
int i = -type - 1;
|
||||
struct CRYPTO_dynlock_value *pointer
|
||||
= CRYPTO_get_dynlock_value(i);
|
||||
|
||||
if (pointer && dynlock_lock_callback)
|
||||
if (dynlock_lock_callback != NULL)
|
||||
{
|
||||
dynlock_lock_callback(mode, pointer, file, line);
|
||||
}
|
||||
struct CRYPTO_dynlock_value *pointer
|
||||
= CRYPTO_get_dynlock_value(type);
|
||||
|
||||
CRYPTO_destroy_dynlockid(i);
|
||||
assert(pointer != NULL);
|
||||
|
||||
dynlock_lock_callback(mode, pointer, file, line);
|
||||
|
||||
CRYPTO_destroy_dynlockid(type);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (locking_callback != NULL)
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/des.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
|
||||
@@ -217,6 +217,7 @@ end:
|
||||
static int cb_exit(int ec)
|
||||
{
|
||||
EXIT(ec);
|
||||
return(0); /* To keep some compilers quiet */
|
||||
}
|
||||
|
||||
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
|
||||
|
||||
@@ -175,6 +175,8 @@ void *CRYPTO_malloc_locked(int num, const char *file, int line)
|
||||
void *ret = NULL;
|
||||
extern unsigned char cleanse_ctr;
|
||||
|
||||
if (num < 0) return NULL;
|
||||
|
||||
allow_customize = 0;
|
||||
if (malloc_debug_func != NULL)
|
||||
{
|
||||
@@ -214,6 +216,8 @@ void *CRYPTO_malloc(int num, const char *file, int line)
|
||||
void *ret = NULL;
|
||||
extern unsigned char cleanse_ctr;
|
||||
|
||||
if (num < 0) return NULL;
|
||||
|
||||
allow_customize = 0;
|
||||
if (malloc_debug_func != NULL)
|
||||
{
|
||||
@@ -243,6 +247,8 @@ void *CRYPTO_realloc(void *str, int num, const char *file, int line)
|
||||
if (str == NULL)
|
||||
return CRYPTO_malloc(num, file, line);
|
||||
|
||||
if (num < 0) return NULL;
|
||||
|
||||
if (realloc_debug_func != NULL)
|
||||
realloc_debug_func(str, NULL, num, file, line, 0);
|
||||
ret = realloc_func(str,num);
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x0090608fL
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6h 5 Dec 2002"
|
||||
#define OPENSSL_VERSION_NUMBER 0x0090609fL
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.6i Feb 19 2003"
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
|
||||
@@ -897,7 +897,7 @@ void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx)
|
||||
ctx->chain=NULL;
|
||||
}
|
||||
CRYPTO_free_ex_data(x509_store_ctx_method,ctx,&(ctx->ex_data));
|
||||
OPENSSL_cleanse(&ctx->ex_data,sizeof(CRYPTO_EX_DATA));
|
||||
memset(&ctx->ex_data,0,sizeof(CRYPTO_EX_DATA));
|
||||
}
|
||||
|
||||
void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, long flags)
|
||||
|
||||
@@ -532,8 +532,8 @@ certificate extensions:
|
||||
Set a certificate to be trusted for SSL client use and change set its alias to
|
||||
"Steve's Class 1 CA"
|
||||
|
||||
openssl x509 -in cert.pem -addtrust sslclient \
|
||||
-alias "Steve's Class 1 CA" -out trust.pem
|
||||
openssl x509 -in cert.pem -addtrust clientAuth \
|
||||
-setalias "Steve's Class 1 CA" -out trust.pem
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ If B<do_trial_division == 0>, this test is skipped.
|
||||
|
||||
Both BN_is_prime() and BN_is_prime_fasttest() perform a Miller-Rabin
|
||||
probabilistic primality test with B<checks> iterations. If
|
||||
B<checks == BN_prime_check>, a number of iterations is used that
|
||||
B<checks == BN_prime_checks>, a number of iterations is used that
|
||||
yields a false positive rate of at most 2^-80 for random input.
|
||||
|
||||
If B<callback> is not B<NULL>, B<callback(1, j, cb_arg)> is called
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%define libmaj 0
|
||||
%define libmin 9
|
||||
%define librel 6
|
||||
%define librev h
|
||||
%define librev i
|
||||
Release: 1
|
||||
|
||||
%define openssldir /var/ssl
|
||||
|
||||
@@ -105,7 +105,7 @@ SSL_METHOD *SSLv23_client_method(void)
|
||||
|
||||
int ssl23_connect(SSL *s)
|
||||
{
|
||||
BUF_MEM *buf;
|
||||
BUF_MEM *buf=NULL;
|
||||
unsigned long Time=time(NULL);
|
||||
void (*cb)()=NULL;
|
||||
int ret= -1;
|
||||
@@ -159,6 +159,7 @@ int ssl23_connect(SSL *s)
|
||||
goto end;
|
||||
}
|
||||
s->init_buf=buf;
|
||||
buf=NULL;
|
||||
}
|
||||
|
||||
if (!ssl3_setup_buffers(s)) { ret= -1; goto end; }
|
||||
@@ -207,6 +208,8 @@ int ssl23_connect(SSL *s)
|
||||
}
|
||||
end:
|
||||
s->in_handshake--;
|
||||
if (buf != NULL)
|
||||
BUF_MEM_free(buf);
|
||||
if (cb != NULL)
|
||||
cb(s,SSL_CB_CONNECT_EXIT,ret);
|
||||
return(ret);
|
||||
|
||||
@@ -208,10 +208,13 @@ int ssl2_connect(SSL *s)
|
||||
if (!BUF_MEM_grow(buf,
|
||||
SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER))
|
||||
{
|
||||
if (buf == s->init_buf)
|
||||
buf=NULL;
|
||||
ret= -1;
|
||||
goto end;
|
||||
}
|
||||
s->init_buf=buf;
|
||||
buf=NULL;
|
||||
s->init_num=0;
|
||||
s->state=SSL2_ST_SEND_CLIENT_HELLO_A;
|
||||
s->ctx->stats.sess_connect++;
|
||||
@@ -338,6 +341,8 @@ int ssl2_connect(SSL *s)
|
||||
}
|
||||
end:
|
||||
s->in_handshake--;
|
||||
if (buf != NULL)
|
||||
BUF_MEM_free(buf);
|
||||
if (cb != NULL)
|
||||
cb(s,SSL_CB_CONNECT_EXIT,ret);
|
||||
return(ret);
|
||||
|
||||
@@ -164,7 +164,7 @@ SSL_METHOD *SSLv3_client_method(void)
|
||||
|
||||
int ssl3_connect(SSL *s)
|
||||
{
|
||||
BUF_MEM *buf;
|
||||
BUF_MEM *buf=NULL;
|
||||
unsigned long Time=time(NULL),l;
|
||||
long num1;
|
||||
void (*cb)()=NULL;
|
||||
@@ -225,6 +225,7 @@ int ssl3_connect(SSL *s)
|
||||
goto end;
|
||||
}
|
||||
s->init_buf=buf;
|
||||
buf=NULL;
|
||||
}
|
||||
|
||||
if (!ssl3_setup_buffers(s)) { ret= -1; goto end; }
|
||||
@@ -503,6 +504,8 @@ int ssl3_connect(SSL *s)
|
||||
}
|
||||
end:
|
||||
s->in_handshake--;
|
||||
if (buf != NULL)
|
||||
BUF_MEM_free(buf);
|
||||
if (cb != NULL)
|
||||
cb(s,SSL_CB_CONNECT_EXIT,ret);
|
||||
return(ret);
|
||||
|
||||
@@ -456,6 +456,7 @@ int ssl3_enc(SSL *s, int send)
|
||||
ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_DECRYPTION_FAILED);
|
||||
return 0;
|
||||
}
|
||||
/* otherwise, rec->length >= bs */
|
||||
}
|
||||
|
||||
EVP_Cipher(ds,rec->data,rec->input,l);
|
||||
@@ -464,7 +465,7 @@ int ssl3_enc(SSL *s, int send)
|
||||
{
|
||||
i=rec->data[l-1]+1;
|
||||
/* SSL 3.0 bounds the number of padding bytes by the block size;
|
||||
* padding bytes (except that last) are arbitrary */
|
||||
* padding bytes (except the last one) are arbitrary */
|
||||
if (i > bs)
|
||||
{
|
||||
/* Incorrect padding. SSLerr() and ssl3_alert are done
|
||||
@@ -473,6 +474,7 @@ int ssl3_enc(SSL *s, int send)
|
||||
* (see http://www.openssl.org/~bodo/tls-cbc.txt) */
|
||||
return -1;
|
||||
}
|
||||
/* now i <= bs <= rec->length */
|
||||
rec->length-=i;
|
||||
}
|
||||
}
|
||||
|
||||
47
ssl/s3_pkt.c
47
ssl/s3_pkt.c
@@ -238,6 +238,8 @@ static int ssl3_get_record(SSL *s)
|
||||
unsigned int mac_size;
|
||||
int clear=0;
|
||||
size_t extra;
|
||||
int decryption_failed_or_bad_record_mac = 0;
|
||||
unsigned char *mac = NULL;
|
||||
|
||||
rr= &(s->s3->rrec);
|
||||
sess=s->session;
|
||||
@@ -353,8 +355,11 @@ again:
|
||||
/* SSLerr() and ssl3_send_alert() have been called */
|
||||
goto err;
|
||||
|
||||
/* otherwise enc_err == -1 */
|
||||
goto decryption_failed_or_bad_record_mac;
|
||||
/* Otherwise enc_err == -1, which indicates bad padding
|
||||
* (rec->length has not been changed in this case).
|
||||
* To minimize information leaked via timing, we will perform
|
||||
* the MAC computation anyway. */
|
||||
decryption_failed_or_bad_record_mac = 1;
|
||||
}
|
||||
|
||||
#ifdef TLS_DEBUG
|
||||
@@ -380,28 +385,46 @@ printf("\n");
|
||||
SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_PRE_MAC_LENGTH_TOO_LONG);
|
||||
goto f_err;
|
||||
#else
|
||||
goto decryption_failed_or_bad_record_mac;
|
||||
decryption_failed_or_bad_record_mac = 1;
|
||||
#endif
|
||||
}
|
||||
/* check the MAC for rr->input (it's in mac_size bytes at the tail) */
|
||||
if (rr->length < mac_size)
|
||||
if (rr->length >= mac_size)
|
||||
{
|
||||
rr->length -= mac_size;
|
||||
mac = &rr->data[rr->length];
|
||||
}
|
||||
else
|
||||
{
|
||||
/* record (minus padding) is too short to contain a MAC */
|
||||
#if 0 /* OK only for stream ciphers */
|
||||
al=SSL_AD_DECODE_ERROR;
|
||||
SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_LENGTH_TOO_SHORT);
|
||||
goto f_err;
|
||||
#else
|
||||
goto decryption_failed_or_bad_record_mac;
|
||||
decryption_failed_or_bad_record_mac = 1;
|
||||
rr->length = 0;
|
||||
#endif
|
||||
}
|
||||
rr->length-=mac_size;
|
||||
i=s->method->ssl3_enc->mac(s,md,0);
|
||||
if (memcmp(md,&(rr->data[rr->length]),mac_size) != 0)
|
||||
if (mac == NULL || memcmp(md, mac, mac_size) != 0)
|
||||
{
|
||||
goto decryption_failed_or_bad_record_mac;
|
||||
decryption_failed_or_bad_record_mac = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (decryption_failed_or_bad_record_mac)
|
||||
{
|
||||
/* A separate 'decryption_failed' alert was introduced with TLS 1.0,
|
||||
* SSL 3.0 only has 'bad_record_mac'. But unless a decryption
|
||||
* failure is directly visible from the ciphertext anyway,
|
||||
* we should not reveal which kind of error occured -- this
|
||||
* might become visible to an attacker (e.g. via a logfile) */
|
||||
al=SSL_AD_BAD_RECORD_MAC;
|
||||
SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
|
||||
goto f_err;
|
||||
}
|
||||
|
||||
/* r->length is now just compressed */
|
||||
if (s->expand != NULL)
|
||||
{
|
||||
@@ -443,14 +466,6 @@ printf("\n");
|
||||
|
||||
return(1);
|
||||
|
||||
decryption_failed_or_bad_record_mac:
|
||||
/* Separate 'decryption_failed' alert was introduced with TLS 1.0,
|
||||
* SSL 3.0 only has 'bad_record_mac'. But unless a decryption
|
||||
* failure is directly visible from the ciphertext anyway,
|
||||
* we should not reveal which kind of error occured -- this
|
||||
* might become visible to an attacker (e.g. via logfile) */
|
||||
al=SSL_AD_BAD_RECORD_MAC;
|
||||
SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
|
||||
f_err:
|
||||
ssl3_send_alert(s,SSL3_AL_FATAL,al);
|
||||
err:
|
||||
|
||||
16
test/testssl
16
test/testssl
@@ -112,8 +112,12 @@ $ssltest -bio_pair -server_auth -client_auth $CA || exit 1
|
||||
|
||||
#############################################################################
|
||||
|
||||
echo test tls1 with 1024bit anonymous DH, multiple handshakes
|
||||
$ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time || exit 1
|
||||
if ../apps/openssl no-dh; then
|
||||
echo skipping anonymous DH tests
|
||||
else
|
||||
echo test tls1 with 1024bit anonymous DH, multiple handshakes
|
||||
$ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time || exit 1
|
||||
fi
|
||||
|
||||
if ../apps/openssl no-rsa; then
|
||||
echo skipping RSA tests
|
||||
@@ -121,8 +125,12 @@ else
|
||||
echo test tls1 with 1024bit RSA, no DHE, multiple handshakes
|
||||
./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time || exit 1
|
||||
|
||||
echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes
|
||||
./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time || exit 1
|
||||
if ../apps/openssl no-dh; then
|
||||
echo skipping RSA+DHE tests
|
||||
else
|
||||
echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes
|
||||
./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -159,16 +159,25 @@ $ if $severity .ne. 1 then goto exit3
|
||||
$
|
||||
$!###########################################################################
|
||||
$
|
||||
$ write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes"
|
||||
$ 'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time
|
||||
$ if $severity .ne. 1 then goto exit3
|
||||
$
|
||||
$ set noon
|
||||
$ define/user sys$output nla0:
|
||||
$ mcr 'exe_dir'openssl no-rsa
|
||||
$ save_severity=$SEVERITY
|
||||
$ no_rsa=$SEVERITY
|
||||
$ define/user sys$output nla0:
|
||||
$ mcr 'exe_dir'openssl no-dh
|
||||
$ no_dh=$SEVERITY
|
||||
$ set on
|
||||
$ if save_severity
|
||||
$
|
||||
$ if no_dh
|
||||
$ then
|
||||
$ write sys$output "skipping anonymous DH tests"
|
||||
$ else
|
||||
$ write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes"
|
||||
$ 'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time
|
||||
$ if $severity .ne. 1 then goto exit3
|
||||
$ endif
|
||||
$
|
||||
$ if no_rsa
|
||||
$ then
|
||||
$ write sys$output "skipping RSA tests"
|
||||
$ else
|
||||
@@ -176,9 +185,14 @@ $ write sys$output "test tls1 with 1024bit RSA, no DHE, multiple handshakes"
|
||||
$ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -no_dhe -num 10 -f -time
|
||||
$ if $severity .ne. 1 then goto exit3
|
||||
$
|
||||
$ write sys$output "test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes"
|
||||
$ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -dhe1024dsa -num 10 -f -time
|
||||
$ if $severity .ne. 1 then goto exit3
|
||||
$ if no_dh
|
||||
$ then
|
||||
$ write sys$output "skipping RSA+DHE tests"
|
||||
$ else
|
||||
$ write sys$output "test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes"
|
||||
$ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -dhe1024dsa -num 10 -f -time
|
||||
$ if $severity .ne. 1 then goto exit3
|
||||
$ endif
|
||||
$ endif
|
||||
$
|
||||
$ RET = 1
|
||||
|
||||
@@ -206,7 +206,7 @@ $cflags.=" -DNO_MD4" if $no_md4;
|
||||
$cflags.=" -DNO_MD5" if $no_md5;
|
||||
$cflags.=" -DNO_SHA" if $no_sha;
|
||||
$cflags.=" -DNO_SHA1" if $no_sha1;
|
||||
$cflags.=" -DNO_RIPEMD" if $no_rmd160;
|
||||
$cflags.=" -DNO_RIPEMD" if $no_ripemd;
|
||||
$cflags.=" -DNO_MDC2" if $no_mdc2;
|
||||
$cflags.=" -DNO_BF" if $no_bf;
|
||||
$cflags.=" -DNO_CAST" if $no_cast;
|
||||
@@ -674,7 +674,7 @@ sub var_add
|
||||
@a=grep(!/(^md2)|(_md2$)/,@a) if $no_md2;
|
||||
@a=grep(!/(^md4)|(_md4$)/,@a) if $no_md4;
|
||||
@a=grep(!/(^md5)|(_md5$)/,@a) if $no_md5;
|
||||
@a=grep(!/(rmd)|(ripemd)/,@a) if $no_rmd160;
|
||||
@a=grep(!/(rmd)|(ripemd)/,@a) if $no_ripemd;
|
||||
|
||||
@a=grep(!/(^d2i_r_)|(^i2d_r_)/,@a) if $no_rsa;
|
||||
@a=grep(!/(^p_open$)|(^p_seal$)/,@a) if $no_rsa;
|
||||
@@ -883,7 +883,7 @@ sub read_options
|
||||
|
||||
elsif (/^just-ssl$/) { $no_rc2=$no_idea=$no_des=$no_bf=$no_cast=1;
|
||||
$no_md2=$no_sha=$no_mdc2=$no_dsa=$no_dh=1;
|
||||
$no_ssl2=$no_err=$no_rmd160=$no_rc5=1; }
|
||||
$no_ssl2=$no_err=$no_ripemd=$no_rc5=1; }
|
||||
|
||||
elsif (/^rsaref$/) { $rsaref=1; }
|
||||
elsif (/^gcc$/) { $gcc=1; }
|
||||
|
||||
Reference in New Issue
Block a user