ftp www.openssl.org
This commit is contained in:
parent
26deb5021a
commit
387e0d89ab
|
@ -651,7 +651,7 @@ void ERR_load_X509V3_strings(void);
|
|||
#define X509V3_F_POLICY_SECTION 131
|
||||
#define X509V3_F_PROCESS_PCI_VALUE 150
|
||||
#define X509V3_F_R2I_CERTPOL 130
|
||||
#define X509V3_F_R2I_PCI 149
|
||||
#define X509V3_F_R2I_PCI 155
|
||||
#define X509V3_F_S2I_ASN1_IA5STRING 100
|
||||
#define X509V3_F_S2I_ASN1_INTEGER 108
|
||||
#define X509V3_F_S2I_ASN1_OCTET_STRING 112
|
||||
|
|
|
@ -1233,7 +1233,7 @@ static const EVP_MD engine_sha1_md =
|
|||
SHA_CBLOCK,
|
||||
/* sizeof ( EVP_MD * ) + sizeof ( SHA_CTX ) */
|
||||
sizeof ( ZEN_MD_DATA )
|
||||
/* sizeof ( MD_CTX_DATA ) The message digest data stucture ... */
|
||||
/* sizeof ( MD_CTX_DATA ) The message digest data structure ... */
|
||||
} ;
|
||||
|
||||
/* The one for MD5 ... */
|
||||
|
@ -1254,7 +1254,7 @@ static const EVP_MD engine_md5_md =
|
|||
MD5_CBLOCK,
|
||||
/* sizeof ( EVP_MD * ) + sizeof ( MD5_CTX ) */
|
||||
sizeof ( ZEN_MD_DATA )
|
||||
/* sizeof ( MD_CTX_DATA ) The message digest data stucture ... */
|
||||
/* sizeof ( MD_CTX_DATA ) The message digest data structure ... */
|
||||
} ;
|
||||
|
||||
|
||||
|
|
|
@ -20,23 +20,23 @@ SSLTEST=$OPENSSL_DIR/test/ssltest
|
|||
SSLVERSION=
|
||||
|
||||
# These don't really require any certificates
|
||||
AECDH_CIPHER_LIST="EXP-AECDH-RC4-40-SHA EXP-AECDH-DES-40-CBC-SHA AECDH-DES-CBC3-SHA AECDH-DES-CBC-SHA AECDH-RC4-SHA AECDH-NULL-SHA"
|
||||
AECDH_CIPHER_LIST="AECDH-AES256-SHA AECDH-AES128-SHA AECDH-DES-CBC3-SHA AECDH-RC4-SHA AECDH-NULL-SHA"
|
||||
|
||||
# These require ECC certificates signed with ECDSA
|
||||
# The EC public key must be authorized for key agreement.
|
||||
ECDH_ECDSA_CIPHER_LIST="EXP-ECDH-ECDSA-RC4-56-SHA EXP-ECDH-ECDSA-RC4-40-SHA ECDH-ECDSA-AES256-SHA ECDH-ECDSA-AES128-SHA ECDH-ECDSA-DES-CBC3-SHA ECDH-ECDSA-DES-CBC-SHA ECDH-ECDSA-RC4-SHA ECDH-ECDSA-NULL-SHA"
|
||||
ECDH_ECDSA_CIPHER_LIST="ECDH-ECDSA-AES256-SHA ECDH-ECDSA-AES128-SHA ECDH-ECDSA-DES-CBC3-SHA ECDH-ECDSA-RC4-SHA ECDH-ECDSA-NULL-SHA"
|
||||
|
||||
# These require ECC certificates.
|
||||
# The EC public key must be authorized for digital signature.
|
||||
ECDHE_ECDSA_CIPHER_LIST="ECDHE-ECDSA-AES128-SHA"
|
||||
ECDHE_ECDSA_CIPHER_LIST="ECDHE-ECDSA-AES256-SHA ECDHE-ECDSA-AES128-SHA ECDHE-ECDSA-DES-CBC3-SHA ECDHE-ECDSA-RC4-SHA ECDHE-ECDSA-NULL-SHA"
|
||||
|
||||
# These require ECC certificates signed with RSA.
|
||||
# The EC public key must be authorized for key agreement.
|
||||
ECDH_RSA_CIPHER_LIST="EXP-ECDH-RSA-RC4-56-SHA EXP-ECDH-RSA-RC4-40-SHA ECDH-RSA-AES256-SHA ECDH-RSA-AES128-SHA ECDH-RSA-DES-CBC3-SHA ECDH-RSA-DES-CBC-SHA ECDH-RSA-RC4-SHA ECDH-RSA-NULL-SHA"
|
||||
ECDH_RSA_CIPHER_LIST="ECDH-RSA-AES256-SHA ECDH-RSA-AES128-SHA ECDH-RSA-DES-CBC3-SHA ECDH-RSA-RC4-SHA ECDH-RSA-NULL-SHA"
|
||||
|
||||
# These require RSA certificates.
|
||||
# The RSA public key must be authorized for digital signature.
|
||||
ECDHE_RSA_CIPHER_LIST="ECDHE-RSA-AES128-SHA"
|
||||
ECDHE_RSA_CIPHER_LIST="ECDHE-RSA-AES256-SHA ECDHE-RSA-AES128-SHA ECDHE-RSA-DES-CBC3-SHA ECDHE-RSA-RC4-SHA ECDHE-RSA-NULL-SHA"
|
||||
|
||||
# List of Elliptic curves over which we wish to test generation of
|
||||
# ephemeral ECDH keys when using AECDH or ECDHE ciphers
|
||||
|
@ -78,9 +78,9 @@ done
|
|||
|
||||
for curve in $ELLIPTIC_CURVE_LIST
|
||||
do
|
||||
echo "Testing EXP-AECDH-RC4-40-SHA (with $curve)"
|
||||
echo "Testing AECDH-RC4-SHA (with $curve)"
|
||||
$SSLTEST $SSL_VERSION -cert $SERVER_PEM \
|
||||
-named_curve $curve -cipher EXP-AECDH-RC4-40-SHA
|
||||
-named_curve $curve -cipher AECDH-RC4-SHA
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -167,6 +167,9 @@ if [ "$1" = "ecdhe-rsa" ]; then
|
|||
for cipher in $ECDHE_RSA_CIPHER_LIST
|
||||
do
|
||||
echo "Testing $cipher (with server authentication)"
|
||||
echo $SSLTEST $SSL_VERSION -CAfile $CA_PEM \
|
||||
-cert $SERVER_PEM -server_auth \
|
||||
-cipher $cipher -named_curve $DEFAULT_CURVE
|
||||
$SSLTEST $SSL_VERSION -CAfile $CA_PEM \
|
||||
-cert $SERVER_PEM -server_auth \
|
||||
-cipher $cipher -named_curve $DEFAULT_CURVE
|
||||
|
|
|
@ -8,7 +8,7 @@ PKCS7_verify - verify a PKCS#7 signedData structure
|
|||
|
||||
int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, BIO *indata, BIO *out, int flags);
|
||||
|
||||
int PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
|
||||
STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
|
|
@ -778,7 +778,7 @@ called.
|
|||
|
||||
The X509V3_EXT_METHOD structure is described below.
|
||||
|
||||
strut {
|
||||
struct {
|
||||
int ext_nid;
|
||||
int ext_flags;
|
||||
X509V3_EXT_NEW ext_new;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# SSLeay/engines/Makefile
|
||||
# OpenSSL/engines/Makefile
|
||||
#
|
||||
|
||||
DIR= engines
|
||||
|
@ -84,6 +84,7 @@ links:
|
|||
# XXXXX This currently only works on systems that use .so as suffix
|
||||
# for shared libraries as well as for Cygwin which uses the
|
||||
# dlfcn_name_converter and therefore stores the engines with .so suffix, too.
|
||||
# XXXXX This was extended to HP-UX dl targets, which use .sl suffix.
|
||||
install:
|
||||
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
|
||||
@if [ -n "$(SHARED_LIBS)" ]; then \
|
||||
|
@ -91,12 +92,18 @@ install:
|
|||
for l in $(LIBNAMES); do \
|
||||
( echo installing $$l; \
|
||||
if [ "$(PLATFORM)" != "Cygwin" ]; then \
|
||||
cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
|
||||
case "$(CFLAGS)" in \
|
||||
*DSO_DLFCN*) sfx="so";; \
|
||||
*DSO_DL*) sfx="sl";; \
|
||||
*) sfx="bad";; \
|
||||
esac; \
|
||||
cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
|
||||
else \
|
||||
cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
|
||||
sfx="so"; \
|
||||
cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
|
||||
fi; \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so ); \
|
||||
chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
|
||||
done; \
|
||||
fi
|
||||
|
||||
|
|
|
@ -744,6 +744,12 @@ static int cswift_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx
|
|||
int to_return = 0;
|
||||
const RSA_METHOD * def_rsa_method;
|
||||
|
||||
if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp)
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_RSA_MOD_EXP,CSWIFT_R_MISSING_KEY_COMPONENTS);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Try the limits of RSA (2048 bits) */
|
||||
if(BN_num_bytes(rsa->p) > 128 ||
|
||||
BN_num_bytes(rsa->q) > 128 ||
|
||||
|
@ -764,11 +770,6 @@ static int cswift_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx
|
|||
return def_rsa_method->rsa_mod_exp(r0, I, rsa, ctx);
|
||||
}
|
||||
|
||||
if(!rsa->p || !rsa->q || !rsa->dmp1 || !rsa->dmq1 || !rsa->iqmp)
|
||||
{
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_RSA_MOD_EXP,CSWIFT_R_MISSING_KEY_COMPONENTS);
|
||||
goto err;
|
||||
}
|
||||
to_return = cswift_mod_exp_crt(r0, I, rsa->p, rsa->q, rsa->dmp1,
|
||||
rsa->dmq1, rsa->iqmp, ctx);
|
||||
err:
|
||||
|
@ -1089,7 +1090,7 @@ static int cswift_rand_bytes(unsigned char *buf, int num)
|
|||
if (swrc != SW_OK)
|
||||
{
|
||||
char tmpbuf[20];
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_CTRL, CSWIFT_R_REQUEST_FAILED);
|
||||
CSWIFTerr(CSWIFT_F_CSWIFT_RAND_BYTES, CSWIFT_R_REQUEST_FAILED);
|
||||
sprintf(tmpbuf, "%ld", swrc);
|
||||
ERR_add_error_data(2, "CryptoSwift error number is ", tmpbuf);
|
||||
goto err;
|
||||
|
|
|
@ -976,11 +976,13 @@ static DSA_SIG * surewarehk_dsa_do_sign(const unsigned char *from, int flen, DSA
|
|||
if (!p_surewarehk_Dsa_Sign)
|
||||
{
|
||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_DSA_DO_SIGN,ENGINE_R_NOT_INITIALISED);
|
||||
goto err;
|
||||
}
|
||||
/* extract ref to private key */
|
||||
else if (!(hptr=DSA_get_ex_data(dsa, dsaHndidx)))
|
||||
{
|
||||
SUREWAREerr(SUREWARE_F_SUREWAREHK_DSA_DO_SIGN,SUREWARE_R_MISSING_KEY_COMPONENTS);
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -39,7 +39,20 @@ static int app_fileno(FILE *fp) { return _fileno(fp); }
|
|||
static int app_fsetmod(FILE *fp,char mod)
|
||||
{ return _setmode (_fileno(fp),mod=='b'?_O_BINARY:_O_TEXT); }
|
||||
|
||||
__declspec(dllexport) void **OPENSSL_Applink(void)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
__declspec(dllexport)
|
||||
void **
|
||||
#if defined(__BORLANDC__)
|
||||
__stdcall /* __stdcall appears to be the only way to get the name
|
||||
* decoration right with Borland C. Otherwise it works
|
||||
* purely incidentally, as we pass no parameters. */
|
||||
#else
|
||||
__cdecl
|
||||
#endif
|
||||
OPENSSL_Applink(void)
|
||||
{ static int once=1;
|
||||
static void *OPENSSL_ApplinkTable[APPLINK_MAX+1]={(void *)APPLINK_MAX};
|
||||
|
||||
|
@ -74,4 +87,8 @@ __declspec(dllexport) void **OPENSSL_Applink(void)
|
|||
|
||||
return OPENSSL_ApplinkTable;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# SSLeay/ssl/Makefile
|
||||
# OpenSSL/ssl/Makefile
|
||||
#
|
||||
|
||||
DIR= ssl
|
||||
|
|
|
@ -144,7 +144,7 @@ IMPLEMENT_dtls1_meth_func(DTLSv1_client_method,
|
|||
int dtls1_connect(SSL *s)
|
||||
{
|
||||
BUF_MEM *buf=NULL;
|
||||
unsigned long Time=time(NULL),l;
|
||||
unsigned long Time=(unsigned long)time(NULL),l;
|
||||
long num1;
|
||||
void (*cb)(const SSL *ssl,int type,int val)=NULL;
|
||||
int ret= -1;
|
||||
|
@ -544,7 +544,7 @@ int dtls1_client_hello(SSL *s)
|
|||
/* else use the pre-loaded session */
|
||||
|
||||
p=s->s3->client_random;
|
||||
Time=time(NULL); /* Time */
|
||||
Time=(unsigned long)time(NULL); /* Time */
|
||||
l2n(Time,p);
|
||||
RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
|
||||
|
||||
|
|
|
@ -146,7 +146,10 @@ int dtls1_enc(SSL *s, int send)
|
|||
fprintf(stderr, "%s:%d: rec->data != rec->input\n",
|
||||
__FILE__, __LINE__);
|
||||
else if ( EVP_CIPHER_block_size(ds->cipher) > 1)
|
||||
RAND_bytes(rec->input, EVP_CIPHER_block_size(ds->cipher));
|
||||
{
|
||||
if (!RAND_bytes(rec->input, EVP_CIPHER_block_size(ds->cipher)))
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -197,7 +197,13 @@ dtls1_buffer_record(SSL *s, record_pqueue *queue, PQ_64BIT priority)
|
|||
memset(&(s->s3->rbuf), 0, sizeof(SSL3_BUFFER));
|
||||
memset(&(s->s3->rrec), 0, sizeof(SSL3_RECORD));
|
||||
|
||||
ssl3_setup_buffers(s);
|
||||
if (!ssl3_setup_buffers(s))
|
||||
{
|
||||
SSLerr(SSL_F_DTLS1_BUFFER_RECORD, ERR_R_INTERNAL_ERROR);
|
||||
OPENSSL_free(rdata);
|
||||
pitem_free(item);
|
||||
return(0);
|
||||
}
|
||||
|
||||
return(1);
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ IMPLEMENT_dtls1_meth_func(DTLSv1_server_method,
|
|||
int dtls1_accept(SSL *s)
|
||||
{
|
||||
BUF_MEM *buf;
|
||||
unsigned long l,Time=time(NULL);
|
||||
unsigned long l,Time=(unsigned long)time(NULL);
|
||||
void (*cb)(const SSL *ssl,int type,int val)=NULL;
|
||||
long num1;
|
||||
int ret= -1;
|
||||
|
@ -666,7 +666,7 @@ int dtls1_send_server_hello(SSL *s)
|
|||
{
|
||||
buf=(unsigned char *)s->init_buf->data;
|
||||
p=s->s3->server_random;
|
||||
Time=time(NULL); /* Time */
|
||||
Time=(unsigned long)time(NULL); /* Time */
|
||||
l2n(Time,p);
|
||||
RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
|
||||
/* Do the message type and length last */
|
||||
|
|
|
@ -88,7 +88,7 @@ IMPLEMENT_ssl23_meth_func(SSLv23_client_method,
|
|||
int ssl23_connect(SSL *s)
|
||||
{
|
||||
BUF_MEM *buf=NULL;
|
||||
unsigned long Time=time(NULL);
|
||||
unsigned long Time=(unsigned long)time(NULL);
|
||||
void (*cb)(const SSL *ssl,int type,int val)=NULL;
|
||||
int ret= -1;
|
||||
int new_state,state;
|
||||
|
@ -236,7 +236,7 @@ static int ssl23_client_hello(SSL *s)
|
|||
#endif
|
||||
|
||||
p=s->s3->client_random;
|
||||
Time=time(NULL); /* Time */
|
||||
Time=(unsigned long)time(NULL); /* Time */
|
||||
l2n(Time,p);
|
||||
if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0)
|
||||
return -1;
|
||||
|
|
|
@ -63,13 +63,21 @@
|
|||
static SSL_METHOD *ssl23_get_method(int ver);
|
||||
static SSL_METHOD *ssl23_get_method(int ver)
|
||||
{
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
if (ver == SSL2_VERSION)
|
||||
return(SSLv2_method());
|
||||
else if (ver == SSL3_VERSION)
|
||||
else
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SSL3
|
||||
if (ver == SSL3_VERSION)
|
||||
return(SSLv3_method());
|
||||
else if (ver == TLS1_VERSION)
|
||||
else
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_TLS1
|
||||
if (ver == TLS1_VERSION)
|
||||
return(TLSv1_method());
|
||||
else
|
||||
#endif
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1901,7 +1901,7 @@ void ssl_update_cache(SSL *s,int mode)
|
|||
?s->ctx->stats.sess_connect_good
|
||||
:s->ctx->stats.sess_accept_good) & 0xff) == 0xff)
|
||||
{
|
||||
SSL_CTX_flush_sessions(s->ctx,time(NULL));
|
||||
SSL_CTX_flush_sessions(s->ctx,(unsigned long)time(NULL));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,51 +125,36 @@ extern "C" {
|
|||
#define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039
|
||||
#define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A
|
||||
|
||||
/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001).
|
||||
* XXX NOTE: There is a bug in the draft, cipher numbers 4B, and 4C
|
||||
* are defined twice so we define ECDH_ECDSA_EXPORT cipher
|
||||
* suites to use 5B and 5C instead (this may change with future
|
||||
* updates to the IETF draft).
|
||||
*/
|
||||
/* draft-ietf-tls-ecc-03.txt (June 2003) gives a changed list of
|
||||
* ciphersuites, but does not define numbers for all of them
|
||||
* because of possible conflicts with other Internet Drafts;
|
||||
* most numbers are still subject to change. */
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x03000047
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x03000048
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_DES_CBC_SHA 0x03000049
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300004A
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300004B
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300004C
|
||||
#define TLS1_CK_ECDH_ECDSA_EXPORT_WITH_RC4_40_SHA 0x0300005B
|
||||
#define TLS1_CK_ECDH_ECDSA_EXPORT_WITH_RC4_56_SHA 0x0300005C
|
||||
/* ECC ciphersuites from draft-ietf-tls-ecc-12.txt with changes soon to be in draft 13 */
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005
|
||||
|
||||
#define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300004D
|
||||
#define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300004E
|
||||
#define TLS1_CK_ECDH_RSA_WITH_DES_CBC_SHA 0x0300004F
|
||||
#define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x03000050
|
||||
#define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x03000051
|
||||
#define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x03000052
|
||||
#define TLS1_CK_ECDH_RSA_EXPORT_WITH_RC4_40_SHA 0x03000053
|
||||
#define TLS1_CK_ECDH_RSA_EXPORT_WITH_RC4_56_SHA 0x03000054
|
||||
#define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006
|
||||
#define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007
|
||||
#define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008
|
||||
#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009
|
||||
#define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A
|
||||
|
||||
#define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x03000055
|
||||
#define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x03000056
|
||||
#define TLS1_CK_ECDH_anon_WITH_DES_CBC_SHA 0x03000057
|
||||
#define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x03000058
|
||||
#define TLS1_CK_ECDH_anon_EXPORT_WITH_DES_40_CBC_SHA 0x03000059
|
||||
#define TLS1_CK_ECDH_anon_EXPORT_WITH_RC4_40_SHA 0x0300005A
|
||||
#define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B
|
||||
#define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C
|
||||
#define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D
|
||||
#define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E
|
||||
#define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F
|
||||
|
||||
/* XXX: ECC ciphersuites offering forward secrecy are not yet specified
|
||||
* in the ECC/TLS draft but our code allows them to be implemented
|
||||
* very easily. To add such a cipher suite, one needs to add two constant
|
||||
* definitions to this file and a new structure in s3_lib.c. We illustrate
|
||||
* the process for the made-up ciphers ECDHE-ECDSA-AES128-SHA and
|
||||
* ECDHE-RSA-AES128-SHA.
|
||||
*/
|
||||
#define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x03000077
|
||||
#define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x03000078
|
||||
#define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010
|
||||
#define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011
|
||||
#define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012
|
||||
#define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013
|
||||
#define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014
|
||||
|
||||
#define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015
|
||||
#define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016
|
||||
#define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017
|
||||
#define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018
|
||||
#define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019
|
||||
|
||||
/* XXX
|
||||
* Inconsistency alert:
|
||||
|
@ -204,43 +189,41 @@ extern "C" {
|
|||
/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_DES_CBC_SHA "ECDH-ECDSA-DES-CBC-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_EXPORT_WITH_RC4_40_SHA "EXP-ECDH-ECDSA-RC4-40-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_EXPORT_WITH_RC4_56_SHA "EXP-ECDH-ECDSA-RC4-56-SHA"
|
||||
|
||||
#define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA"
|
||||
#define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA"
|
||||
#define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA"
|
||||
#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA"
|
||||
#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA"
|
||||
|
||||
#define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA"
|
||||
#define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA"
|
||||
#define TLS1_TXT_ECDH_RSA_WITH_DES_CBC_SHA "ECDH-RSA-DES-CBC-SHA"
|
||||
#define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA"
|
||||
#define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA"
|
||||
#define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA"
|
||||
#define TLS1_TXT_ECDH_RSA_EXPORT_WITH_RC4_40_SHA "EXP-ECDH-RSA-RC4-40-SHA"
|
||||
#define TLS1_TXT_ECDH_RSA_EXPORT_WITH_RC4_56_SHA "EXP-ECDH-RSA-RC4-56-SHA"
|
||||
|
||||
#define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA"
|
||||
#define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA"
|
||||
#define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA"
|
||||
#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA"
|
||||
#define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA"
|
||||
|
||||
#define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA"
|
||||
#define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA"
|
||||
#define TLS1_TXT_ECDH_anon_WITH_DES_CBC_SHA "AECDH-DES-CBC-SHA"
|
||||
#define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA"
|
||||
#define TLS1_TXT_ECDH_anon_EXPORT_WITH_DES_40_CBC_SHA "EXP-AECDH-DES-40-CBC-SHA"
|
||||
#define TLS1_TXT_ECDH_anon_EXPORT_WITH_RC4_40_SHA "EXP-AECDH-RC4-40-SHA"
|
||||
|
||||
/* XXX: Made-up ECC cipher suites offering forward secrecy. This is for
|
||||
* illustration only.
|
||||
*/
|
||||
#define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA"
|
||||
#define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA"
|
||||
|
||||
#define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA"
|
||||
#define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA"
|
||||
|
||||
#define TLS_CT_RSA_SIGN 1
|
||||
#define TLS_CT_DSS_SIGN 2
|
||||
#define TLS_CT_RSA_FIXED_DH 3
|
||||
#define TLS_CT_DSS_FIXED_DH 4
|
||||
#define TLS_CT_ECDSA_SIGN 5
|
||||
#define TLS_CT_RSA_FIXED_ECDH 6
|
||||
#define TLS_CT_ECDSA_FIXED_ECDH 7
|
||||
#define TLS_CT_ECDSA_SIGN 64
|
||||
#define TLS_CT_RSA_FIXED_ECDH 65
|
||||
#define TLS_CT_ECDSA_FIXED_ECDH 66
|
||||
#define TLS_CT_NUMBER 7
|
||||
|
||||
#define TLS1_FINISH_MAC_LENGTH 12
|
||||
|
|
|
@ -309,9 +309,9 @@ BUILD_CMD=shlib_target=; if [ -n "$(SHARED_LIBS)" ]; then \
|
|||
shlib_target="$(SHLIB_TARGET)"; \
|
||||
fi; \
|
||||
if [ "$${shlib_target}" = "hpux-shared" -o "$${shlib_target}" = "darwin-shared" ] ; then \
|
||||
LIBRARIES="$(DLIBSSL) $(DLIBCRYPTO)"; \
|
||||
LIBRARIES="$(DLIBSSL) $(DLIBCRYPTO) $(LIBKRB5)"; \
|
||||
else \
|
||||
LIBRARIES="$(LIBSSL) $(LIBCRYPTO)"; \
|
||||
LIBRARIES="$(LIBSSL) $(LIBCRYPTO) $(LIBKRB5)"; \
|
||||
fi; \
|
||||
$(MAKE) -f $(TOP)/Makefile.shared -e \
|
||||
APPNAME=$$target$(EXE_EXT) OBJECTS="$$target.o" \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# SSLeay/tools/Makefile
|
||||
# OpenSSL/tools/Makefile
|
||||
#
|
||||
|
||||
DIR= tools
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/bin/perl
|
||||
#!/usr/bin/perl
|
||||
|
||||
|
||||
# Perl c_rehash script, scan all files in a directory
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
#!/usr/local/bin/perl
|
||||
|
||||
use Fcntl;
|
||||
|
||||
|
||||
# copy.pl
|
||||
|
||||
# Perl script 'copy' comment. On Windows the built in "copy" command also
|
||||
# copies timestamps: this messes up Makefile dependencies.
|
||||
|
||||
my $arg;
|
||||
|
||||
foreach $arg (@ARGV) {
|
||||
$arg =~ s|\\|/|g; # compensate for bug/feature in cygwin glob...
|
||||
foreach (glob $arg)
|
||||
{
|
||||
push @filelist, $_;
|
||||
}
|
||||
}
|
||||
|
||||
$fnum = @filelist;
|
||||
|
||||
if ($fnum <= 1)
|
||||
{
|
||||
die "Need at least two filenames";
|
||||
}
|
||||
|
||||
$dest = pop @filelist;
|
||||
|
||||
if ($fnum > 2 && ! -d $dest)
|
||||
{
|
||||
die "Destination must be a directory";
|
||||
}
|
||||
|
||||
foreach (@filelist)
|
||||
{
|
||||
if (-d $dest)
|
||||
{
|
||||
$dfile = $_;
|
||||
$dfile =~ s|^.*[/\\]([^/\\]*)$|$1|;
|
||||
$dfile = "$dest/$dfile";
|
||||
}
|
||||
else
|
||||
{
|
||||
$dfile = $dest;
|
||||
}
|
||||
sysopen(IN, $_, O_RDONLY|O_BINARY) || die "Can't Open $_";
|
||||
sysopen(OUT, $dfile, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY)
|
||||
|| die "Can't Open $dfile";
|
||||
while (sysread IN, $buf, 10240)
|
||||
{
|
||||
syswrite(OUT, $buf, length($buf));
|
||||
}
|
||||
close(IN);
|
||||
close(OUT);
|
||||
print "Copying: $_ to $dfile\n";
|
||||
}
|
||||
|
||||
|
|
@ -3378,3 +3378,5 @@ get_rfc3526_prime_3072 3778 EXIST::FUNCTION:
|
|||
get_rfc3526_prime_4096 3779 EXIST::FUNCTION:
|
||||
get_rfc2409_prime_768 3780 EXIST::FUNCTION:
|
||||
X509_VERIFY_PARAM_get_flags 3781 EXIST::FUNCTION:
|
||||
EVP_CIPHER_CTX_new 3782 EXIST::FUNCTION:
|
||||
EVP_CIPHER_CTX_free 3783 EXIST::FUNCTION:
|
||||
|
|
|
@ -10,6 +10,12 @@ $OPTIONS="";
|
|||
$ssl_version="";
|
||||
$banner="\t\@echo Building OpenSSL";
|
||||
|
||||
my $no_static_engine = 0;
|
||||
my $engines = "";
|
||||
local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic
|
||||
local $zlib_lib = "";
|
||||
|
||||
|
||||
open(IN,"<Makefile") || die "unable to open Makefile!\n";
|
||||
while(<IN>) {
|
||||
$ssl_version=$1 if (/^VERSION=(.*)$/);
|
||||
|
@ -95,6 +101,8 @@ foreach (grep(!/^$/, split(/ /, $OPTIONS)))
|
|||
print STDERR "unknown option - $_\n" if !&read_options;
|
||||
}
|
||||
|
||||
$no_static_engine = 0 if (!$shlib);
|
||||
|
||||
$no_mdc2=1 if ($no_des);
|
||||
|
||||
$no_ssl3=1 if ($no_md5 || $no_sha);
|
||||
|
@ -107,7 +115,8 @@ $out_def="out";
|
|||
$inc_def="outinc";
|
||||
$tmp_def="tmp";
|
||||
|
||||
$mkdir="-mkdir";
|
||||
$perl="perl" unless defined $perl;
|
||||
$mkdir="-mkdir" unless defined $mkdir;
|
||||
|
||||
($ssl,$crypto)=("ssl","crypto");
|
||||
$ranlib="echo ranlib";
|
||||
|
@ -214,6 +223,19 @@ $cflags.=" -DOPENSSL_NO_ECDSA" if $no_ecdsa;
|
|||
$cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
|
||||
$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
|
||||
$cflags.=" -DOPENSSL_NO_HW" if $no_hw;
|
||||
|
||||
$cflags.= " -DZLIB" if $zlib_opt;
|
||||
$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
|
||||
|
||||
if ($no_static_engine)
|
||||
{
|
||||
$cflags .= " -DOPENSSL_NO_STATIC_ENGINE";
|
||||
}
|
||||
else
|
||||
{
|
||||
$cflags .= " -DOPENSSL_NO_DYNAMIC_ENGINE";
|
||||
}
|
||||
|
||||
#$cflags.=" -DRSAref" if $rsaref ne "";
|
||||
|
||||
## if ($unix)
|
||||
|
@ -223,6 +245,7 @@ $cflags.=" -DOPENSSL_NO_HW" if $no_hw;
|
|||
|
||||
$ex_libs="$l_flags$ex_libs" if ($l_flags ne "");
|
||||
|
||||
|
||||
%shlib_ex_cflags=("SSL" => " -DOPENSSL_BUILD_SHLIBSSL",
|
||||
"CRYPTO" => " -DOPENSSL_BUILD_SHLIBCRYPTO");
|
||||
|
||||
|
@ -267,8 +290,14 @@ for (;;)
|
|||
if ($key eq "KRB5_INCLUDES")
|
||||
{ $cflags .= " $val";}
|
||||
|
||||
if ($key eq "ZLIB_INCLUDE")
|
||||
{ $cflags .= " $val" if $val ne "";}
|
||||
|
||||
if ($key eq "LIBZLIB")
|
||||
{ $zlib_lib = "$val" if $val ne "";}
|
||||
|
||||
if ($key eq "LIBKRB5")
|
||||
{ $ex_libs .= " $val";}
|
||||
{ $ex_libs .= " $val" if $val ne "";}
|
||||
|
||||
if ($key eq "TEST")
|
||||
{ $test.=&var_add($dir,$val, 0); }
|
||||
|
@ -288,14 +317,41 @@ for (;;)
|
|||
if ($key eq "HEADER")
|
||||
{ $header.=&var_add($dir,$val, 1); }
|
||||
|
||||
if ($key eq "LIBOBJ")
|
||||
if ($key eq "LIBOBJ" && ($dir ne "engines" || !$no_static_engine))
|
||||
{ $libobj=&var_add($dir,$val, 0); }
|
||||
if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine)
|
||||
{ $engines.=$val }
|
||||
|
||||
if (!($_=<IN>))
|
||||
{ $_="RELATIVE_DIRECTORY=FINISHED\n"; }
|
||||
}
|
||||
close(IN);
|
||||
|
||||
if ($shlib)
|
||||
{
|
||||
$extra_install= <<"EOF";
|
||||
\$(CP) \$(O_SSL) \$(INSTALLTOP)${o}bin
|
||||
\$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}bin
|
||||
\$(CP) \$(L_SSL) \$(INSTALLTOP)${o}lib
|
||||
\$(CP) \$(L_CRYPTO) \$(INSTALLTOP)${o}lib
|
||||
EOF
|
||||
if ($no_static_engine)
|
||||
{
|
||||
$extra_install .= <<"EOF"
|
||||
\$(MKDIR) \$(INSTALLTOP)${o}lib${o}engines
|
||||
\$(CP) \$(E_SHLIB) \$(INSTALLTOP)${o}lib${o}engines
|
||||
EOF
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$extra_install= <<"EOF";
|
||||
\$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib
|
||||
\$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib
|
||||
EOF
|
||||
$ex_libs .= " $zlib_lib" if $zlib_opt == 1;
|
||||
}
|
||||
|
||||
$defs= <<"EOF";
|
||||
# This makefile has been automatically generated from the OpenSSL distribution.
|
||||
# This single makefile will build the complete OpenSSL distribution and
|
||||
|
@ -366,6 +422,7 @@ TMP_D=$tmp_dir
|
|||
INC_D=$inc_dir
|
||||
INCO_D=$inc_dir${o}openssl
|
||||
|
||||
PERL=$perl
|
||||
CP=$cp
|
||||
RM=$rm
|
||||
RANLIB=$ranlib
|
||||
|
@ -385,12 +442,14 @@ CRYPTO=$crypto
|
|||
# BIN_D - Binary output directory
|
||||
# TEST_D - Binary test file output directory
|
||||
# LIB_D - library output directory
|
||||
# ENG_D - dynamic engine output directory
|
||||
# Note: if you change these point to different directories then uncomment out
|
||||
# the lines around the 'NB' comment below.
|
||||
#
|
||||
BIN_D=\$(OUT_D)
|
||||
TEST_D=\$(OUT_D)
|
||||
LIB_D=\$(OUT_D)
|
||||
ENG_D=\$(OUT_D)
|
||||
|
||||
# INCL_D - local library directory
|
||||
# OBJ_D - temp object file directory
|
||||
|
@ -446,11 +505,11 @@ $banner
|
|||
headers: \$(HEADER) \$(EXHEADER)
|
||||
@
|
||||
|
||||
lib: \$(LIBS_DEP)
|
||||
lib: \$(LIBS_DEP) \$(E_SHLIB)
|
||||
|
||||
exe: \$(T_EXE) \$(BIN_D)$o\$(E_EXE)$exep
|
||||
|
||||
install:
|
||||
install: all
|
||||
\$(MKDIR) \$(INSTALLTOP)
|
||||
\$(MKDIR) \$(INSTALLTOP)${o}bin
|
||||
\$(MKDIR) \$(INSTALLTOP)${o}include
|
||||
|
@ -458,8 +517,13 @@ install:
|
|||
\$(MKDIR) \$(INSTALLTOP)${o}lib
|
||||
\$(CP) \$(INCO_D)${o}*.\[ch\] \$(INSTALLTOP)${o}include${o}openssl
|
||||
\$(CP) \$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin
|
||||
\$(CP) \$(O_SSL) \$(INSTALLTOP)${o}lib
|
||||
\$(CP) \$(O_CRYPTO) \$(INSTALLTOP)${o}lib
|
||||
\$(CP) apps${o}openssl.cnf \$(INSTALLTOP)
|
||||
$extra_install
|
||||
|
||||
|
||||
test: \$(T_EXE)
|
||||
cd \$(BIN_D)
|
||||
..${o}ms${o}test
|
||||
|
||||
clean:
|
||||
\$(RM) \$(TMP_D)$o*.*
|
||||
|
@ -617,6 +681,16 @@ foreach (split(/\s+/,$test))
|
|||
$rules.=&do_link_rule("\$(TEST_D)$o$t$exep",$tt,"\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)");
|
||||
}
|
||||
|
||||
$defs.=&do_defs("E_SHLIB",$engines,"\$(ENG_D)",$shlibp);
|
||||
|
||||
foreach (split(/\s+/,$engines))
|
||||
{
|
||||
$rules.=&do_compile_rule("\$(OBJ_D)","engines${o}e_$_",$lib);
|
||||
$rules.= &do_lib_rule("\$(OBJ_D)${o}e_${_}.obj","\$(ENG_D)$o$_$shlibp","",$shlib,"");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)");
|
||||
$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)");
|
||||
|
||||
|
@ -770,14 +844,14 @@ sub do_defs
|
|||
$ret.=$t;
|
||||
}
|
||||
# hack to add version info on MSVC
|
||||
if ($shlib && ($platform eq "VC-WIN32") || ($platform eq "VC-NT"))
|
||||
if ($shlib && (($platform eq "VC-WIN32") || ($platform eq "VC-NT")))
|
||||
{
|
||||
if ($var eq "CRYPTOOBJ")
|
||||
{ $ret.="\$(OBJ_D)\\\$(CRYPTO).res "; }
|
||||
elsif ($var eq "SSLOBJ")
|
||||
{ $ret.="\$(OBJ_D)\\\$(SSL).res "; }
|
||||
}
|
||||
chop($ret);
|
||||
chomp($ret);
|
||||
$ret.="\n\n";
|
||||
return($ret);
|
||||
}
|
||||
|
@ -955,10 +1029,18 @@ sub read_options
|
|||
}
|
||||
}
|
||||
elsif (/^no-comp$/) { $xcflags = "-DOPENSSL_NO_COMP $xcflags"; }
|
||||
elsif (/^enable-zlib$/) { $xcflags = "-DZLIB $xcflags"; }
|
||||
elsif (/^enable-zlib$/) { $zlib_opt = 1 if $zlib_opt == 0 }
|
||||
elsif (/^enable-zlib-dynamic$/)
|
||||
{
|
||||
$xcflags = "-DZLIB_SHARED -DZLIB $xcflags";
|
||||
$zlib_opt = 2;
|
||||
}
|
||||
elsif (/^no-static-engine/)
|
||||
{
|
||||
$no_static_engine = 1;
|
||||
}
|
||||
elsif (/^enable-static-engine/)
|
||||
{
|
||||
$no_static_engine = 0;
|
||||
}
|
||||
# There are also enable-xxx options which correspond to
|
||||
# the no-xxx. Since the scalars are enabled by default
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
my $arg;
|
||||
|
||||
foreach $arg (@ARGV) {
|
||||
$arg =~ tr|\\|/|;
|
||||
&do_mkdir_p($arg);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,8 @@ while(<IN>)
|
|||
$csrc{$1} = $3;
|
||||
$fmax{$1} = 99;
|
||||
$rmax{$1} = 99;
|
||||
$fassigned{$1} = ":";
|
||||
$rassigned{$1} = ":";
|
||||
$fnew{$1} = 0;
|
||||
$rnew{$1} = 0;
|
||||
}
|
||||
|
@ -103,15 +105,24 @@ while (($hdr, $lib) = each %libinc)
|
|||
next;
|
||||
}
|
||||
|
||||
$cpp = 1 if /^#.*ifdef.*cplusplus/; # skip "C" declaration
|
||||
if(/\/\*/) {
|
||||
if (not /\*\//) { # multiline comment...
|
||||
$line = $_; # ... just accumulate
|
||||
next;
|
||||
} else {
|
||||
s/\/\*.*?\*\///gs; # wipe it
|
||||
}
|
||||
}
|
||||
|
||||
if ($cpp) {
|
||||
$cpp = 0 if /^#.*endif/;
|
||||
$cpp++ if /^#\s*if/;
|
||||
$cpp-- if /^#\s*endif/;
|
||||
next;
|
||||
}
|
||||
$cpp = 1 if /^#.*ifdef.*cplusplus/; # skip "C" declaration
|
||||
|
||||
next if (/^\#/); # skip preprocessor directives
|
||||
|
||||
s/\/\*.*?\*\///gs; # ignore comments
|
||||
s/{[^{}]*}//gs; # ignore {} blocks
|
||||
|
||||
if (/\{|\/\*/) { # Add a } so editor works...
|
||||
|
@ -128,27 +139,28 @@ while (($hdr, $lib) = each %libinc)
|
|||
$defnr++;
|
||||
print STDERR "def: $defnr\r" if $debug;
|
||||
|
||||
# The goal is to collect function names from function declarations.
|
||||
|
||||
s/^[\n\s]*//g;
|
||||
s/[\n\s]*$//g;
|
||||
next if(/typedef\W/);
|
||||
if (/\(\*(\w*)\([^\)]+/) {
|
||||
my $name = $1;
|
||||
|
||||
# Skip over recognized non-function declarations
|
||||
next if(/typedef\W/ or /DECLARE_STACK_OF/ or /TYPEDEF_.*_OF/);
|
||||
|
||||
# Reduce argument lists to empty ()
|
||||
# fold round brackets recursively: (t(*v)(t),t) -> (t{}{},t) -> {}
|
||||
while(/\(.*\)/s) {
|
||||
s/\([^\(\)]+\)/\{\}/gs;
|
||||
s/\(\s*\*\s*(\w+)\s*\{\}\s*\)/$1/gs; #(*f{}) -> f
|
||||
}
|
||||
# pretend as we didn't use curly braces: {} -> ()
|
||||
s/\{\}/\(\)/gs;
|
||||
|
||||
if (/(\w+)\s*\(\).*/s) { # first token prior [first] () is
|
||||
my $name = $1; # a function name!
|
||||
$name =~ tr/[a-z]/[A-Z]/;
|
||||
$ftrans{$name} = $1;
|
||||
} elsif (/\w+\W+(\w+)\W*\(\s*\)(\s*__attribute__\(.*\)\s*)?$/s){
|
||||
# K&R C
|
||||
next ;
|
||||
} elsif (/\w+\W+\w+\W*\(.*\)(\s*__attribute__\(.*\)\s*)?$/s) {
|
||||
while (not /\(\)(\s*__attribute__\(.*\)\s*)?$/s) {
|
||||
s/[^\(\)]*\)(\s*__attribute__\(.*\)\s*)?$/\)/s;
|
||||
s/\([^\(\)]*\)\)(\s*__attribute__\(.*\)\s*)?$/\)/s;
|
||||
}
|
||||
s/\(void\)//;
|
||||
/(\w+(\{[0-9]+\})?)\W*\(\)/s;
|
||||
my $name = $1;
|
||||
$name =~ tr/[a-z]/[A-Z]/;
|
||||
$ftrans{$name} = $1;
|
||||
} elsif (/\(/ and not (/=/ or /DECLARE_STACK/ or /TYPEDEF_D2I2D_OF/)) {
|
||||
} elsif (/[\(\)]/ and not (/=/)) {
|
||||
print STDERR "Header $hdr: cannot parse: $_;\n";
|
||||
}
|
||||
}
|
||||
|
@ -161,7 +173,7 @@ while (($hdr, $lib) = each %libinc)
|
|||
# maximum code used.
|
||||
|
||||
if ($gotfile) {
|
||||
while(<IN>) {
|
||||
while(<IN>) {
|
||||
if(/^\#define\s+(\S+)\s+(\S+)/) {
|
||||
$name = $1;
|
||||
$code = $2;
|
||||
|
@ -172,18 +184,49 @@ while (($hdr, $lib) = each %libinc)
|
|||
}
|
||||
if($1 eq "R") {
|
||||
$rcodes{$name} = $code;
|
||||
if ($rassigned{$lib} =~ /:$code:/) {
|
||||
print STDERR "!! ERROR: $lib reason code $code assigned twice\n";
|
||||
}
|
||||
$rassigned{$lib} .= "$code:";
|
||||
if(!(exists $rextra{$name}) &&
|
||||
($code > $rmax{$lib}) ) {
|
||||
$rmax{$lib} = $code;
|
||||
}
|
||||
} else {
|
||||
if ($fassigned{$lib} =~ /:$code:/) {
|
||||
print STDERR "!! ERROR: $lib function code $code assigned twice\n";
|
||||
}
|
||||
$fassigned{$lib} .= "$code:";
|
||||
if($code > $fmax{$lib}) {
|
||||
$fmax{$lib} = $code;
|
||||
}
|
||||
$fcodes{$name} = $code;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($debug) {
|
||||
if (defined($fmax{$lib})) {
|
||||
print STDERR "Max function code fmax" . "{" . "$lib" . "} = $fmax{$lib}\n";
|
||||
$fassigned{$lib} =~ m/^:(.*):$/;
|
||||
@fassigned = sort {$a <=> $b} split(":", $1);
|
||||
print STDERR " @fassigned\n";
|
||||
}
|
||||
if (defined($rmax{$lib})) {
|
||||
print STDERR "Max reason code rmax" . "{" . "$lib" . "} = $rmax{$lib}\n";
|
||||
$rassigned{$lib} =~ m/^:(.*):$/;
|
||||
@rassigned = sort {$a <=> $b} split(":", $1);
|
||||
print STDERR " @rassigned\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($lib eq "SSL") {
|
||||
if ($rmax{$lib} >= 1000) {
|
||||
print STDERR "!! ERROR: SSL error codes 1000+ are reserved for alerts.\n";
|
||||
print STDERR "!! Any new alerts must be added to $config.\n";
|
||||
print STDERR "\n";
|
||||
}
|
||||
}
|
||||
close IN;
|
||||
}
|
||||
|
@ -200,11 +243,10 @@ while (($hdr, $lib) = each %libinc)
|
|||
# so all those unreferenced can be printed out.
|
||||
|
||||
|
||||
print STDERR "Files loaded: " if $debug;
|
||||
foreach $file (@source) {
|
||||
# Don't parse the error source file.
|
||||
next if exists $cskip{$file};
|
||||
print STDERR $file if $debug;
|
||||
print STDERR "File loaded: ".$file."\r" if $debug;
|
||||
open(IN, "<$file") || die "Can't open source file $file\n";
|
||||
while(<IN>) {
|
||||
if(/(([A-Z0-9]+)_F_([A-Z0-9_]+))/) {
|
||||
|
@ -228,7 +270,7 @@ foreach $file (@source) {
|
|||
}
|
||||
close IN;
|
||||
}
|
||||
print STDERR "\n" if $debug;
|
||||
print STDERR " \n" if $debug;
|
||||
|
||||
# Now process each library in turn.
|
||||
|
||||
|
@ -355,7 +397,16 @@ EOF
|
|||
foreach $i (@function) {
|
||||
$z=6-int(length($i)/8);
|
||||
if($fcodes{$i} eq "X") {
|
||||
$fcodes{$i} = ++$fmax{$lib};
|
||||
$fassigned{$lib} =~ m/^:([^:]*):/;
|
||||
$findcode = $1;
|
||||
if (!defined($findcode)) {
|
||||
$findcode = $fmax{$lib};
|
||||
}
|
||||
while ($fassigned{$lib} =~ m/:$findcode:/) {
|
||||
$findcode++;
|
||||
}
|
||||
$fcodes{$i} = $findcode;
|
||||
$fassigned{$lib} .= "$findcode:";
|
||||
print STDERR "New Function code $i\n" if $debug;
|
||||
}
|
||||
printf OUT "#define $i%s $fcodes{$i}\n","\t" x $z;
|
||||
|
@ -366,7 +417,16 @@ EOF
|
|||
foreach $i (@reasons) {
|
||||
$z=6-int(length($i)/8);
|
||||
if($rcodes{$i} eq "X") {
|
||||
$rcodes{$i} = ++$rmax{$lib};
|
||||
$rassigned{$lib} =~ m/^:([^:]*):/;
|
||||
$findcode = $1;
|
||||
if (!defined($findcode)) {
|
||||
$findcode = $rmax{$lib};
|
||||
}
|
||||
while ($rassigned{$lib} =~ m/:$findcode:/) {
|
||||
$findcode++;
|
||||
}
|
||||
$rcodes{$i} = $findcode;
|
||||
$rassigned{$lib} .= "$findcode:";
|
||||
print STDERR "New Reason code $i\n" if $debug;
|
||||
}
|
||||
printf OUT "#define $i%s $rcodes{$i}\n","\t" x $z;
|
||||
|
|
|
@ -15,12 +15,14 @@
|
|||
# Apart from this, this script should be able to handle even the most
|
||||
# pathological cases.
|
||||
|
||||
use Cwd;
|
||||
|
||||
my $from = shift;
|
||||
my @files = @ARGV;
|
||||
|
||||
my @from_path = split(/[\\\/]/, $from);
|
||||
my $pwd = `pwd`;
|
||||
chop($pwd);
|
||||
my $pwd = getcwd();
|
||||
chomp($pwd);
|
||||
my @pwd_path = split(/[\\\/]/, $pwd);
|
||||
|
||||
my @to_path = ();
|
||||
|
|
|
@ -68,6 +68,7 @@ if (!$no_asm)
|
|||
$sha1_asm_src="crypto/sha/asm/s1-os2.asm";
|
||||
$rmd160_asm_obj="crypto/ripemd/asm/rm-os2$obj";
|
||||
$rmd160_asm_src="crypto/ripemd/asm/rm-os2.asm";
|
||||
$cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DOPENSSL_BN_ASM_PART_WORDS";
|
||||
}
|
||||
|
||||
if ($shlib)
|
||||
|
|
|
@ -7,9 +7,12 @@ $ssl= "ssleay32";
|
|||
$crypto="libeay32";
|
||||
|
||||
$o='\\';
|
||||
$cp='copy nul+'; # Timestamps get stuffed otherwise
|
||||
$cp='$(PERL) util/copy.pl';
|
||||
$mkdir='$(PERL) util/mkdir-p.pl';
|
||||
$rm='del';
|
||||
|
||||
$zlib_lib="zlib1.lib";
|
||||
|
||||
# C compiler stuff
|
||||
$cc='cl';
|
||||
if ($FLAVOR =~ /WIN64/)
|
||||
|
@ -26,7 +29,8 @@ if ($FLAVOR =~ /WIN64/)
|
|||
# considered safe to ignore.
|
||||
#
|
||||
$base_cflags=' /W3 /Gs0 /GF /Gy /nologo -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DOPENSSL_SYSNAME_WIN32 -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE';
|
||||
$base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8
|
||||
$base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8
|
||||
$base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE'; # shut up VC8
|
||||
$opt_cflags=' /MD /Ox';
|
||||
$dbg_cflags=' /MDd /Od -DDEBUG -D_DEBUG';
|
||||
$lflags="/nologo /subsystem:console /opt:ref";
|
||||
|
@ -89,9 +93,10 @@ else # Win32
|
|||
{
|
||||
$base_cflags=' /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32';
|
||||
$base_cflags.=' -D_CRT_SECURE_NO_DEPRECATE'; # shut up VC8
|
||||
$base_cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE'; # shut up VC8
|
||||
$opt_cflags=' /MD /Ox /O2 /Ob2';
|
||||
$dbg_cflags=' /MDd /Od -DDEBUG -D_DEBUG';
|
||||
$lflags="/nologo /subsystem:console /machine:I386 /opt:ref";
|
||||
$lflags="/nologo /subsystem:console /opt:ref";
|
||||
}
|
||||
$mlflags='';
|
||||
|
||||
|
@ -140,7 +145,6 @@ if ($FLAVOR =~ /NT/)
|
|||
$cflags.=" -DOPENSSL_SYSNAME_WINNT -DUNICODE -D_UNICODE";
|
||||
$ex_libs="unicows.lib $ex_libs";
|
||||
}
|
||||
|
||||
# static library stuff
|
||||
$mklib='lib';
|
||||
$ranlib='';
|
||||
|
@ -235,10 +239,14 @@ $cflags.=" /Fd$out_def";
|
|||
sub do_lib_rule
|
||||
{
|
||||
local($objs,$target,$name,$shlib)=@_;
|
||||
local($ret,$Name);
|
||||
local($ret);
|
||||
|
||||
$taget =~ s/\//$o/g if $o ne '/';
|
||||
($Name=$name) =~ tr/a-z/A-Z/;
|
||||
if ($name ne "")
|
||||
{
|
||||
$name =~ tr/a-z/A-Z/;
|
||||
$name = "/def:ms/${name}.def";
|
||||
}
|
||||
|
||||
# $target="\$(LIB_D)$o$target";
|
||||
$ret.="$target: $objs\n";
|
||||
|
@ -250,8 +258,12 @@ sub do_lib_rule
|
|||
}
|
||||
else
|
||||
{
|
||||
local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':'';
|
||||
if ($FLAVOR =~ /CE/)
|
||||
local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)';
|
||||
if ($name eq "")
|
||||
{
|
||||
$ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
|
||||
}
|
||||
elsif ($FLAVOR =~ /CE/)
|
||||
{
|
||||
$ex.=' winsock.lib $(WCECOMPAT)/lib/wcecompatex.lib';
|
||||
}
|
||||
|
@ -261,7 +273,9 @@ sub do_lib_rule
|
|||
$ex.=' wsock32.lib gdi32.lib advapi32.lib user32.lib';
|
||||
$ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
|
||||
}
|
||||
$ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
|
||||
$ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/;
|
||||
$ret.="\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
|
||||
$ret.="\tIF EXIST \$@.manifest mt -manifest \$@.manifest -outputresource:\$@;2\n\n";
|
||||
}
|
||||
$ret.="\n";
|
||||
return($ret);
|
||||
|
@ -275,8 +289,9 @@ sub do_link_rule
|
|||
$file =~ s/\//$o/g if $o ne '/';
|
||||
$n=&bname($targer);
|
||||
$ret.="$target: $files $dep_libs\n";
|
||||
$ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n";
|
||||
$ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n\n";
|
||||
$ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n";
|
||||
$ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n";
|
||||
$ret.="\tIF EXIST \$@.manifest mt -manifest \$@.manifest -outputresource:\$@;1\n\n";
|
||||
return($ret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue