Update openssl to 0.9.8zb

Also update to Tiano Cryptlib r15802 and remove the execute mode
bits from the C and header files of openssl
This commit is contained in:
Gary Ching-Pang Lin 2014-08-19 14:20:23 -04:00 committed by Peter Jones
parent 221faac51b
commit 5cbe75a3fa
500 changed files with 729 additions and 687 deletions

0
Cryptlib/OpenSSL/crypto/aes/aes_cbc.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/aes/aes_cfb.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/aes/aes_core.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/aes/aes_ctr.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/aes/aes_ecb.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/aes/aes_ige.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/aes/aes_misc.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/aes/aes_ofb.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/aes/aes_wrap.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_bitstr.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_bool.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_bytes.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_d2i_fp.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_digest.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_dup.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_enum.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_gentm.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_hdr.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_i2d_fp.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_int.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_mbstr.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_meth.c Executable file → Normal file
View File

30
Cryptlib/OpenSSL/crypto/asn1/a_object.c Executable file → Normal file
View File

@ -285,16 +285,28 @@ err:
ASN1_OBJECT_free(ret);
return(NULL);
}
ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
long len)
{
ASN1_OBJECT *ret=NULL;
const unsigned char *p;
int i;
/* Sanity check OID encoding: can't have leading 0x80 in
* subidentifiers, see: X.690 8.19.2
int i, length;
/* Sanity check OID encoding.
* Need at least one content octet.
* MSB must be clear in the last octet.
* can't have leading 0x80 in subidentifiers, see: X.690 8.19.2
*/
for (i = 0, p = *pp; i < len; i++, p++)
if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL ||
p[len - 1] & 0x80)
{
ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING);
return NULL;
}
/* Now 0 < len <= INT_MAX, so the cast is safe. */
length = (int)len;
for (i = 0; i < length; i++, p++)
{
if (*p == 0x80 && (!i || !(p[-1] & 0x80)))
{
@ -313,20 +325,20 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
else ret=(*a);
p= *pp;
if ((ret->data == NULL) || (ret->length < len))
if ((ret->data == NULL) || (ret->length < length))
{
if (ret->data != NULL) OPENSSL_free(ret->data);
ret->data=(unsigned char *)OPENSSL_malloc(len ? (int)len : 1);
ret->data=(unsigned char *)OPENSSL_malloc(length);
ret->flags|=ASN1_OBJECT_FLAG_DYNAMIC_DATA;
if (ret->data == NULL)
{ i=ERR_R_MALLOC_FAILURE; goto err; }
}
memcpy(ret->data,p,(int)len);
ret->length=(int)len;
memcpy(ret->data,p,length);
ret->length=length;
ret->sn=NULL;
ret->ln=NULL;
/* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */
p+=len;
p+=length;
if (a != NULL) (*a)=ret;
*pp=p;

0
Cryptlib/OpenSSL/crypto/asn1/a_octet.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_print.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_set.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_sign.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_strex.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_strnid.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_time.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_type.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_utctm.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_utf8.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/a_verify.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/asn1_err.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/asn1_gen.c Executable file → Normal file
View File

3
Cryptlib/OpenSSL/crypto/asn1/asn1_lib.c Executable file → Normal file
View File

@ -131,6 +131,9 @@ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
*pclass=xclass;
if (!asn1_get_length(&p,&inf,plength,(int)max)) goto err;
if (inf && !(ret & V_ASN1_CONSTRUCTED))
goto err;
#if 0
fprintf(stderr,"p=%d + *plength=%ld > omax=%ld + *pp=%d (%d > %d)\n",
(int)p,*plength,omax,(int)*pp,(int)(p+ *plength),

0
Cryptlib/OpenSSL/crypto/asn1/asn1_par.c Executable file → Normal file
View File

2
Cryptlib/OpenSSL/crypto/asn1/asn_mime.c Executable file → Normal file
View File

@ -595,6 +595,8 @@ static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio)
int len, state, save_state = 0;
headers = sk_MIME_HEADER_new(mime_hdr_cmp);
if (!headers)
return NULL;
while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
/* If whitespace at line start then continuation line */
if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME;

0
Cryptlib/OpenSSL/crypto/asn1/asn_moid.c Executable file → Normal file
View File

12
Cryptlib/OpenSSL/crypto/asn1/asn_pack.c Executable file → Normal file
View File

@ -134,15 +134,23 @@ ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, ASN1_STRING **oct)
if (!(octmp->length = i2d(obj, NULL))) {
ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR);
return NULL;
goto err;
}
if (!(p = OPENSSL_malloc (octmp->length))) {
ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE);
return NULL;
goto err;
}
octmp->data = p;
i2d (obj, &p);
return octmp;
err:
if (!oct || !*oct)
{
ASN1_STRING_free(octmp);
if (oct)
*oct = NULL;
}
return NULL;
}
#endif

0
Cryptlib/OpenSSL/crypto/asn1/d2i_pr.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/d2i_pu.c Executable file → Normal file
View File

6
Cryptlib/OpenSSL/crypto/asn1/evp_asn1.c Executable file → Normal file
View File

@ -66,7 +66,11 @@ int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)
ASN1_STRING *os;
if ((os=M_ASN1_OCTET_STRING_new()) == NULL) return(0);
if (!M_ASN1_OCTET_STRING_set(os,data,len)) return(0);
if (!M_ASN1_OCTET_STRING_set(os,data,len))
{
M_ASN1_OCTET_STRING_free(os);
return 0;
}
ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,os);
return(1);
}

0
Cryptlib/OpenSSL/crypto/asn1/f_enum.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/f_int.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/f_string.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/i2d_pr.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/i2d_pu.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/n_pkey.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/nsseq.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/p5_pbe.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/p5_pbev2.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/p8_pkey.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/t_bitst.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/t_crl.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/t_pkey.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/t_req.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/t_spki.c Executable file → Normal file
View File

2
Cryptlib/OpenSSL/crypto/asn1/t_x509.c Executable file → Normal file
View File

@ -465,6 +465,8 @@ int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
l=80-2-obase;
b=X509_NAME_oneline(name,NULL,0);
if (!b)
return 0;
if (!*b)
{
OPENSSL_free(b);

0
Cryptlib/OpenSSL/crypto/asn1/t_x509a.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/tasn_dec.c Executable file → Normal file
View File

9
Cryptlib/OpenSSL/crypto/asn1/tasn_enc.c Executable file → Normal file
View File

@ -453,9 +453,14 @@ static int asn1_set_seq_out(STACK_OF(ASN1_VALUE) *sk, unsigned char **out,
{
derlst = OPENSSL_malloc(sk_ASN1_VALUE_num(sk)
* sizeof(*derlst));
tmpdat = OPENSSL_malloc(skcontlen);
if (!derlst || !tmpdat)
if (!derlst)
return 0;
tmpdat = OPENSSL_malloc(skcontlen);
if (!tmpdat)
{
OPENSSL_free(derlst);
return 0;
}
}
}
/* If not sorting just output each item */

0
Cryptlib/OpenSSL/crypto/asn1/tasn_fre.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/tasn_new.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/tasn_typ.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/tasn_utl.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_algor.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_attrib.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_bignum.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_crl.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_exten.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_info.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_long.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_name.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_pkey.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_pubkey.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_req.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_sig.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_spki.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_val.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_x509.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/asn1/x_x509a.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bf/bf_cfb64.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bf/bf_ecb.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bf/bf_enc.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bf/bf_ofb64.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bf/bf_skey.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/b_dump.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bf_buff.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bf_nbio.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bf_null.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bio_cb.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bio_err.c Executable file → Normal file
View File

4
Cryptlib/OpenSSL/crypto/bio/bio_lib.c Executable file → Normal file
View File

@ -132,8 +132,8 @@ int BIO_free(BIO *a)
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
if ((a->method == NULL) || (a->method->destroy == NULL)) return(1);
a->method->destroy(a);
if ((a->method != NULL) && (a->method->destroy != NULL))
a->method->destroy(a);
OPENSSL_free(a);
return(1);
}

0
Cryptlib/OpenSSL/crypto/bio/bss_bio.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bss_dgram.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bss_fd.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bss_file.c Executable file → Normal file
View File

0
Cryptlib/OpenSSL/crypto/bio/bss_log.c Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More