mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-08-07 14:11:00 +00:00
Update to openssl 1.0.2h
Signed-off-by: Gary Lin <glin@suse.com>
This commit is contained in:
parent
d8b0e8e0ce
commit
8dcfecc6c7
@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
# include <openssl/crypto.h>
|
# include <openssl/crypto.h>
|
||||||
|
|
||||||
|
# ifdef OPENSSL_NO_COMP
|
||||||
|
# error COMP is disabled.
|
||||||
|
# endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -135,9 +135,9 @@ char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
|||||||
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
||||||
const char *name);
|
const char *name);
|
||||||
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
||||||
#ifndef OPENSSL_NO_FP_API
|
# ifndef OPENSSL_NO_FP_API
|
||||||
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
||||||
#endif
|
# endif
|
||||||
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
||||||
|
|
||||||
void OPENSSL_config(const char *config_name);
|
void OPENSSL_config(const char *config_name);
|
||||||
@ -176,9 +176,9 @@ STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
|||||||
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
||||||
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
||||||
long *result);
|
long *result);
|
||||||
#ifndef OPENSSL_NO_FP_API
|
# ifndef OPENSSL_NO_FP_API
|
||||||
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
||||||
#endif
|
# endif
|
||||||
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
||||||
|
|
||||||
# if 0 /* The following function has no error
|
# if 0 /* The following function has no error
|
||||||
@ -192,10 +192,10 @@ long NCONF_get_number(CONF *conf, char *group, char *name);
|
|||||||
|
|
||||||
int CONF_modules_load(const CONF *cnf, const char *appname,
|
int CONF_modules_load(const CONF *cnf, const char *appname,
|
||||||
unsigned long flags);
|
unsigned long flags);
|
||||||
#ifndef OPENSSL_NO_STDIO
|
# ifndef OPENSSL_NO_STDIO
|
||||||
int CONF_modules_load_file(const char *filename, const char *appname,
|
int CONF_modules_load_file(const char *filename, const char *appname,
|
||||||
unsigned long flags);
|
unsigned long flags);
|
||||||
#endif
|
# endif
|
||||||
void CONF_modules_unload(int all);
|
void CONF_modules_unload(int all);
|
||||||
void CONF_modules_finish(void);
|
void CONF_modules_finish(void);
|
||||||
void CONF_modules_free(void);
|
void CONF_modules_free(void);
|
||||||
|
@ -30,11 +30,11 @@ extern "C" {
|
|||||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||||
* major minor fix final patch/beta)
|
* major minor fix final patch/beta)
|
||||||
*/
|
*/
|
||||||
# define OPENSSL_VERSION_NUMBER 0x1000207fL
|
# define OPENSSL_VERSION_NUMBER 0x1000208fL
|
||||||
# ifdef OPENSSL_FIPS
|
# ifdef OPENSSL_FIPS
|
||||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2g-fips 1 Mar 2016"
|
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2h-fips 3 May 2016"
|
||||||
# else
|
# else
|
||||||
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2g 1 Mar 2016"
|
# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2h 3 May 2016"
|
||||||
# endif
|
# endif
|
||||||
# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
# define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||||
|
|
||||||
|
@ -515,6 +515,7 @@ int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
|
|||||||
char *kstr, int klen, pem_password_cb *cd,
|
char *kstr, int klen, pem_password_cb *cd,
|
||||||
void *u);
|
void *u);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
|
EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
|
||||||
int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x);
|
int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x);
|
||||||
|
|
||||||
|
@ -122,6 +122,7 @@ int SRP_VBASE_free(SRP_VBASE *vb);
|
|||||||
#ifndef OPENSSL_NO_STDIO
|
#ifndef OPENSSL_NO_STDIO
|
||||||
int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);
|
int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This method ignores the configured seed and fails for an unknown user. */
|
/* This method ignores the configured seed and fails for an unknown user. */
|
||||||
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
|
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
|
||||||
/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/
|
/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/
|
||||||
|
@ -338,7 +338,7 @@ extern "C" {
|
|||||||
* The following cipher list is used by default. It also is substituted when
|
* The following cipher list is used by default. It also is substituted when
|
||||||
* an application-defined cipher list string starts with 'DEFAULT'.
|
* an application-defined cipher list string starts with 'DEFAULT'.
|
||||||
*/
|
*/
|
||||||
# define SSL_DEFAULT_CIPHER_LIST "ALL:!EXPORT:!aNULL:!eNULL:!SSLv2"
|
# define SSL_DEFAULT_CIPHER_LIST "ALL:!EXPORT:!LOW:!aNULL:!eNULL:!SSLv2"
|
||||||
/*
|
/*
|
||||||
* As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always
|
* As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always
|
||||||
* starts with a reasonable order, and all we have to do for DEFAULT is
|
* starts with a reasonable order, and all we have to do for DEFAULT is
|
||||||
@ -2345,7 +2345,7 @@ const char *SSL_get_version(const SSL *s);
|
|||||||
/* This sets the 'default' SSL version that SSL_new() will create */
|
/* This sets the 'default' SSL version that SSL_new() will create */
|
||||||
int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
|
int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
|
||||||
|
|
||||||
# ifndef OPENSSL_NO_SSL2
|
# ifndef OPENSSL_NO_SSL2_METHOD
|
||||||
const SSL_METHOD *SSLv2_method(void); /* SSLv2 */
|
const SSL_METHOD *SSLv2_method(void); /* SSLv2 */
|
||||||
const SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */
|
const SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */
|
||||||
const SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */
|
const SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */
|
||||||
|
@ -1305,6 +1305,7 @@ void ERR_load_X509_strings(void);
|
|||||||
# define X509_R_LOADING_CERT_DIR 103
|
# define X509_R_LOADING_CERT_DIR 103
|
||||||
# define X509_R_LOADING_DEFAULTS 104
|
# define X509_R_LOADING_DEFAULTS 104
|
||||||
# define X509_R_METHOD_NOT_SUPPORTED 124
|
# define X509_R_METHOD_NOT_SUPPORTED 124
|
||||||
|
# define X509_R_NAME_TOO_LONG 134
|
||||||
# define X509_R_NEWER_CRL_NOT_NEWER 132
|
# define X509_R_NEWER_CRL_NOT_NEWER 132
|
||||||
# define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105
|
# define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105
|
||||||
# define X509_R_NO_CRL_NUMBER 130
|
# define X509_R_NO_CRL_NUMBER 130
|
||||||
|
@ -200,13 +200,13 @@ ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
|
|||||||
} else {
|
} else {
|
||||||
if (len != 0) {
|
if (len != 0) {
|
||||||
if ((ret->length < len) || (ret->data == NULL)) {
|
if ((ret->length < len) || (ret->data == NULL)) {
|
||||||
if (ret->data != NULL)
|
|
||||||
OPENSSL_free(ret->data);
|
|
||||||
s = (unsigned char *)OPENSSL_malloc((int)len + 1);
|
s = (unsigned char *)OPENSSL_malloc((int)len + 1);
|
||||||
if (s == NULL) {
|
if (s == NULL) {
|
||||||
i = ERR_R_MALLOC_FAILURE;
|
i = ERR_R_MALLOC_FAILURE;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
if (ret->data != NULL)
|
||||||
|
OPENSSL_free(ret->data);
|
||||||
} else
|
} else
|
||||||
s = ret->data;
|
s = ret->data;
|
||||||
memcpy(s, p, (int)len);
|
memcpy(s, p, (int)len);
|
||||||
|
@ -141,6 +141,7 @@ void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define HEADER_SIZE 8
|
#define HEADER_SIZE 8
|
||||||
|
#define ASN1_CHUNK_INITIAL_SIZE (16 * 1024)
|
||||||
static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
||||||
{
|
{
|
||||||
BUF_MEM *b;
|
BUF_MEM *b;
|
||||||
@ -217,29 +218,44 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
|||||||
/* suck in c.slen bytes of data */
|
/* suck in c.slen bytes of data */
|
||||||
want = c.slen;
|
want = c.slen;
|
||||||
if (want > (len - off)) {
|
if (want > (len - off)) {
|
||||||
|
size_t chunk_max = ASN1_CHUNK_INITIAL_SIZE;
|
||||||
|
|
||||||
want -= (len - off);
|
want -= (len - off);
|
||||||
if (want > INT_MAX /* BIO_read takes an int length */ ||
|
if (want > INT_MAX /* BIO_read takes an int length */ ||
|
||||||
len + want < len) {
|
len + want < len) {
|
||||||
ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ASN1_R_TOO_LONG);
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ASN1_R_TOO_LONG);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (!BUF_MEM_grow_clean(b, len + want)) {
|
|
||||||
ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ERR_R_MALLOC_FAILURE);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
while (want > 0) {
|
while (want > 0) {
|
||||||
i = BIO_read(in, &(b->data[len]), want);
|
/*
|
||||||
if (i <= 0) {
|
* Read content in chunks of increasing size
|
||||||
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,
|
* so we can return an error for EOF without
|
||||||
ASN1_R_NOT_ENOUGH_DATA);
|
* having to allocate the entire content length
|
||||||
|
* in one go.
|
||||||
|
*/
|
||||||
|
size_t chunk = want > chunk_max ? chunk_max : want;
|
||||||
|
|
||||||
|
if (!BUF_MEM_grow_clean(b, len + chunk)) {
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO, ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
want -= chunk;
|
||||||
|
while (chunk > 0) {
|
||||||
|
i = BIO_read(in, &(b->data[len]), chunk);
|
||||||
|
if (i <= 0) {
|
||||||
|
ASN1err(ASN1_F_ASN1_D2I_READ_BIO,
|
||||||
|
ASN1_R_NOT_ENOUGH_DATA);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* This can't overflow because |len+want| didn't
|
* This can't overflow because |len+want| didn't
|
||||||
* overflow.
|
* overflow.
|
||||||
*/
|
*/
|
||||||
len += i;
|
len += i;
|
||||||
want -= i;
|
chunk -= i;
|
||||||
|
}
|
||||||
|
if (chunk_max < INT_MAX/2)
|
||||||
|
chunk_max *= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (off + c.slen < off) {
|
if (off + c.slen < off) {
|
||||||
|
@ -126,9 +126,7 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b)
|
|||||||
result = 0; /* They do not have content. */
|
result = 0; /* They do not have content. */
|
||||||
break;
|
break;
|
||||||
case V_ASN1_INTEGER:
|
case V_ASN1_INTEGER:
|
||||||
case V_ASN1_NEG_INTEGER:
|
|
||||||
case V_ASN1_ENUMERATED:
|
case V_ASN1_ENUMERATED:
|
||||||
case V_ASN1_NEG_ENUMERATED:
|
|
||||||
case V_ASN1_BIT_STRING:
|
case V_ASN1_BIT_STRING:
|
||||||
case V_ASN1_OCTET_STRING:
|
case V_ASN1_OCTET_STRING:
|
||||||
case V_ASN1_SEQUENCE:
|
case V_ASN1_SEQUENCE:
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
#include <openssl/asn1_mac.h>
|
#include <openssl/asn1_mac.h>
|
||||||
|
|
||||||
static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
|
static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
|
||||||
int max);
|
long max);
|
||||||
static void asn1_put_length(unsigned char **pp, int length);
|
static void asn1_put_length(unsigned char **pp, int length);
|
||||||
const char ASN1_version[] = "ASN.1" OPENSSL_VERSION_PTEXT;
|
const char ASN1_version[] = "ASN.1" OPENSSL_VERSION_PTEXT;
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
|
|||||||
}
|
}
|
||||||
*ptag = tag;
|
*ptag = tag;
|
||||||
*pclass = xclass;
|
*pclass = xclass;
|
||||||
if (!asn1_get_length(&p, &inf, plength, (int)max))
|
if (!asn1_get_length(&p, &inf, plength, max))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (inf && !(ret & V_ASN1_CONSTRUCTED))
|
if (inf && !(ret & V_ASN1_CONSTRUCTED))
|
||||||
@ -159,14 +159,14 @@ int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
|
static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
|
||||||
int max)
|
long max)
|
||||||
{
|
{
|
||||||
const unsigned char *p = *pp;
|
const unsigned char *p = *pp;
|
||||||
unsigned long ret = 0;
|
unsigned long ret = 0;
|
||||||
unsigned int i;
|
unsigned long i;
|
||||||
|
|
||||||
if (max-- < 1)
|
if (max-- < 1)
|
||||||
return (0);
|
return 0;
|
||||||
if (*p == 0x80) {
|
if (*p == 0x80) {
|
||||||
*inf = 1;
|
*inf = 1;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -175,15 +175,11 @@ static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
|
|||||||
*inf = 0;
|
*inf = 0;
|
||||||
i = *p & 0x7f;
|
i = *p & 0x7f;
|
||||||
if (*(p++) & 0x80) {
|
if (*(p++) & 0x80) {
|
||||||
if (i > sizeof(long))
|
if (i > sizeof(ret) || max < (long)i)
|
||||||
return 0;
|
return 0;
|
||||||
if (max-- == 0)
|
|
||||||
return (0);
|
|
||||||
while (i-- > 0) {
|
while (i-- > 0) {
|
||||||
ret <<= 8L;
|
ret <<= 8L;
|
||||||
ret |= *(p++);
|
ret |= *(p++);
|
||||||
if (max-- == 0)
|
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
ret = i;
|
ret = i;
|
||||||
@ -192,7 +188,7 @@ static int asn1_get_length(const unsigned char **pp, int *inf, long *rl,
|
|||||||
return 0;
|
return 0;
|
||||||
*pp = p;
|
*pp = p;
|
||||||
*rl = (long)ret;
|
*rl = (long)ret;
|
||||||
return (1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -173,6 +173,8 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length,
|
|||||||
if (!asn1_print_info(bp, tag, xclass, j, (indent) ? depth : 0))
|
if (!asn1_print_info(bp, tag, xclass, j, (indent) ? depth : 0))
|
||||||
goto end;
|
goto end;
|
||||||
if (j & V_ASN1_CONSTRUCTED) {
|
if (j & V_ASN1_CONSTRUCTED) {
|
||||||
|
const unsigned char *sp;
|
||||||
|
|
||||||
ep = p + len;
|
ep = p + len;
|
||||||
if (BIO_write(bp, "\n", 1) <= 0)
|
if (BIO_write(bp, "\n", 1) <= 0)
|
||||||
goto end;
|
goto end;
|
||||||
@ -182,6 +184,7 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length,
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if ((j == 0x21) && (len == 0)) {
|
if ((j == 0x21) && (len == 0)) {
|
||||||
|
sp = p;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
r = asn1_parse2(bp, &p, (long)(tot - p),
|
r = asn1_parse2(bp, &p, (long)(tot - p),
|
||||||
offset + (p - *pp), depth + 1,
|
offset + (p - *pp), depth + 1,
|
||||||
@ -190,19 +193,25 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
if ((r == 2) || (p >= tot))
|
if ((r == 2) || (p >= tot)) {
|
||||||
|
len = p - sp;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
|
long tmp = len;
|
||||||
|
|
||||||
while (p < ep) {
|
while (p < ep) {
|
||||||
r = asn1_parse2(bp, &p, (long)len,
|
sp = p;
|
||||||
offset + (p - *pp), depth + 1,
|
r = asn1_parse2(bp, &p, tmp, offset + (p - *pp), depth + 1,
|
||||||
indent, dump);
|
indent, dump);
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
tmp -= p - sp;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (xclass != 0) {
|
} else if (xclass != 0) {
|
||||||
p += len;
|
p += len;
|
||||||
if (BIO_write(bp, "\n", 1) <= 0)
|
if (BIO_write(bp, "\n", 1) <= 0)
|
||||||
|
@ -140,7 +140,8 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags,
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
bs = X509_get_serialNumber(x);
|
bs = X509_get_serialNumber(x);
|
||||||
if (bs->length <= (int)sizeof(long)) {
|
if (bs->length < (int)sizeof(long)
|
||||||
|
|| (bs->length == sizeof(long) && (bs->data[0] & 0x80) == 0)) {
|
||||||
l = ASN1_INTEGER_get(bs);
|
l = ASN1_INTEGER_get(bs);
|
||||||
if (bs->type == V_ASN1_NEG_INTEGER) {
|
if (bs->type == V_ASN1_NEG_INTEGER) {
|
||||||
l = -l;
|
l = -l;
|
||||||
|
@ -901,9 +901,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case V_ASN1_INTEGER:
|
case V_ASN1_INTEGER:
|
||||||
case V_ASN1_NEG_INTEGER:
|
|
||||||
case V_ASN1_ENUMERATED:
|
case V_ASN1_ENUMERATED:
|
||||||
case V_ASN1_NEG_ENUMERATED:
|
|
||||||
tint = (ASN1_INTEGER **)pval;
|
tint = (ASN1_INTEGER **)pval;
|
||||||
if (!c2i_ASN1_INTEGER(tint, &cont, len))
|
if (!c2i_ASN1_INTEGER(tint, &cont, len))
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -611,9 +611,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case V_ASN1_INTEGER:
|
case V_ASN1_INTEGER:
|
||||||
case V_ASN1_NEG_INTEGER:
|
|
||||||
case V_ASN1_ENUMERATED:
|
case V_ASN1_ENUMERATED:
|
||||||
case V_ASN1_NEG_ENUMERATED:
|
|
||||||
/*
|
/*
|
||||||
* These are all have the same content format as ASN1_INTEGER
|
* These are all have the same content format as ASN1_INTEGER
|
||||||
*/
|
*/
|
||||||
|
@ -66,6 +66,13 @@
|
|||||||
typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY;
|
typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY;
|
||||||
DECLARE_STACK_OF(STACK_OF_X509_NAME_ENTRY)
|
DECLARE_STACK_OF(STACK_OF_X509_NAME_ENTRY)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Maximum length of X509_NAME: much larger than anything we should
|
||||||
|
* ever see in practice.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define X509_NAME_MAX (1024 * 1024)
|
||||||
|
|
||||||
static int x509_name_ex_d2i(ASN1_VALUE **val,
|
static int x509_name_ex_d2i(ASN1_VALUE **val,
|
||||||
const unsigned char **in, long len,
|
const unsigned char **in, long len,
|
||||||
const ASN1_ITEM *it,
|
const ASN1_ITEM *it,
|
||||||
@ -192,6 +199,10 @@ static int x509_name_ex_d2i(ASN1_VALUE **val,
|
|||||||
int i, j, ret;
|
int i, j, ret;
|
||||||
STACK_OF(X509_NAME_ENTRY) *entries;
|
STACK_OF(X509_NAME_ENTRY) *entries;
|
||||||
X509_NAME_ENTRY *entry;
|
X509_NAME_ENTRY *entry;
|
||||||
|
if (len > X509_NAME_MAX) {
|
||||||
|
ASN1err(ASN1_F_X509_NAME_EX_D2I, ASN1_R_TOO_LONG);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
q = p;
|
q = p;
|
||||||
|
|
||||||
/* Get internal representation of Name */
|
/* Get internal representation of Name */
|
||||||
|
@ -201,10 +201,20 @@ X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
|
|||||||
|
|
||||||
int i2d_X509_AUX(X509 *a, unsigned char **pp)
|
int i2d_X509_AUX(X509 *a, unsigned char **pp)
|
||||||
{
|
{
|
||||||
int length;
|
int length, tmplen;
|
||||||
|
unsigned char *start = pp != NULL ? *pp : NULL;
|
||||||
length = i2d_X509(a, pp);
|
length = i2d_X509(a, pp);
|
||||||
if (a)
|
if (length < 0 || a == NULL)
|
||||||
length += i2d_X509_CERT_AUX(a->aux, pp);
|
return length;
|
||||||
|
|
||||||
|
tmplen = i2d_X509_CERT_AUX(a->aux, pp);
|
||||||
|
if (tmplen < 0) {
|
||||||
|
if (start != NULL)
|
||||||
|
*pp = start;
|
||||||
|
return tmplen;
|
||||||
|
}
|
||||||
|
length += tmplen;
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
|
|||||||
|
|
||||||
mods = OPENSSL_malloc(sizeof(*mods) * NUMPRIMES);
|
mods = OPENSSL_malloc(sizeof(*mods) * NUMPRIMES);
|
||||||
if (mods == NULL)
|
if (mods == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
ctx = BN_CTX_new();
|
ctx = BN_CTX_new();
|
||||||
if (ctx == NULL)
|
if (ctx == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -455,7 +455,6 @@ static int pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key,
|
|||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_CMS
|
#ifndef OPENSSL_NO_CMS
|
||||||
else if (dctx->kdf_type == EVP_PKEY_DH_KDF_X9_42) {
|
else if (dctx->kdf_type == EVP_PKEY_DH_KDF_X9_42) {
|
||||||
|
|
||||||
unsigned char *Z = NULL;
|
unsigned char *Z = NULL;
|
||||||
size_t Zlen = 0;
|
size_t Zlen = 0;
|
||||||
if (!dctx->kdf_outlen || !dctx->kdf_oid)
|
if (!dctx->kdf_outlen || !dctx->kdf_oid)
|
||||||
|
@ -212,8 +212,10 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (ctx->digest != type) {
|
if (ctx->digest != type) {
|
||||||
if (ctx->digest && ctx->digest->ctx_size)
|
if (ctx->digest && ctx->digest->ctx_size) {
|
||||||
OPENSSL_free(ctx->md_data);
|
OPENSSL_free(ctx->md_data);
|
||||||
|
ctx->md_data = NULL;
|
||||||
|
}
|
||||||
ctx->digest = type;
|
ctx->digest = type;
|
||||||
if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) {
|
if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) {
|
||||||
ctx->update = type->update;
|
ctx->update = type->update;
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
# include <openssl/sha.h>
|
# include <openssl/sha.h>
|
||||||
# include <openssl/rand.h>
|
# include <openssl/rand.h>
|
||||||
# include "modes_lcl.h"
|
# include "modes_lcl.h"
|
||||||
|
# include "constant_time_locl.h"
|
||||||
|
|
||||||
# ifndef EVP_CIPH_FLAG_AEAD_CIPHER
|
# ifndef EVP_CIPH_FLAG_AEAD_CIPHER
|
||||||
# define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
|
# define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
|
||||||
@ -578,6 +579,8 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
|||||||
maxpad |= (255 - maxpad) >> (sizeof(maxpad) * 8 - 8);
|
maxpad |= (255 - maxpad) >> (sizeof(maxpad) * 8 - 8);
|
||||||
maxpad &= 255;
|
maxpad &= 255;
|
||||||
|
|
||||||
|
ret &= constant_time_ge(maxpad, pad);
|
||||||
|
|
||||||
inp_len = len - (SHA_DIGEST_LENGTH + pad + 1);
|
inp_len = len - (SHA_DIGEST_LENGTH + pad + 1);
|
||||||
mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1)));
|
mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1)));
|
||||||
inp_len &= mask;
|
inp_len &= mask;
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
# include <openssl/sha.h>
|
# include <openssl/sha.h>
|
||||||
# include <openssl/rand.h>
|
# include <openssl/rand.h>
|
||||||
# include "modes_lcl.h"
|
# include "modes_lcl.h"
|
||||||
|
# include "constant_time_locl.h"
|
||||||
|
|
||||||
# ifndef EVP_CIPH_FLAG_AEAD_CIPHER
|
# ifndef EVP_CIPH_FLAG_AEAD_CIPHER
|
||||||
# define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
|
# define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
|
||||||
@ -589,6 +590,8 @@ static int aesni_cbc_hmac_sha256_cipher(EVP_CIPHER_CTX *ctx,
|
|||||||
maxpad |= (255 - maxpad) >> (sizeof(maxpad) * 8 - 8);
|
maxpad |= (255 - maxpad) >> (sizeof(maxpad) * 8 - 8);
|
||||||
maxpad &= 255;
|
maxpad &= 255;
|
||||||
|
|
||||||
|
ret &= constant_time_ge(maxpad, pad);
|
||||||
|
|
||||||
inp_len = len - (SHA256_DIGEST_LENGTH + pad + 1);
|
inp_len = len - (SHA256_DIGEST_LENGTH + pad + 1);
|
||||||
mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1)));
|
mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1)));
|
||||||
inp_len &= mask;
|
inp_len &= mask;
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <limits.h>
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
|
|
||||||
@ -151,13 +152,13 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
|
|||||||
const unsigned char *in, int inl)
|
const unsigned char *in, int inl)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
unsigned int total = 0;
|
size_t total = 0;
|
||||||
|
|
||||||
*outl = 0;
|
*outl = 0;
|
||||||
if (inl <= 0)
|
if (inl <= 0)
|
||||||
return;
|
return;
|
||||||
OPENSSL_assert(ctx->length <= (int)sizeof(ctx->enc_data));
|
OPENSSL_assert(ctx->length <= (int)sizeof(ctx->enc_data));
|
||||||
if ((ctx->num + inl) < ctx->length) {
|
if (ctx->length - ctx->num > inl) {
|
||||||
memcpy(&(ctx->enc_data[ctx->num]), in, inl);
|
memcpy(&(ctx->enc_data[ctx->num]), in, inl);
|
||||||
ctx->num += inl;
|
ctx->num += inl;
|
||||||
return;
|
return;
|
||||||
@ -174,7 +175,7 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
|
|||||||
*out = '\0';
|
*out = '\0';
|
||||||
total = j + 1;
|
total = j + 1;
|
||||||
}
|
}
|
||||||
while (inl >= ctx->length) {
|
while (inl >= ctx->length && total <= INT_MAX) {
|
||||||
j = EVP_EncodeBlock(out, in, ctx->length);
|
j = EVP_EncodeBlock(out, in, ctx->length);
|
||||||
in += ctx->length;
|
in += ctx->length;
|
||||||
inl -= ctx->length;
|
inl -= ctx->length;
|
||||||
@ -183,6 +184,11 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
|
|||||||
*out = '\0';
|
*out = '\0';
|
||||||
total += j + 1;
|
total += j + 1;
|
||||||
}
|
}
|
||||||
|
if (total > INT_MAX) {
|
||||||
|
/* Too much output data! */
|
||||||
|
*outl = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (inl != 0)
|
if (inl != 0)
|
||||||
memcpy(&(ctx->enc_data[0]), in, inl);
|
memcpy(&(ctx->enc_data[0]), in, inl);
|
||||||
ctx->num = inl;
|
ctx->num = inl;
|
||||||
|
@ -347,7 +347,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
|
|||||||
bl = ctx->cipher->block_size;
|
bl = ctx->cipher->block_size;
|
||||||
OPENSSL_assert(bl <= (int)sizeof(ctx->buf));
|
OPENSSL_assert(bl <= (int)sizeof(ctx->buf));
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
if (i + inl < bl) {
|
if (bl - i > inl) {
|
||||||
memcpy(&(ctx->buf[i]), in, inl);
|
memcpy(&(ctx->buf[i]), in, inl);
|
||||||
ctx->buf_len += inl;
|
ctx->buf_len += inl;
|
||||||
*outl = 0;
|
*outl = 0;
|
||||||
|
@ -348,7 +348,7 @@ int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
|
|||||||
|
|
||||||
if (enc != NULL) {
|
if (enc != NULL) {
|
||||||
objstr = OBJ_nid2sn(EVP_CIPHER_nid(enc));
|
objstr = OBJ_nid2sn(EVP_CIPHER_nid(enc));
|
||||||
if (objstr == NULL) {
|
if (objstr == NULL || EVP_CIPHER_iv_length(enc) == 0) {
|
||||||
PEMerr(PEM_F_PEM_ASN1_WRITE_BIO, PEM_R_UNSUPPORTED_CIPHER);
|
PEMerr(PEM_F_PEM_ASN1_WRITE_BIO, PEM_R_UNSUPPORTED_CIPHER);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@ -69,12 +69,12 @@
|
|||||||
static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder,
|
static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder,
|
||||||
int nid, const EVP_CIPHER *enc,
|
int nid, const EVP_CIPHER *enc,
|
||||||
char *kstr, int klen, pem_password_cb *cb, void *u);
|
char *kstr, int klen, pem_password_cb *cb, void *u);
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_FP_API
|
#ifndef OPENSSL_NO_FP_API
|
||||||
static int do_pk8pkey_fp(FILE *bp, EVP_PKEY *x, int isder,
|
static int do_pk8pkey_fp(FILE *bp, EVP_PKEY *x, int isder,
|
||||||
int nid, const EVP_CIPHER *enc,
|
int nid, const EVP_CIPHER *enc,
|
||||||
char *kstr, int klen, pem_password_cb *cb, void *u);
|
char *kstr, int klen, pem_password_cb *cb, void *u);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These functions write a private key in PKCS#8 format: it is a "drop in"
|
* These functions write a private key in PKCS#8 format: it is a "drop in"
|
||||||
* replacement for PEM_write_bio_PrivateKey() and friends. As usual if 'enc'
|
* replacement for PEM_write_bio_PrivateKey() and friends. As usual if 'enc'
|
||||||
|
@ -131,6 +131,10 @@ static int read_lebn(const unsigned char **in, unsigned int nbyte, BIGNUM **r)
|
|||||||
# define MS_PVKMAGIC 0xb0b5f11eL
|
# define MS_PVKMAGIC 0xb0b5f11eL
|
||||||
/* Salt length for PVK files */
|
/* Salt length for PVK files */
|
||||||
# define PVK_SALTLEN 0x10
|
# define PVK_SALTLEN 0x10
|
||||||
|
/* Maximum length in PVK header */
|
||||||
|
# define PVK_MAX_KEYLEN 102400
|
||||||
|
/* Maximum salt length */
|
||||||
|
# define PVK_MAX_SALTLEN 10240
|
||||||
|
|
||||||
static EVP_PKEY *b2i_rsa(const unsigned char **in, unsigned int length,
|
static EVP_PKEY *b2i_rsa(const unsigned char **in, unsigned int length,
|
||||||
unsigned int bitlen, int ispub);
|
unsigned int bitlen, int ispub);
|
||||||
@ -644,6 +648,9 @@ static int do_PVK_header(const unsigned char **in, unsigned int length,
|
|||||||
*psaltlen = read_ledword(&p);
|
*psaltlen = read_ledword(&p);
|
||||||
*pkeylen = read_ledword(&p);
|
*pkeylen = read_ledword(&p);
|
||||||
|
|
||||||
|
if (*pkeylen > PVK_MAX_KEYLEN || *psaltlen > PVK_MAX_SALTLEN)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (is_encrypted && !*psaltlen) {
|
if (is_encrypted && !*psaltlen) {
|
||||||
PEMerr(PEM_F_DO_PVK_HEADER, PEM_R_INCONSISTENT_HEADER);
|
PEMerr(PEM_F_DO_PVK_HEADER, PEM_R_INCONSISTENT_HEADER);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -64,7 +64,6 @@
|
|||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/x509v3.h>
|
#include <openssl/x509v3.h>
|
||||||
|
|
||||||
|
|
||||||
#define BUFFERSIZE 4096
|
#define BUFFERSIZE 4096
|
||||||
|
|
||||||
static int pkcs7_copy_existing_digest(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
|
static int pkcs7_copy_existing_digest(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
|
||||||
@ -596,6 +595,7 @@ int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err:
|
err:
|
||||||
OPENSSL_free(buf);
|
OPENSSL_free(buf);
|
||||||
BIO_free_all(tmpmem);
|
BIO_free_all(tmpmem);
|
||||||
|
@ -151,6 +151,7 @@ static ERR_STRING_DATA X509_str_reasons[] = {
|
|||||||
{ERR_REASON(X509_R_LOADING_CERT_DIR), "loading cert dir"},
|
{ERR_REASON(X509_R_LOADING_CERT_DIR), "loading cert dir"},
|
||||||
{ERR_REASON(X509_R_LOADING_DEFAULTS), "loading defaults"},
|
{ERR_REASON(X509_R_LOADING_DEFAULTS), "loading defaults"},
|
||||||
{ERR_REASON(X509_R_METHOD_NOT_SUPPORTED), "method not supported"},
|
{ERR_REASON(X509_R_METHOD_NOT_SUPPORTED), "method not supported"},
|
||||||
|
{ERR_REASON(X509_R_NAME_TOO_LONG), "name too long"},
|
||||||
{ERR_REASON(X509_R_NEWER_CRL_NOT_NEWER), "newer crl not newer"},
|
{ERR_REASON(X509_R_NEWER_CRL_NOT_NEWER), "newer crl not newer"},
|
||||||
{ERR_REASON(X509_R_NO_CERT_SET_FOR_US_TO_VERIFY),
|
{ERR_REASON(X509_R_NO_CERT_SET_FOR_US_TO_VERIFY),
|
||||||
"no cert set for us to verify"},
|
"no cert set for us to verify"},
|
||||||
|
@ -63,6 +63,13 @@
|
|||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/buffer.h>
|
#include <openssl/buffer.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Limit to ensure we don't overflow: much greater than
|
||||||
|
* anything enountered in practice.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define NAME_ONELINE_MAX (1024 * 1024)
|
||||||
|
|
||||||
char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
|
char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
|
||||||
{
|
{
|
||||||
X509_NAME_ENTRY *ne;
|
X509_NAME_ENTRY *ne;
|
||||||
@ -86,6 +93,8 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
|
|||||||
goto err;
|
goto err;
|
||||||
b->data[0] = '\0';
|
b->data[0] = '\0';
|
||||||
len = 200;
|
len = 200;
|
||||||
|
} else if (len == 0) {
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
if (a == NULL) {
|
if (a == NULL) {
|
||||||
if (b) {
|
if (b) {
|
||||||
@ -110,6 +119,10 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
|
|||||||
|
|
||||||
type = ne->value->type;
|
type = ne->value->type;
|
||||||
num = ne->value->length;
|
num = ne->value->length;
|
||||||
|
if (num > NAME_ONELINE_MAX) {
|
||||||
|
X509err(X509_F_X509_NAME_ONELINE, X509_R_NAME_TOO_LONG);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
q = ne->value->data;
|
q = ne->value->data;
|
||||||
#ifdef CHARSET_EBCDIC
|
#ifdef CHARSET_EBCDIC
|
||||||
if (type == V_ASN1_GENERALSTRING ||
|
if (type == V_ASN1_GENERALSTRING ||
|
||||||
@ -117,8 +130,9 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
|
|||||||
type == V_ASN1_PRINTABLESTRING ||
|
type == V_ASN1_PRINTABLESTRING ||
|
||||||
type == V_ASN1_TELETEXSTRING ||
|
type == V_ASN1_TELETEXSTRING ||
|
||||||
type == V_ASN1_VISIBLESTRING || type == V_ASN1_IA5STRING) {
|
type == V_ASN1_VISIBLESTRING || type == V_ASN1_IA5STRING) {
|
||||||
ascii2ebcdic(ebcdic_buf, q, (num > sizeof ebcdic_buf)
|
if (num > (int)sizeof(ebcdic_buf))
|
||||||
? sizeof ebcdic_buf : num);
|
num = sizeof(ebcdic_buf);
|
||||||
|
ascii2ebcdic(ebcdic_buf, q, num);
|
||||||
q = ebcdic_buf;
|
q = ebcdic_buf;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -154,6 +168,10 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
|
|||||||
|
|
||||||
lold = l;
|
lold = l;
|
||||||
l += 1 + l1 + 1 + l2;
|
l += 1 + l1 + 1 + l2;
|
||||||
|
if (l > NAME_ONELINE_MAX) {
|
||||||
|
X509err(X509_F_X509_NAME_ONELINE, X509_R_NAME_TOO_LONG);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
if (b != NULL) {
|
if (b != NULL) {
|
||||||
if (!BUF_MEM_grow(b, l + 1))
|
if (!BUF_MEM_grow(b, l + 1))
|
||||||
goto err;
|
goto err;
|
||||||
@ -206,7 +224,7 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
|
|||||||
return (p);
|
return (p);
|
||||||
err:
|
err:
|
||||||
X509err(X509_F_X509_NAME_ONELINE, ERR_R_MALLOC_FAILURE);
|
X509err(X509_F_X509_NAME_ONELINE, ERR_R_MALLOC_FAILURE);
|
||||||
if (b != NULL)
|
end:
|
||||||
BUF_MEM_free(b);
|
BUF_MEM_free(b);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user