import 20090805 snapshot.
This commit is contained in:
parent
5019f0761f
commit
be157c0f40
|
@ -4,6 +4,12 @@
|
||||||
|
|
||||||
Changes between 0.9.8k and 1.0 [xx XXX xxxx]
|
Changes between 0.9.8k and 1.0 [xx XXX xxxx]
|
||||||
|
|
||||||
|
*) Delete MD2 from algorithm tables. This follows the recommendation in
|
||||||
|
several standards that it is not used in new applications due to
|
||||||
|
several cryptographic weaknesses. The algorithm is also disabled in
|
||||||
|
the default configuration.
|
||||||
|
[Steve Henson]
|
||||||
|
|
||||||
*) In BIO_pop() and BIO_push() use the ctrl argument (which was NULL) to
|
*) In BIO_pop() and BIO_push() use the ctrl argument (which was NULL) to
|
||||||
indicate the initial BIO being pushed or popped. This makes it possible
|
indicate the initial BIO being pushed or popped. This makes it possible
|
||||||
to determine whether the BIO is the one explicitly called or as a result
|
to determine whether the BIO is the one explicitly called or as a result
|
||||||
|
|
|
@ -184,6 +184,9 @@ my %table=(
|
||||||
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-linux-elf","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-lefence -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-linux-elf-noefence","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes_x86core.o aes_cbc.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
"debug-linux-ia32-aes", "gcc:-DAES_EXPERIMENTAL -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:x86cpuid.o:bn-586.o co-586.o x86-mont.o:des-586.o crypt586.o:aes_x86core.o aes_cbc.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o::elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DTERMIO -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
"debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -DTERMIO -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||||
"dist", "cc:-O::(unknown)::::::",
|
"dist", "cc:-O::(unknown)::::::",
|
||||||
|
|
||||||
# Basic configs that should work on any (32 and less bit) box
|
# Basic configs that should work on any (32 and less bit) box
|
||||||
|
|
|
@ -1488,7 +1488,7 @@ char *make_config_name()
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long index_serial_hash(const CSTRING *a)
|
static unsigned long index_serial_hash(const OPENSSL_CSTRING *a)
|
||||||
{
|
{
|
||||||
const char *n;
|
const char *n;
|
||||||
|
|
||||||
|
@ -1497,7 +1497,7 @@ static unsigned long index_serial_hash(const CSTRING *a)
|
||||||
return(lh_strhash(n));
|
return(lh_strhash(n));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int index_serial_cmp(const CSTRING *a, const CSTRING *b)
|
static int index_serial_cmp(const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b)
|
||||||
{
|
{
|
||||||
const char *aa,*bb;
|
const char *aa,*bb;
|
||||||
|
|
||||||
|
@ -1509,16 +1509,16 @@ static int index_serial_cmp(const CSTRING *a, const CSTRING *b)
|
||||||
static int index_name_qual(char **a)
|
static int index_name_qual(char **a)
|
||||||
{ return(a[0][0] == 'V'); }
|
{ return(a[0][0] == 'V'); }
|
||||||
|
|
||||||
static unsigned long index_name_hash(const CSTRING *a)
|
static unsigned long index_name_hash(const OPENSSL_CSTRING *a)
|
||||||
{ return(lh_strhash(a[DB_name])); }
|
{ return(lh_strhash(a[DB_name])); }
|
||||||
|
|
||||||
int index_name_cmp(const CSTRING *a, const CSTRING *b)
|
int index_name_cmp(const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b)
|
||||||
{ return(strcmp(a[DB_name], b[DB_name])); }
|
{ return(strcmp(a[DB_name], b[DB_name])); }
|
||||||
|
|
||||||
static IMPLEMENT_LHASH_HASH_FN(index_serial, CSTRING)
|
static IMPLEMENT_LHASH_HASH_FN(index_serial, OPENSSL_CSTRING)
|
||||||
static IMPLEMENT_LHASH_COMP_FN(index_serial, CSTRING)
|
static IMPLEMENT_LHASH_COMP_FN(index_serial, OPENSSL_CSTRING)
|
||||||
static IMPLEMENT_LHASH_HASH_FN(index_name, CSTRING)
|
static IMPLEMENT_LHASH_HASH_FN(index_name, OPENSSL_CSTRING)
|
||||||
static IMPLEMENT_LHASH_COMP_FN(index_name, CSTRING)
|
static IMPLEMENT_LHASH_COMP_FN(index_name, OPENSSL_CSTRING)
|
||||||
|
|
||||||
#undef BSIZE
|
#undef BSIZE
|
||||||
#define BSIZE 256
|
#define BSIZE 256
|
||||||
|
|
|
@ -295,9 +295,9 @@ int save_index(const char *dbfile, const char *suffix, CA_DB *db);
|
||||||
int rotate_index(const char *dbfile, const char *new_suffix, const char *old_suffix);
|
int rotate_index(const char *dbfile, const char *new_suffix, const char *old_suffix);
|
||||||
void free_index(CA_DB *db);
|
void free_index(CA_DB *db);
|
||||||
#define index_name_cmp_noconst(a, b) \
|
#define index_name_cmp_noconst(a, b) \
|
||||||
index_name_cmp((const CSTRING *)CHECKED_PTR_OF(STRING, a), \
|
index_name_cmp((const OPENSSL_CSTRING *)CHECKED_PTR_OF(OPENSSL_STRING, a), \
|
||||||
(const CSTRING *)CHECKED_PTR_OF(STRING, b))
|
(const OPENSSL_CSTRING *)CHECKED_PTR_OF(OPENSSL_STRING, b))
|
||||||
int index_name_cmp(const CSTRING *a, const CSTRING *b);
|
int index_name_cmp(const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b);
|
||||||
int parse_yesno(const char *str, int def);
|
int parse_yesno(const char *str, int def);
|
||||||
|
|
||||||
X509_NAME *parse_name(char *str, long chtype, int multirdn);
|
X509_NAME *parse_name(char *str, long chtype, int multirdn);
|
||||||
|
|
|
@ -96,7 +96,7 @@ int MAIN(int argc, char **argv)
|
||||||
unsigned char *tmpbuf;
|
unsigned char *tmpbuf;
|
||||||
const unsigned char *ctmpbuf;
|
const unsigned char *ctmpbuf;
|
||||||
BUF_MEM *buf=NULL;
|
BUF_MEM *buf=NULL;
|
||||||
STACK_OF(STRING) *osk=NULL;
|
STACK_OF(OPENSSL_STRING) *osk=NULL;
|
||||||
ASN1_TYPE *at=NULL;
|
ASN1_TYPE *at=NULL;
|
||||||
|
|
||||||
informat=FORMAT_PEM;
|
informat=FORMAT_PEM;
|
||||||
|
@ -113,7 +113,7 @@ int MAIN(int argc, char **argv)
|
||||||
prog=argv[0];
|
prog=argv[0];
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
if ((osk=sk_STRING_new_null()) == NULL)
|
if ((osk=sk_OPENSSL_STRING_new_null()) == NULL)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"Memory allocation failure\n");
|
BIO_printf(bio_err,"Memory allocation failure\n");
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -169,7 +169,7 @@ int MAIN(int argc, char **argv)
|
||||||
else if (strcmp(*argv,"-strparse") == 0)
|
else if (strcmp(*argv,"-strparse") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
sk_STRING_push(osk,*(++argv));
|
sk_OPENSSL_STRING_push(osk,*(++argv));
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-genstr") == 0)
|
else if (strcmp(*argv,"-genstr") == 0)
|
||||||
{
|
{
|
||||||
|
@ -302,18 +302,18 @@ bad:
|
||||||
|
|
||||||
/* If any structs to parse go through in sequence */
|
/* If any structs to parse go through in sequence */
|
||||||
|
|
||||||
if (sk_STRING_num(osk))
|
if (sk_OPENSSL_STRING_num(osk))
|
||||||
{
|
{
|
||||||
tmpbuf=(unsigned char *)str;
|
tmpbuf=(unsigned char *)str;
|
||||||
tmplen=num;
|
tmplen=num;
|
||||||
for (i=0; i<sk_STRING_num(osk); i++)
|
for (i=0; i<sk_OPENSSL_STRING_num(osk); i++)
|
||||||
{
|
{
|
||||||
ASN1_TYPE *atmp;
|
ASN1_TYPE *atmp;
|
||||||
int typ;
|
int typ;
|
||||||
j=atoi(sk_STRING_value(osk,i));
|
j=atoi(sk_OPENSSL_STRING_value(osk,i));
|
||||||
if (j == 0)
|
if (j == 0)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"'%s' is an invalid number\n",sk_STRING_value(osk,i));
|
BIO_printf(bio_err,"'%s' is an invalid number\n",sk_OPENSSL_STRING_value(osk,i));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tmpbuf+=j;
|
tmpbuf+=j;
|
||||||
|
@ -378,7 +378,7 @@ end:
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
if (buf != NULL) BUF_MEM_free(buf);
|
if (buf != NULL) BUF_MEM_free(buf);
|
||||||
if (at != NULL) ASN1_TYPE_free(at);
|
if (at != NULL) ASN1_TYPE_free(at);
|
||||||
if (osk != NULL) sk_STRING_free(osk);
|
if (osk != NULL) sk_OPENSSL_STRING_free(osk);
|
||||||
OBJ_cleanup();
|
OBJ_cleanup();
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
OPENSSL_EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
|
|
|
@ -883,9 +883,9 @@ bad:
|
||||||
if (db == NULL) goto err;
|
if (db == NULL) goto err;
|
||||||
|
|
||||||
/* Lets check some fields */
|
/* Lets check some fields */
|
||||||
for (i=0; i<sk_PSTRING_num(db->db->data); i++)
|
for (i=0; i<sk_OPENSSL_PSTRING_num(db->db->data); i++)
|
||||||
{
|
{
|
||||||
pp=sk_PSTRING_value(db->db->data,i);
|
pp=sk_OPENSSL_PSTRING_value(db->db->data,i);
|
||||||
if ((pp[DB_type][0] != DB_TYPE_REV) &&
|
if ((pp[DB_type][0] != DB_TYPE_REV) &&
|
||||||
(pp[DB_rev_date][0] != '\0'))
|
(pp[DB_rev_date][0] != '\0'))
|
||||||
{
|
{
|
||||||
|
@ -938,7 +938,7 @@ bad:
|
||||||
#endif
|
#endif
|
||||||
TXT_DB_write(out,db->db);
|
TXT_DB_write(out,db->db);
|
||||||
BIO_printf(bio_err,"%d entries loaded from the database\n",
|
BIO_printf(bio_err,"%d entries loaded from the database\n",
|
||||||
sk_PSTRING_num(db->db->data));
|
sk_OPENSSL_PSTRING_num(db->db->data));
|
||||||
BIO_printf(bio_err,"generating index\n");
|
BIO_printf(bio_err,"generating index\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1408,9 +1408,9 @@ bad:
|
||||||
|
|
||||||
ASN1_TIME_free(tmptm);
|
ASN1_TIME_free(tmptm);
|
||||||
|
|
||||||
for (i=0; i<sk_PSTRING_num(db->db->data); i++)
|
for (i=0; i<sk_OPENSSL_PSTRING_num(db->db->data); i++)
|
||||||
{
|
{
|
||||||
pp=sk_PSTRING_value(db->db->data,i);
|
pp=sk_OPENSSL_PSTRING_value(db->db->data,i);
|
||||||
if (pp[DB_type][0] == DB_TYPE_REV)
|
if (pp[DB_type][0] == DB_TYPE_REV)
|
||||||
{
|
{
|
||||||
if ((r=X509_REVOKED_new()) == NULL) goto err;
|
if ((r=X509_REVOKED_new()) == NULL) goto err;
|
||||||
|
@ -1685,9 +1685,9 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, const EVP_MD *dgst,
|
||||||
int ok= -1,i,j,last,nid;
|
int ok= -1,i,j,last,nid;
|
||||||
const char *p;
|
const char *p;
|
||||||
CONF_VALUE *cv;
|
CONF_VALUE *cv;
|
||||||
STRING row[DB_NUMBER];
|
OPENSSL_STRING row[DB_NUMBER];
|
||||||
STRING *irow=NULL;
|
OPENSSL_STRING *irow=NULL;
|
||||||
STRING *rrow=NULL;
|
OPENSSL_STRING *rrow=NULL;
|
||||||
char buf[25];
|
char buf[25];
|
||||||
|
|
||||||
tmptm=ASN1_UTCTIME_new();
|
tmptm=ASN1_UTCTIME_new();
|
||||||
|
@ -1929,7 +1929,7 @@ again2:
|
||||||
|
|
||||||
if (db->attributes.unique_subject)
|
if (db->attributes.unique_subject)
|
||||||
{
|
{
|
||||||
STRING *crow=row;
|
OPENSSL_STRING *crow=row;
|
||||||
|
|
||||||
rrow=TXT_DB_get_by_index(db->db,DB_name,crow);
|
rrow=TXT_DB_get_by_index(db->db,DB_name,crow);
|
||||||
if (rrow != NULL)
|
if (rrow != NULL)
|
||||||
|
@ -2632,9 +2632,9 @@ static int do_updatedb (CA_DB *db)
|
||||||
else
|
else
|
||||||
a_y2k = 0;
|
a_y2k = 0;
|
||||||
|
|
||||||
for (i = 0; i < sk_PSTRING_num(db->db->data); i++)
|
for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++)
|
||||||
{
|
{
|
||||||
rrow = sk_PSTRING_value(db->db->data, i);
|
rrow = sk_OPENSSL_PSTRING_value(db->db->data, i);
|
||||||
|
|
||||||
if (rrow[DB_type][0] == 'V')
|
if (rrow[DB_type][0] == 'V')
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,9 +71,9 @@
|
||||||
static int save_certs(char *signerfile, STACK_OF(X509) *signers);
|
static int save_certs(char *signerfile, STACK_OF(X509) *signers);
|
||||||
static int cms_cb(int ok, X509_STORE_CTX *ctx);
|
static int cms_cb(int ok, X509_STORE_CTX *ctx);
|
||||||
static void receipt_request_print(BIO *out, CMS_ContentInfo *cms);
|
static void receipt_request_print(BIO *out, CMS_ContentInfo *cms);
|
||||||
static CMS_ReceiptRequest *make_receipt_request(STACK_OF(STRING) *rr_to,
|
static CMS_ReceiptRequest *make_receipt_request(STACK_OF(OPENSSL_STRING) *rr_to,
|
||||||
int rr_allorfirst,
|
int rr_allorfirst,
|
||||||
STACK_OF(STRING) *rr_from);
|
STACK_OF(OPENSSL_STRING) *rr_from);
|
||||||
|
|
||||||
#define SMIME_OP 0x10
|
#define SMIME_OP 0x10
|
||||||
#define SMIME_IP 0x20
|
#define SMIME_IP 0x20
|
||||||
|
@ -108,7 +108,7 @@ int MAIN(int argc, char **argv)
|
||||||
const char *inmode = "r", *outmode = "w";
|
const char *inmode = "r", *outmode = "w";
|
||||||
char *infile = NULL, *outfile = NULL, *rctfile = NULL;
|
char *infile = NULL, *outfile = NULL, *rctfile = NULL;
|
||||||
char *signerfile = NULL, *recipfile = NULL;
|
char *signerfile = NULL, *recipfile = NULL;
|
||||||
STACK_OF(STRING) *sksigners = NULL, *skkeys = NULL;
|
STACK_OF(OPENSSL_STRING) *sksigners = NULL, *skkeys = NULL;
|
||||||
char *certfile = NULL, *keyfile = NULL, *contfile=NULL;
|
char *certfile = NULL, *keyfile = NULL, *contfile=NULL;
|
||||||
char *certsoutfile = NULL;
|
char *certsoutfile = NULL;
|
||||||
const EVP_CIPHER *cipher = NULL;
|
const EVP_CIPHER *cipher = NULL;
|
||||||
|
@ -122,7 +122,7 @@ int MAIN(int argc, char **argv)
|
||||||
int flags = CMS_DETACHED, noout = 0, print = 0;
|
int flags = CMS_DETACHED, noout = 0, print = 0;
|
||||||
int verify_retcode = 0;
|
int verify_retcode = 0;
|
||||||
int rr_print = 0, rr_allorfirst = -1;
|
int rr_print = 0, rr_allorfirst = -1;
|
||||||
STACK_OF(STRING) *rr_to = NULL, *rr_from = NULL;
|
STACK_OF(OPENSSL_STRING) *rr_to = NULL, *rr_from = NULL;
|
||||||
CMS_ReceiptRequest *rr = NULL;
|
CMS_ReceiptRequest *rr = NULL;
|
||||||
char *to = NULL, *from = NULL, *subject = NULL;
|
char *to = NULL, *from = NULL, *subject = NULL;
|
||||||
char *CAfile = NULL, *CApath = NULL;
|
char *CAfile = NULL, *CApath = NULL;
|
||||||
|
@ -281,8 +281,8 @@ int MAIN(int argc, char **argv)
|
||||||
goto argerr;
|
goto argerr;
|
||||||
args++;
|
args++;
|
||||||
if (!rr_from)
|
if (!rr_from)
|
||||||
rr_from = sk_STRING_new_null();
|
rr_from = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(rr_from, *args);
|
sk_OPENSSL_STRING_push(rr_from, *args);
|
||||||
}
|
}
|
||||||
else if (!strcmp(*args,"-receipt_request_to"))
|
else if (!strcmp(*args,"-receipt_request_to"))
|
||||||
{
|
{
|
||||||
|
@ -290,8 +290,8 @@ int MAIN(int argc, char **argv)
|
||||||
goto argerr;
|
goto argerr;
|
||||||
args++;
|
args++;
|
||||||
if (!rr_to)
|
if (!rr_to)
|
||||||
rr_to = sk_STRING_new_null();
|
rr_to = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(rr_to, *args);
|
sk_OPENSSL_STRING_push(rr_to, *args);
|
||||||
}
|
}
|
||||||
else if (!strcmp (*args, "-print"))
|
else if (!strcmp (*args, "-print"))
|
||||||
{
|
{
|
||||||
|
@ -387,13 +387,13 @@ int MAIN(int argc, char **argv)
|
||||||
if (signerfile)
|
if (signerfile)
|
||||||
{
|
{
|
||||||
if (!sksigners)
|
if (!sksigners)
|
||||||
sksigners = sk_STRING_new_null();
|
sksigners = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(sksigners, signerfile);
|
sk_OPENSSL_STRING_push(sksigners, signerfile);
|
||||||
if (!keyfile)
|
if (!keyfile)
|
||||||
keyfile = signerfile;
|
keyfile = signerfile;
|
||||||
if (!skkeys)
|
if (!skkeys)
|
||||||
skkeys = sk_STRING_new_null();
|
skkeys = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(skkeys, keyfile);
|
sk_OPENSSL_STRING_push(skkeys, keyfile);
|
||||||
keyfile = NULL;
|
keyfile = NULL;
|
||||||
}
|
}
|
||||||
signerfile = *++args;
|
signerfile = *++args;
|
||||||
|
@ -435,12 +435,12 @@ int MAIN(int argc, char **argv)
|
||||||
goto argerr;
|
goto argerr;
|
||||||
}
|
}
|
||||||
if (!sksigners)
|
if (!sksigners)
|
||||||
sksigners = sk_STRING_new_null();
|
sksigners = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(sksigners, signerfile);
|
sk_OPENSSL_STRING_push(sksigners, signerfile);
|
||||||
signerfile = NULL;
|
signerfile = NULL;
|
||||||
if (!skkeys)
|
if (!skkeys)
|
||||||
skkeys = sk_STRING_new_null();
|
skkeys = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(skkeys, keyfile);
|
sk_OPENSSL_STRING_push(skkeys, keyfile);
|
||||||
}
|
}
|
||||||
keyfile = *++args;
|
keyfile = *++args;
|
||||||
}
|
}
|
||||||
|
@ -539,13 +539,13 @@ int MAIN(int argc, char **argv)
|
||||||
if (signerfile)
|
if (signerfile)
|
||||||
{
|
{
|
||||||
if (!sksigners)
|
if (!sksigners)
|
||||||
sksigners = sk_STRING_new_null();
|
sksigners = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(sksigners, signerfile);
|
sk_OPENSSL_STRING_push(sksigners, signerfile);
|
||||||
if (!skkeys)
|
if (!skkeys)
|
||||||
skkeys = sk_STRING_new_null();
|
skkeys = sk_OPENSSL_STRING_new_null();
|
||||||
if (!keyfile)
|
if (!keyfile)
|
||||||
keyfile = signerfile;
|
keyfile = signerfile;
|
||||||
sk_STRING_push(skkeys, keyfile);
|
sk_OPENSSL_STRING_push(skkeys, keyfile);
|
||||||
}
|
}
|
||||||
if (!sksigners)
|
if (!sksigners)
|
||||||
{
|
{
|
||||||
|
@ -980,11 +980,11 @@ int MAIN(int argc, char **argv)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
flags |= CMS_REUSE_DIGEST;
|
flags |= CMS_REUSE_DIGEST;
|
||||||
for (i = 0; i < sk_STRING_num(sksigners); i++)
|
for (i = 0; i < sk_OPENSSL_STRING_num(sksigners); i++)
|
||||||
{
|
{
|
||||||
CMS_SignerInfo *si;
|
CMS_SignerInfo *si;
|
||||||
signerfile = sk_STRING_value(sksigners, i);
|
signerfile = sk_OPENSSL_STRING_value(sksigners, i);
|
||||||
keyfile = sk_STRING_value(skkeys, i);
|
keyfile = sk_OPENSSL_STRING_value(skkeys, i);
|
||||||
signer = load_cert(bio_err, signerfile,FORMAT_PEM, NULL,
|
signer = load_cert(bio_err, signerfile,FORMAT_PEM, NULL,
|
||||||
e, "signer certificate");
|
e, "signer certificate");
|
||||||
if (!signer)
|
if (!signer)
|
||||||
|
@ -1160,9 +1160,9 @@ end:
|
||||||
if (vpm)
|
if (vpm)
|
||||||
X509_VERIFY_PARAM_free(vpm);
|
X509_VERIFY_PARAM_free(vpm);
|
||||||
if (sksigners)
|
if (sksigners)
|
||||||
sk_STRING_free(sksigners);
|
sk_OPENSSL_STRING_free(sksigners);
|
||||||
if (skkeys)
|
if (skkeys)
|
||||||
sk_STRING_free(skkeys);
|
sk_OPENSSL_STRING_free(skkeys);
|
||||||
if (secret_key)
|
if (secret_key)
|
||||||
OPENSSL_free(secret_key);
|
OPENSSL_free(secret_key);
|
||||||
if (secret_keyid)
|
if (secret_keyid)
|
||||||
|
@ -1172,9 +1172,9 @@ end:
|
||||||
if (rr)
|
if (rr)
|
||||||
CMS_ReceiptRequest_free(rr);
|
CMS_ReceiptRequest_free(rr);
|
||||||
if (rr_to)
|
if (rr_to)
|
||||||
sk_STRING_free(rr_to);
|
sk_OPENSSL_STRING_free(rr_to);
|
||||||
if (rr_from)
|
if (rr_from)
|
||||||
sk_STRING_free(rr_from);
|
sk_OPENSSL_STRING_free(rr_from);
|
||||||
X509_STORE_free(store);
|
X509_STORE_free(store);
|
||||||
X509_free(cert);
|
X509_free(cert);
|
||||||
X509_free(recip);
|
X509_free(recip);
|
||||||
|
@ -1296,7 +1296,7 @@ static void receipt_request_print(BIO *out, CMS_ContentInfo *cms)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static STACK_OF(GENERAL_NAMES) *make_names_stack(STACK_OF(STRING) *ns)
|
static STACK_OF(GENERAL_NAMES) *make_names_stack(STACK_OF(OPENSSL_STRING) *ns)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
STACK_OF(GENERAL_NAMES) *ret;
|
STACK_OF(GENERAL_NAMES) *ret;
|
||||||
|
@ -1305,9 +1305,9 @@ static STACK_OF(GENERAL_NAMES) *make_names_stack(STACK_OF(STRING) *ns)
|
||||||
ret = sk_GENERAL_NAMES_new_null();
|
ret = sk_GENERAL_NAMES_new_null();
|
||||||
if (!ret)
|
if (!ret)
|
||||||
goto err;
|
goto err;
|
||||||
for (i = 0; i < sk_STRING_num(ns); i++)
|
for (i = 0; i < sk_OPENSSL_STRING_num(ns); i++)
|
||||||
{
|
{
|
||||||
char *str = sk_STRING_value(ns, i);
|
char *str = sk_OPENSSL_STRING_value(ns, i);
|
||||||
gen = a2i_GENERAL_NAME(NULL, NULL, NULL, GEN_EMAIL, str, 0);
|
gen = a2i_GENERAL_NAME(NULL, NULL, NULL, GEN_EMAIL, str, 0);
|
||||||
if (!gen)
|
if (!gen)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -1335,9 +1335,9 @@ static STACK_OF(GENERAL_NAMES) *make_names_stack(STACK_OF(STRING) *ns)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static CMS_ReceiptRequest *make_receipt_request(STACK_OF(STRING) *rr_to,
|
static CMS_ReceiptRequest *make_receipt_request(STACK_OF(OPENSSL_STRING) *rr_to,
|
||||||
int rr_allorfirst,
|
int rr_allorfirst,
|
||||||
STACK_OF(STRING) *rr_from)
|
STACK_OF(OPENSSL_STRING) *rr_from)
|
||||||
{
|
{
|
||||||
STACK_OF(GENERAL_NAMES) *rct_to, *rct_from;
|
STACK_OF(GENERAL_NAMES) *rct_to, *rct_from;
|
||||||
CMS_ReceiptRequest *rr;
|
CMS_ReceiptRequest *rr;
|
||||||
|
|
|
@ -92,7 +92,7 @@ int MAIN(int argc, char **argv)
|
||||||
PKCS7 *p7 = NULL;
|
PKCS7 *p7 = NULL;
|
||||||
PKCS7_SIGNED *p7s = NULL;
|
PKCS7_SIGNED *p7s = NULL;
|
||||||
X509_CRL *crl=NULL;
|
X509_CRL *crl=NULL;
|
||||||
STACK_OF(STRING) *certflst=NULL;
|
STACK_OF(OPENSSL_STRING) *certflst=NULL;
|
||||||
STACK_OF(X509_CRL) *crl_stack=NULL;
|
STACK_OF(X509_CRL) *crl_stack=NULL;
|
||||||
STACK_OF(X509) *cert_stack=NULL;
|
STACK_OF(X509) *cert_stack=NULL;
|
||||||
int ret=1,nocrl=0;
|
int ret=1,nocrl=0;
|
||||||
|
@ -140,8 +140,8 @@ int MAIN(int argc, char **argv)
|
||||||
else if (strcmp(*argv,"-certfile") == 0)
|
else if (strcmp(*argv,"-certfile") == 0)
|
||||||
{
|
{
|
||||||
if (--argc < 1) goto bad;
|
if (--argc < 1) goto bad;
|
||||||
if(!certflst) certflst = sk_STRING_new_null();
|
if(!certflst) certflst = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(certflst,*(++argv));
|
sk_OPENSSL_STRING_push(certflst,*(++argv));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -226,8 +226,8 @@ bad:
|
||||||
if ((cert_stack=sk_X509_new_null()) == NULL) goto end;
|
if ((cert_stack=sk_X509_new_null()) == NULL) goto end;
|
||||||
p7s->cert=cert_stack;
|
p7s->cert=cert_stack;
|
||||||
|
|
||||||
if(certflst) for(i = 0; i < sk_STRING_num(certflst); i++) {
|
if(certflst) for(i = 0; i < sk_OPENSSL_STRING_num(certflst); i++) {
|
||||||
certfile = sk_STRING_value(certflst, i);
|
certfile = sk_OPENSSL_STRING_value(certflst, i);
|
||||||
if (add_certs_from_file(cert_stack,certfile) < 0)
|
if (add_certs_from_file(cert_stack,certfile) < 0)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err, "error loading certificates\n");
|
BIO_printf(bio_err, "error loading certificates\n");
|
||||||
|
@ -236,7 +236,7 @@ bad:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sk_STRING_free(certflst);
|
sk_OPENSSL_STRING_free(certflst);
|
||||||
|
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -127,7 +127,7 @@ int MAIN(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
char *hmac_key=NULL;
|
char *hmac_key=NULL;
|
||||||
char *mac_name=NULL;
|
char *mac_name=NULL;
|
||||||
STACK_OF(STRING) *sigopts = NULL, *macopts = NULL;
|
STACK_OF(OPENSSL_STRING) *sigopts = NULL, *macopts = NULL;
|
||||||
|
|
||||||
apps_startup();
|
apps_startup();
|
||||||
|
|
||||||
|
@ -230,8 +230,8 @@ int MAIN(int argc, char **argv)
|
||||||
if (--argc < 1)
|
if (--argc < 1)
|
||||||
break;
|
break;
|
||||||
if (!sigopts)
|
if (!sigopts)
|
||||||
sigopts = sk_STRING_new_null();
|
sigopts = sk_OPENSSL_STRING_new_null();
|
||||||
if (!sigopts || !sk_STRING_push(sigopts, *(++argv)))
|
if (!sigopts || !sk_OPENSSL_STRING_push(sigopts, *(++argv)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-macopt") == 0)
|
else if (strcmp(*argv,"-macopt") == 0)
|
||||||
|
@ -239,8 +239,8 @@ int MAIN(int argc, char **argv)
|
||||||
if (--argc < 1)
|
if (--argc < 1)
|
||||||
break;
|
break;
|
||||||
if (!macopts)
|
if (!macopts)
|
||||||
macopts = sk_STRING_new_null();
|
macopts = sk_OPENSSL_STRING_new_null();
|
||||||
if (!macopts || !sk_STRING_push(macopts, *(++argv)))
|
if (!macopts || !sk_OPENSSL_STRING_push(macopts, *(++argv)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
|
else if ((m=EVP_get_digestbyname(&((*argv)[1]))) != NULL)
|
||||||
|
@ -365,9 +365,9 @@ int MAIN(int argc, char **argv)
|
||||||
if (macopts)
|
if (macopts)
|
||||||
{
|
{
|
||||||
char *macopt;
|
char *macopt;
|
||||||
for (i = 0; i < sk_STRING_num(macopts); i++)
|
for (i = 0; i < sk_OPENSSL_STRING_num(macopts); i++)
|
||||||
{
|
{
|
||||||
macopt = sk_STRING_value(macopts, i);
|
macopt = sk_OPENSSL_STRING_value(macopts, i);
|
||||||
if (pkey_ctrl_string(mac_ctx, macopt) <= 0)
|
if (pkey_ctrl_string(mac_ctx, macopt) <= 0)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,
|
BIO_printf(bio_err,
|
||||||
|
@ -424,9 +424,9 @@ int MAIN(int argc, char **argv)
|
||||||
if (sigopts)
|
if (sigopts)
|
||||||
{
|
{
|
||||||
char *sigopt;
|
char *sigopt;
|
||||||
for (i = 0; i < sk_STRING_num(sigopts); i++)
|
for (i = 0; i < sk_OPENSSL_STRING_num(sigopts); i++)
|
||||||
{
|
{
|
||||||
sigopt = sk_STRING_value(sigopts, i);
|
sigopt = sk_OPENSSL_STRING_value(sigopts, i);
|
||||||
if (pkey_ctrl_string(pctx, sigopt) <= 0)
|
if (pkey_ctrl_string(pctx, sigopt) <= 0)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,
|
BIO_printf(bio_err,
|
||||||
|
@ -531,9 +531,9 @@ end:
|
||||||
BIO_free_all(out);
|
BIO_free_all(out);
|
||||||
EVP_PKEY_free(sigkey);
|
EVP_PKEY_free(sigkey);
|
||||||
if (sigopts)
|
if (sigopts)
|
||||||
sk_STRING_free(sigopts);
|
sk_OPENSSL_STRING_free(sigopts);
|
||||||
if (macopts)
|
if (macopts)
|
||||||
sk_STRING_free(macopts);
|
sk_OPENSSL_STRING_free(macopts);
|
||||||
if(sigbuf) OPENSSL_free(sigbuf);
|
if(sigbuf) OPENSSL_free(sigbuf);
|
||||||
if (bmd != NULL) BIO_free(bmd);
|
if (bmd != NULL) BIO_free(bmd);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
|
|
|
@ -200,7 +200,7 @@ static int util_verbose(ENGINE *e, int verbose, BIO *bio_out, const char *indent
|
||||||
char *desc = NULL;
|
char *desc = NULL;
|
||||||
int flags;
|
int flags;
|
||||||
int xpos = 0;
|
int xpos = 0;
|
||||||
STACK_OF(STRING) *cmds = NULL;
|
STACK_OF(OPENSSL_STRING) *cmds = NULL;
|
||||||
if(!ENGINE_ctrl(e, ENGINE_CTRL_HAS_CTRL_FUNCTION, 0, NULL, NULL) ||
|
if(!ENGINE_ctrl(e, ENGINE_CTRL_HAS_CTRL_FUNCTION, 0, NULL, NULL) ||
|
||||||
((num = ENGINE_ctrl(e, ENGINE_CTRL_GET_FIRST_CMD_TYPE,
|
((num = ENGINE_ctrl(e, ENGINE_CTRL_GET_FIRST_CMD_TYPE,
|
||||||
0, NULL, NULL)) <= 0))
|
0, NULL, NULL)) <= 0))
|
||||||
|
@ -211,7 +211,7 @@ static int util_verbose(ENGINE *e, int verbose, BIO *bio_out, const char *indent
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmds = sk_STRING_new_null();
|
cmds = sk_OPENSSL_STRING_new_null();
|
||||||
|
|
||||||
if(!cmds)
|
if(!cmds)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -284,16 +284,16 @@ static int util_verbose(ENGINE *e, int verbose, BIO *bio_out, const char *indent
|
||||||
BIO_printf(bio_out, "\n");
|
BIO_printf(bio_out, "\n");
|
||||||
ret = 1;
|
ret = 1;
|
||||||
err:
|
err:
|
||||||
if(cmds) sk_STRING_pop_free(cmds, identity);
|
if(cmds) sk_OPENSSL_STRING_pop_free(cmds, identity);
|
||||||
if(name) OPENSSL_free(name);
|
if(name) OPENSSL_free(name);
|
||||||
if(desc) OPENSSL_free(desc);
|
if(desc) OPENSSL_free(desc);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void util_do_cmds(ENGINE *e, STACK_OF(STRING) *cmds, BIO *bio_out,
|
static void util_do_cmds(ENGINE *e, STACK_OF(OPENSSL_STRING) *cmds,
|
||||||
const char *indent)
|
BIO *bio_out, const char *indent)
|
||||||
{
|
{
|
||||||
int loop, res, num = sk_STRING_num(cmds);
|
int loop, res, num = sk_OPENSSL_STRING_num(cmds);
|
||||||
|
|
||||||
if(num < 0)
|
if(num < 0)
|
||||||
{
|
{
|
||||||
|
@ -304,7 +304,7 @@ static void util_do_cmds(ENGINE *e, STACK_OF(STRING) *cmds, BIO *bio_out,
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
const char *cmd, *arg;
|
const char *cmd, *arg;
|
||||||
cmd = sk_STRING_value(cmds, loop);
|
cmd = sk_OPENSSL_STRING_value(cmds, loop);
|
||||||
res = 1; /* assume success */
|
res = 1; /* assume success */
|
||||||
/* Check if this command has no ":arg" */
|
/* Check if this command has no ":arg" */
|
||||||
if((arg = strstr(cmd, ":")) == NULL)
|
if((arg = strstr(cmd, ":")) == NULL)
|
||||||
|
@ -344,9 +344,9 @@ int MAIN(int argc, char **argv)
|
||||||
const char **pp;
|
const char **pp;
|
||||||
int verbose=0, list_cap=0, test_avail=0, test_avail_noise = 0;
|
int verbose=0, list_cap=0, test_avail=0, test_avail_noise = 0;
|
||||||
ENGINE *e;
|
ENGINE *e;
|
||||||
STACK_OF(STRING) *engines = sk_STRING_new_null();
|
STACK_OF(OPENSSL_STRING) *engines = sk_OPENSSL_STRING_new_null();
|
||||||
STACK_OF(STRING) *pre_cmds = sk_STRING_new_null();
|
STACK_OF(OPENSSL_STRING) *pre_cmds = sk_OPENSSL_STRING_new_null();
|
||||||
STACK_OF(STRING) *post_cmds = sk_STRING_new_null();
|
STACK_OF(OPENSSL_STRING) *post_cmds = sk_OPENSSL_STRING_new_null();
|
||||||
int badops=1;
|
int badops=1;
|
||||||
BIO *bio_out=NULL;
|
BIO *bio_out=NULL;
|
||||||
const char *indent = " ";
|
const char *indent = " ";
|
||||||
|
@ -393,20 +393,20 @@ int MAIN(int argc, char **argv)
|
||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
goto skip_arg_loop;
|
goto skip_arg_loop;
|
||||||
sk_STRING_push(pre_cmds,*argv);
|
sk_OPENSSL_STRING_push(pre_cmds,*argv);
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-post") == 0)
|
else if (strcmp(*argv,"-post") == 0)
|
||||||
{
|
{
|
||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
goto skip_arg_loop;
|
goto skip_arg_loop;
|
||||||
sk_STRING_push(post_cmds,*argv);
|
sk_OPENSSL_STRING_push(post_cmds,*argv);
|
||||||
}
|
}
|
||||||
else if ((strncmp(*argv,"-h",2) == 0) ||
|
else if ((strncmp(*argv,"-h",2) == 0) ||
|
||||||
(strcmp(*argv,"-?") == 0))
|
(strcmp(*argv,"-?") == 0))
|
||||||
goto skip_arg_loop;
|
goto skip_arg_loop;
|
||||||
else
|
else
|
||||||
sk_STRING_push(engines,*argv);
|
sk_OPENSSL_STRING_push(engines,*argv);
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
@ -421,17 +421,17 @@ skip_arg_loop:
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sk_STRING_num(engines) == 0)
|
if (sk_OPENSSL_STRING_num(engines) == 0)
|
||||||
{
|
{
|
||||||
for(e = ENGINE_get_first(); e != NULL; e = ENGINE_get_next(e))
|
for(e = ENGINE_get_first(); e != NULL; e = ENGINE_get_next(e))
|
||||||
{
|
{
|
||||||
sk_STRING_push(engines,(char *)ENGINE_get_id(e));
|
sk_OPENSSL_STRING_push(engines,(char *)ENGINE_get_id(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<sk_STRING_num(engines); i++)
|
for (i=0; i<sk_OPENSSL_STRING_num(engines); i++)
|
||||||
{
|
{
|
||||||
const char *id = sk_STRING_value(engines,i);
|
const char *id = sk_OPENSSL_STRING_value(engines,i);
|
||||||
if ((e = ENGINE_by_id(id)) != NULL)
|
if ((e = ENGINE_by_id(id)) != NULL)
|
||||||
{
|
{
|
||||||
const char *name = ENGINE_get_name(e);
|
const char *name = ENGINE_get_name(e);
|
||||||
|
@ -533,9 +533,9 @@ skip_pmeths:
|
||||||
end:
|
end:
|
||||||
|
|
||||||
ERR_print_errors(bio_err);
|
ERR_print_errors(bio_err);
|
||||||
sk_STRING_pop_free(engines, identity);
|
sk_OPENSSL_STRING_pop_free(engines, identity);
|
||||||
sk_STRING_pop_free(pre_cmds, identity);
|
sk_OPENSSL_STRING_pop_free(pre_cmds, identity);
|
||||||
sk_STRING_pop_free(post_cmds, identity);
|
sk_OPENSSL_STRING_pop_free(post_cmds, identity);
|
||||||
if (bio_out != NULL) BIO_free_all(bio_out);
|
if (bio_out != NULL) BIO_free_all(bio_out);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
OPENSSL_EXIT(ret);
|
OPENSSL_EXIT(ret);
|
||||||
|
|
|
@ -99,7 +99,7 @@ static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, const EVP_MD *cert_id_m
|
||||||
static int add_ocsp_serial(OCSP_REQUEST **req, char *serial, const EVP_MD * cert_id_md, X509 *issuer,
|
static int add_ocsp_serial(OCSP_REQUEST **req, char *serial, const EVP_MD * cert_id_md, X509 *issuer,
|
||||||
STACK_OF(OCSP_CERTID) *ids);
|
STACK_OF(OCSP_CERTID) *ids);
|
||||||
static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
|
static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
|
||||||
STACK_OF(STRING) *names,
|
STACK_OF(OPENSSL_STRING) *names,
|
||||||
STACK_OF(OCSP_CERTID) *ids, long nsec,
|
STACK_OF(OCSP_CERTID) *ids, long nsec,
|
||||||
long maxage);
|
long maxage);
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ int MAIN(int argc, char **argv)
|
||||||
int badarg = 0;
|
int badarg = 0;
|
||||||
int i;
|
int i;
|
||||||
int ignore_err = 0;
|
int ignore_err = 0;
|
||||||
STACK_OF(STRING) *reqnames = NULL;
|
STACK_OF(OPENSSL_STRING) *reqnames = NULL;
|
||||||
STACK_OF(OCSP_CERTID) *ids = NULL;
|
STACK_OF(OCSP_CERTID) *ids = NULL;
|
||||||
|
|
||||||
X509 *rca_cert = NULL;
|
X509 *rca_cert = NULL;
|
||||||
|
@ -170,7 +170,7 @@ int MAIN(int argc, char **argv)
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
OpenSSL_add_ssl_algorithms();
|
OpenSSL_add_ssl_algorithms();
|
||||||
args = argv + 1;
|
args = argv + 1;
|
||||||
reqnames = sk_STRING_new_null();
|
reqnames = sk_OPENSSL_STRING_new_null();
|
||||||
ids = sk_OCSP_CERTID_new_null();
|
ids = sk_OCSP_CERTID_new_null();
|
||||||
while (!badarg && *args && *args[0] == '-')
|
while (!badarg && *args && *args[0] == '-')
|
||||||
{
|
{
|
||||||
|
@ -432,7 +432,7 @@ int MAIN(int argc, char **argv)
|
||||||
if (!cert_id_md) cert_id_md = EVP_sha1();
|
if (!cert_id_md) cert_id_md = EVP_sha1();
|
||||||
if(!add_ocsp_cert(&req, cert, cert_id_md, issuer, ids))
|
if(!add_ocsp_cert(&req, cert, cert_id_md, issuer, ids))
|
||||||
goto end;
|
goto end;
|
||||||
if(!sk_STRING_push(reqnames, *args))
|
if(!sk_OPENSSL_STRING_push(reqnames, *args))
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
else badarg = 1;
|
else badarg = 1;
|
||||||
|
@ -445,7 +445,7 @@ int MAIN(int argc, char **argv)
|
||||||
if (!cert_id_md) cert_id_md = EVP_sha1();
|
if (!cert_id_md) cert_id_md = EVP_sha1();
|
||||||
if(!add_ocsp_serial(&req, *args, cert_id_md, issuer, ids))
|
if(!add_ocsp_serial(&req, *args, cert_id_md, issuer, ids))
|
||||||
goto end;
|
goto end;
|
||||||
if(!sk_STRING_push(reqnames, *args))
|
if(!sk_OPENSSL_STRING_push(reqnames, *args))
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
else badarg = 1;
|
else badarg = 1;
|
||||||
|
@ -901,7 +901,7 @@ end:
|
||||||
OCSP_REQUEST_free(req);
|
OCSP_REQUEST_free(req);
|
||||||
OCSP_RESPONSE_free(resp);
|
OCSP_RESPONSE_free(resp);
|
||||||
OCSP_BASICRESP_free(bs);
|
OCSP_BASICRESP_free(bs);
|
||||||
sk_STRING_free(reqnames);
|
sk_OPENSSL_STRING_free(reqnames);
|
||||||
sk_OCSP_CERTID_free(ids);
|
sk_OCSP_CERTID_free(ids);
|
||||||
sk_X509_pop_free(sign_other, X509_free);
|
sk_X509_pop_free(sign_other, X509_free);
|
||||||
sk_X509_pop_free(verify_other, X509_free);
|
sk_X509_pop_free(verify_other, X509_free);
|
||||||
|
@ -971,7 +971,7 @@ static int add_ocsp_serial(OCSP_REQUEST **req, char *serial,const EVP_MD *cert_i
|
||||||
}
|
}
|
||||||
|
|
||||||
static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
|
static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
|
||||||
STACK_OF(STRING) *names,
|
STACK_OF(OPENSSL_STRING) *names,
|
||||||
STACK_OF(OCSP_CERTID) *ids, long nsec,
|
STACK_OF(OCSP_CERTID) *ids, long nsec,
|
||||||
long maxage)
|
long maxage)
|
||||||
{
|
{
|
||||||
|
@ -983,13 +983,13 @@ static int print_ocsp_summary(BIO *out, OCSP_BASICRESP *bs, OCSP_REQUEST *req,
|
||||||
|
|
||||||
ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
|
ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
|
||||||
|
|
||||||
if (!bs || !req || !sk_STRING_num(names) || !sk_OCSP_CERTID_num(ids))
|
if (!bs || !req || !sk_OPENSSL_STRING_num(names) || !sk_OCSP_CERTID_num(ids))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
for (i = 0; i < sk_OCSP_CERTID_num(ids); i++)
|
for (i = 0; i < sk_OCSP_CERTID_num(ids); i++)
|
||||||
{
|
{
|
||||||
id = sk_OCSP_CERTID_value(ids, i);
|
id = sk_OCSP_CERTID_value(ids, i);
|
||||||
name = sk_STRING_value(names, i);
|
name = sk_OPENSSL_STRING_value(names, i);
|
||||||
BIO_printf(out, "%s: ", name);
|
BIO_printf(out, "%s: ", name);
|
||||||
|
|
||||||
if(!OCSP_resp_find_status(bs, id, &status, &reason,
|
if(!OCSP_resp_find_status(bs, id, &status, &reason,
|
||||||
|
|
|
@ -117,7 +117,7 @@ int MAIN(int argc, char **argv)
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
int macver = 1;
|
int macver = 1;
|
||||||
int noprompt = 0;
|
int noprompt = 0;
|
||||||
STACK_OF(STRING) *canames = NULL;
|
STACK_OF(OPENSSL_STRING) *canames = NULL;
|
||||||
char *cpass = NULL, *mpass = NULL;
|
char *cpass = NULL, *mpass = NULL;
|
||||||
char *passargin = NULL, *passargout = NULL, *passarg = NULL;
|
char *passargin = NULL, *passargout = NULL, *passarg = NULL;
|
||||||
char *passin = NULL, *passout = NULL;
|
char *passin = NULL, *passout = NULL;
|
||||||
|
@ -222,8 +222,8 @@ int MAIN(int argc, char **argv)
|
||||||
} else if (!strcmp (*args, "-caname")) {
|
} else if (!strcmp (*args, "-caname")) {
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
args++;
|
args++;
|
||||||
if (!canames) canames = sk_STRING_new_null();
|
if (!canames) canames = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(canames, *args);
|
sk_OPENSSL_STRING_push(canames, *args);
|
||||||
} else badarg = 1;
|
} else badarg = 1;
|
||||||
} else if (!strcmp (*args, "-in")) {
|
} else if (!strcmp (*args, "-in")) {
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
|
@ -549,9 +549,9 @@ int MAIN(int argc, char **argv)
|
||||||
|
|
||||||
/* Add any CA names */
|
/* Add any CA names */
|
||||||
|
|
||||||
for (i = 0; i < sk_STRING_num(canames); i++)
|
for (i = 0; i < sk_OPENSSL_STRING_num(canames); i++)
|
||||||
{
|
{
|
||||||
catmp = (unsigned char *)sk_STRING_value(canames, i);
|
catmp = (unsigned char *)sk_OPENSSL_STRING_value(canames, i);
|
||||||
X509_alias_set1(sk_X509_value(certs, i), catmp, -1);
|
X509_alias_set1(sk_X509_value(certs, i), catmp, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -687,7 +687,7 @@ int MAIN(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
BIO_free(in);
|
BIO_free(in);
|
||||||
BIO_free_all(out);
|
BIO_free_all(out);
|
||||||
if (canames) sk_STRING_free(canames);
|
if (canames) sk_OPENSSL_STRING_free(canames);
|
||||||
if(passin) OPENSSL_free(passin);
|
if(passin) OPENSSL_free(passin);
|
||||||
if(passout) OPENSSL_free(passout);
|
if(passout) OPENSSL_free(passout);
|
||||||
apps_shutdown();
|
apps_shutdown();
|
||||||
|
|
|
@ -165,7 +165,7 @@ int MAIN(int argc, char **argv)
|
||||||
EVP_PKEY_CTX *genctx = NULL;
|
EVP_PKEY_CTX *genctx = NULL;
|
||||||
const char *keyalg = NULL;
|
const char *keyalg = NULL;
|
||||||
char *keyalgstr = NULL;
|
char *keyalgstr = NULL;
|
||||||
STACK_OF(STRING) *pkeyopts = NULL;
|
STACK_OF(OPENSSL_STRING) *pkeyopts = NULL;
|
||||||
EVP_PKEY *pkey=NULL;
|
EVP_PKEY *pkey=NULL;
|
||||||
int i=0,badops=0,newreq=0,verbose=0,pkey_type=-1;
|
int i=0,badops=0,newreq=0,verbose=0,pkey_type=-1;
|
||||||
long newkey = -1;
|
long newkey = -1;
|
||||||
|
@ -306,8 +306,8 @@ int MAIN(int argc, char **argv)
|
||||||
if (--argc < 1)
|
if (--argc < 1)
|
||||||
goto bad;
|
goto bad;
|
||||||
if (!pkeyopts)
|
if (!pkeyopts)
|
||||||
pkeyopts = sk_STRING_new_null();
|
pkeyopts = sk_OPENSSL_STRING_new_null();
|
||||||
if (!pkeyopts || !sk_STRING_push(pkeyopts, *(++argv)))
|
if (!pkeyopts || !sk_OPENSSL_STRING_push(pkeyopts, *(++argv)))
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
else if (strcmp(*argv,"-batch") == 0)
|
else if (strcmp(*argv,"-batch") == 0)
|
||||||
|
@ -667,9 +667,9 @@ bad:
|
||||||
if (pkeyopts)
|
if (pkeyopts)
|
||||||
{
|
{
|
||||||
char *genopt;
|
char *genopt;
|
||||||
for (i = 0; i < sk_STRING_num(pkeyopts); i++)
|
for (i = 0; i < sk_OPENSSL_STRING_num(pkeyopts); i++)
|
||||||
{
|
{
|
||||||
genopt = sk_STRING_value(pkeyopts, i);
|
genopt = sk_OPENSSL_STRING_value(pkeyopts, i);
|
||||||
if (pkey_ctrl_string(genctx, genopt) <= 0)
|
if (pkey_ctrl_string(genctx, genopt) <= 0)
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,
|
BIO_printf(bio_err,
|
||||||
|
@ -1083,7 +1083,7 @@ end:
|
||||||
if (genctx)
|
if (genctx)
|
||||||
EVP_PKEY_CTX_free(genctx);
|
EVP_PKEY_CTX_free(genctx);
|
||||||
if (pkeyopts)
|
if (pkeyopts)
|
||||||
sk_STRING_free(pkeyopts);
|
sk_OPENSSL_STRING_free(pkeyopts);
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
if (gen_eng)
|
if (gen_eng)
|
||||||
ENGINE_free(gen_eng);
|
ENGINE_free(gen_eng);
|
||||||
|
|
|
@ -338,6 +338,12 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||||
case TLS1_VERSION:
|
case TLS1_VERSION:
|
||||||
str_version = "TLS 1.0 ";
|
str_version = "TLS 1.0 ";
|
||||||
break;
|
break;
|
||||||
|
case DTLS1_VERSION:
|
||||||
|
str_version = "DTLS 1.0 ";
|
||||||
|
break;
|
||||||
|
case DTLS1_BAD_VER:
|
||||||
|
str_version = "DTLS 1.0 (bad) ";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
str_version = "???";
|
str_version = "???";
|
||||||
}
|
}
|
||||||
|
@ -403,7 +409,10 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version == SSL3_VERSION || version == TLS1_VERSION)
|
if (version == SSL3_VERSION ||
|
||||||
|
version == TLS1_VERSION ||
|
||||||
|
version == DTLS1_VERSION ||
|
||||||
|
version == DTLS1_BAD_VER)
|
||||||
{
|
{
|
||||||
switch (content_type)
|
switch (content_type)
|
||||||
{
|
{
|
||||||
|
@ -542,6 +551,9 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
|
||||||
case 2:
|
case 2:
|
||||||
str_details1 = ", ServerHello";
|
str_details1 = ", ServerHello";
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
str_details1 = ", HelloVerifyRequest";
|
||||||
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
str_details1 = ", Certificate";
|
str_details1 = ", Certificate";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -712,7 +712,7 @@ static int cert_status_cb(SSL *s, void *arg)
|
||||||
int use_ssl;
|
int use_ssl;
|
||||||
unsigned char *rspder = NULL;
|
unsigned char *rspder = NULL;
|
||||||
int rspderlen;
|
int rspderlen;
|
||||||
STACK_OF(STRING) *aia = NULL;
|
STACK_OF(OPENSSL_STRING) *aia = NULL;
|
||||||
X509 *x = NULL;
|
X509 *x = NULL;
|
||||||
X509_STORE_CTX inctx;
|
X509_STORE_CTX inctx;
|
||||||
X509_OBJECT obj;
|
X509_OBJECT obj;
|
||||||
|
@ -734,7 +734,7 @@ BIO_printf(err, "cert_status: received %d ids\n", sk_OCSP_RESPID_num(ids));
|
||||||
aia = X509_get1_ocsp(x);
|
aia = X509_get1_ocsp(x);
|
||||||
if (aia)
|
if (aia)
|
||||||
{
|
{
|
||||||
if (!OCSP_parse_url(sk_STRING_value(aia, 0),
|
if (!OCSP_parse_url(sk_OPENSSL_STRING_value(aia, 0),
|
||||||
&host, &port, &path, &use_ssl))
|
&host, &port, &path, &use_ssl))
|
||||||
{
|
{
|
||||||
BIO_puts(err, "cert_status: can't parse AIA URL\n");
|
BIO_puts(err, "cert_status: can't parse AIA URL\n");
|
||||||
|
@ -742,7 +742,7 @@ BIO_printf(err, "cert_status: received %d ids\n", sk_OCSP_RESPID_num(ids));
|
||||||
}
|
}
|
||||||
if (srctx->verbose)
|
if (srctx->verbose)
|
||||||
BIO_printf(err, "cert_status: AIA URL: %s\n",
|
BIO_printf(err, "cert_status: AIA URL: %s\n",
|
||||||
sk_STRING_value(aia, 0));
|
sk_OPENSSL_STRING_value(aia, 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,7 +93,7 @@ int MAIN(int argc, char **argv)
|
||||||
const char *inmode = "r", *outmode = "w";
|
const char *inmode = "r", *outmode = "w";
|
||||||
char *infile = NULL, *outfile = NULL;
|
char *infile = NULL, *outfile = NULL;
|
||||||
char *signerfile = NULL, *recipfile = NULL;
|
char *signerfile = NULL, *recipfile = NULL;
|
||||||
STACK_OF(STRING) *sksigners = NULL, *skkeys = NULL;
|
STACK_OF(OPENSSL_STRING) *sksigners = NULL, *skkeys = NULL;
|
||||||
char *certfile = NULL, *keyfile = NULL, *contfile=NULL;
|
char *certfile = NULL, *keyfile = NULL, *contfile=NULL;
|
||||||
const EVP_CIPHER *cipher = NULL;
|
const EVP_CIPHER *cipher = NULL;
|
||||||
PKCS7 *p7 = NULL;
|
PKCS7 *p7 = NULL;
|
||||||
|
@ -260,13 +260,13 @@ int MAIN(int argc, char **argv)
|
||||||
if (signerfile)
|
if (signerfile)
|
||||||
{
|
{
|
||||||
if (!sksigners)
|
if (!sksigners)
|
||||||
sksigners = sk_STRING_new_null();
|
sksigners = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(sksigners, signerfile);
|
sk_OPENSSL_STRING_push(sksigners, signerfile);
|
||||||
if (!keyfile)
|
if (!keyfile)
|
||||||
keyfile = signerfile;
|
keyfile = signerfile;
|
||||||
if (!skkeys)
|
if (!skkeys)
|
||||||
skkeys = sk_STRING_new_null();
|
skkeys = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(skkeys, keyfile);
|
sk_OPENSSL_STRING_push(skkeys, keyfile);
|
||||||
keyfile = NULL;
|
keyfile = NULL;
|
||||||
}
|
}
|
||||||
signerfile = *++args;
|
signerfile = *++args;
|
||||||
|
@ -302,12 +302,12 @@ int MAIN(int argc, char **argv)
|
||||||
goto argerr;
|
goto argerr;
|
||||||
}
|
}
|
||||||
if (!sksigners)
|
if (!sksigners)
|
||||||
sksigners = sk_STRING_new_null();
|
sksigners = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(sksigners, signerfile);
|
sk_OPENSSL_STRING_push(sksigners, signerfile);
|
||||||
signerfile = NULL;
|
signerfile = NULL;
|
||||||
if (!skkeys)
|
if (!skkeys)
|
||||||
skkeys = sk_STRING_new_null();
|
skkeys = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(skkeys, keyfile);
|
sk_OPENSSL_STRING_push(skkeys, keyfile);
|
||||||
}
|
}
|
||||||
keyfile = *++args;
|
keyfile = *++args;
|
||||||
}
|
}
|
||||||
|
@ -389,13 +389,13 @@ int MAIN(int argc, char **argv)
|
||||||
if (signerfile)
|
if (signerfile)
|
||||||
{
|
{
|
||||||
if (!sksigners)
|
if (!sksigners)
|
||||||
sksigners = sk_STRING_new_null();
|
sksigners = sk_OPENSSL_STRING_new_null();
|
||||||
sk_STRING_push(sksigners, signerfile);
|
sk_OPENSSL_STRING_push(sksigners, signerfile);
|
||||||
if (!skkeys)
|
if (!skkeys)
|
||||||
skkeys = sk_STRING_new_null();
|
skkeys = sk_OPENSSL_STRING_new_null();
|
||||||
if (!keyfile)
|
if (!keyfile)
|
||||||
keyfile = signerfile;
|
keyfile = signerfile;
|
||||||
sk_STRING_push(skkeys, keyfile);
|
sk_OPENSSL_STRING_push(skkeys, keyfile);
|
||||||
}
|
}
|
||||||
if (!sksigners)
|
if (!sksigners)
|
||||||
{
|
{
|
||||||
|
@ -707,10 +707,10 @@ int MAIN(int argc, char **argv)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
flags |= PKCS7_REUSE_DIGEST;
|
flags |= PKCS7_REUSE_DIGEST;
|
||||||
for (i = 0; i < sk_STRING_num(sksigners); i++)
|
for (i = 0; i < sk_OPENSSL_STRING_num(sksigners); i++)
|
||||||
{
|
{
|
||||||
signerfile = sk_STRING_value(sksigners, i);
|
signerfile = sk_OPENSSL_STRING_value(sksigners, i);
|
||||||
keyfile = sk_STRING_value(skkeys, i);
|
keyfile = sk_OPENSSL_STRING_value(skkeys, i);
|
||||||
signer = load_cert(bio_err, signerfile,FORMAT_PEM, NULL,
|
signer = load_cert(bio_err, signerfile,FORMAT_PEM, NULL,
|
||||||
e, "signer certificate");
|
e, "signer certificate");
|
||||||
if (!signer)
|
if (!signer)
|
||||||
|
@ -807,9 +807,9 @@ end:
|
||||||
if (vpm)
|
if (vpm)
|
||||||
X509_VERIFY_PARAM_free(vpm);
|
X509_VERIFY_PARAM_free(vpm);
|
||||||
if (sksigners)
|
if (sksigners)
|
||||||
sk_STRING_free(sksigners);
|
sk_OPENSSL_STRING_free(sksigners);
|
||||||
if (skkeys)
|
if (skkeys)
|
||||||
sk_STRING_free(skkeys);
|
sk_OPENSSL_STRING_free(skkeys);
|
||||||
X509_STORE_free(store);
|
X509_STORE_free(store);
|
||||||
X509_free(cert);
|
X509_free(cert);
|
||||||
X509_free(recip);
|
X509_free(recip);
|
||||||
|
|
|
@ -626,7 +626,7 @@ bad:
|
||||||
if (!X509_set_subject_name(x,req->req_info->subject)) goto end;
|
if (!X509_set_subject_name(x,req->req_info->subject)) goto end;
|
||||||
|
|
||||||
X509_gmtime_adj(X509_get_notBefore(x),0);
|
X509_gmtime_adj(X509_get_notBefore(x),0);
|
||||||
X509_gmtime_adj(X509_get_notAfter(x),(long)60*60*24*days);
|
X509_time_adj_ex(X509_get_notAfter(x),days, 0, NULL);
|
||||||
|
|
||||||
pkey = X509_REQ_get_pubkey(req);
|
pkey = X509_REQ_get_pubkey(req);
|
||||||
X509_set_pubkey(x,pkey);
|
X509_set_pubkey(x,pkey);
|
||||||
|
@ -738,14 +738,14 @@ bad:
|
||||||
else if ((email == i) || (ocsp_uri == i))
|
else if ((email == i) || (ocsp_uri == i))
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
STACK_OF(STRING) *emlst;
|
STACK_OF(OPENSSL_STRING) *emlst;
|
||||||
if (email == i)
|
if (email == i)
|
||||||
emlst = X509_get1_email(x);
|
emlst = X509_get1_email(x);
|
||||||
else
|
else
|
||||||
emlst = X509_get1_ocsp(x);
|
emlst = X509_get1_ocsp(x);
|
||||||
for (j = 0; j < sk_STRING_num(emlst); j++)
|
for (j = 0; j < sk_OPENSSL_STRING_num(emlst); j++)
|
||||||
BIO_printf(STDout, "%s\n",
|
BIO_printf(STDout, "%s\n",
|
||||||
sk_STRING_value(emlst, j));
|
sk_OPENSSL_STRING_value(emlst, j));
|
||||||
X509_email_free(emlst);
|
X509_email_free(emlst);
|
||||||
}
|
}
|
||||||
else if (aliasout == i)
|
else if (aliasout == i)
|
||||||
|
@ -1147,7 +1147,7 @@ static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
/* hardwired expired */
|
/* hardwired expired */
|
||||||
if (X509_gmtime_adj(X509_get_notAfter(x),(long)60*60*24*days) == NULL)
|
if (X509_time_adj_ex(X509_get_notAfter(x),days, 0, NULL) == NULL)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
if (clrext)
|
if (clrext)
|
||||||
|
|
|
@ -85,7 +85,7 @@ static int SetBlobCmp(const void *elem1, const void *elem2 )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* int is_set: if TRUE, then sort the contents (i.e. it isn't a SEQUENCE) */
|
/* int is_set: if TRUE, then sort the contents (i.e. it isn't a SEQUENCE) */
|
||||||
int i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
|
int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp,
|
||||||
i2d_of_void *i2d, int ex_tag, int ex_class,
|
i2d_of_void *i2d, int ex_tag, int ex_class,
|
||||||
int is_set)
|
int is_set)
|
||||||
{
|
{
|
||||||
|
@ -97,8 +97,8 @@ int i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
|
||||||
int totSize;
|
int totSize;
|
||||||
|
|
||||||
if (a == NULL) return(0);
|
if (a == NULL) return(0);
|
||||||
for (i=sk_BLOCK_num(a)-1; i>=0; i--)
|
for (i=sk_OPENSSL_BLOCK_num(a)-1; i>=0; i--)
|
||||||
ret+=i2d(sk_BLOCK_value(a,i),NULL);
|
ret+=i2d(sk_OPENSSL_BLOCK_value(a,i),NULL);
|
||||||
r=ASN1_object_size(1,ret,ex_tag);
|
r=ASN1_object_size(1,ret,ex_tag);
|
||||||
if (pp == NULL) return(r);
|
if (pp == NULL) return(r);
|
||||||
|
|
||||||
|
@ -109,10 +109,10 @@ int i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
|
||||||
/* And then again by Ben */
|
/* And then again by Ben */
|
||||||
/* And again by Steve */
|
/* And again by Steve */
|
||||||
|
|
||||||
if(!is_set || (sk_BLOCK_num(a) < 2))
|
if(!is_set || (sk_OPENSSL_BLOCK_num(a) < 2))
|
||||||
{
|
{
|
||||||
for (i=0; i<sk_BLOCK_num(a); i++)
|
for (i=0; i<sk_OPENSSL_BLOCK_num(a); i++)
|
||||||
i2d(sk_BLOCK_value(a,i),&p);
|
i2d(sk_OPENSSL_BLOCK_value(a,i),&p);
|
||||||
|
|
||||||
*pp=p;
|
*pp=p;
|
||||||
return(r);
|
return(r);
|
||||||
|
@ -120,17 +120,17 @@ int i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
|
||||||
|
|
||||||
pStart = p; /* Catch the beg of Setblobs*/
|
pStart = p; /* Catch the beg of Setblobs*/
|
||||||
/* In this array we will store the SET blobs */
|
/* In this array we will store the SET blobs */
|
||||||
rgSetBlob = OPENSSL_malloc(sk_BLOCK_num(a) * sizeof(MYBLOB));
|
rgSetBlob = OPENSSL_malloc(sk_OPENSSL_BLOCK_num(a) * sizeof(MYBLOB));
|
||||||
if (rgSetBlob == NULL)
|
if (rgSetBlob == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_I2D_ASN1_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_I2D_ASN1_SET,ERR_R_MALLOC_FAILURE);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<sk_BLOCK_num(a); i++)
|
for (i=0; i<sk_OPENSSL_BLOCK_num(a); i++)
|
||||||
{
|
{
|
||||||
rgSetBlob[i].pbData = p; /* catch each set encode blob */
|
rgSetBlob[i].pbData = p; /* catch each set encode blob */
|
||||||
i2d(sk_BLOCK_value(a,i),&p);
|
i2d(sk_OPENSSL_BLOCK_value(a,i),&p);
|
||||||
rgSetBlob[i].cbData = p - rgSetBlob[i].pbData; /* Length of this
|
rgSetBlob[i].cbData = p - rgSetBlob[i].pbData; /* Length of this
|
||||||
SetBlob
|
SetBlob
|
||||||
*/
|
*/
|
||||||
|
@ -140,7 +140,7 @@ SetBlob
|
||||||
|
|
||||||
/* Now we have to sort the blobs. I am using a simple algo.
|
/* Now we have to sort the blobs. I am using a simple algo.
|
||||||
*Sort ptrs *Copy to temp-mem *Copy from temp-mem to user-mem*/
|
*Sort ptrs *Copy to temp-mem *Copy from temp-mem to user-mem*/
|
||||||
qsort( rgSetBlob, sk_BLOCK_num(a), sizeof(MYBLOB), SetBlobCmp);
|
qsort( rgSetBlob, sk_OPENSSL_BLOCK_num(a), sizeof(MYBLOB), SetBlobCmp);
|
||||||
if (!(pTempMem = OPENSSL_malloc(totSize)))
|
if (!(pTempMem = OPENSSL_malloc(totSize)))
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_I2D_ASN1_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_I2D_ASN1_SET,ERR_R_MALLOC_FAILURE);
|
||||||
|
@ -149,7 +149,7 @@ SetBlob
|
||||||
|
|
||||||
/* Copy to temp mem */
|
/* Copy to temp mem */
|
||||||
p = pTempMem;
|
p = pTempMem;
|
||||||
for(i=0; i<sk_BLOCK_num(a); ++i)
|
for(i=0; i<sk_OPENSSL_BLOCK_num(a); ++i)
|
||||||
{
|
{
|
||||||
memcpy(p, rgSetBlob[i].pbData, rgSetBlob[i].cbData);
|
memcpy(p, rgSetBlob[i].pbData, rgSetBlob[i].cbData);
|
||||||
p += rgSetBlob[i].cbData;
|
p += rgSetBlob[i].cbData;
|
||||||
|
@ -163,17 +163,18 @@ SetBlob
|
||||||
return(r);
|
return(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
STACK_OF(BLOCK) *d2i_ASN1_SET(STACK_OF(BLOCK) **a, const unsigned char **pp,
|
STACK_OF(OPENSSL_BLOCK) *d2i_ASN1_SET(STACK_OF(OPENSSL_BLOCK) **a,
|
||||||
|
const unsigned char **pp,
|
||||||
long length, d2i_of_void *d2i,
|
long length, d2i_of_void *d2i,
|
||||||
void (*free_func)(BLOCK), int ex_tag,
|
void (*free_func)(OPENSSL_BLOCK), int ex_tag,
|
||||||
int ex_class)
|
int ex_class)
|
||||||
{
|
{
|
||||||
ASN1_const_CTX c;
|
ASN1_const_CTX c;
|
||||||
STACK_OF(BLOCK) *ret=NULL;
|
STACK_OF(OPENSSL_BLOCK) *ret=NULL;
|
||||||
|
|
||||||
if ((a == NULL) || ((*a) == NULL))
|
if ((a == NULL) || ((*a) == NULL))
|
||||||
{
|
{
|
||||||
if ((ret=sk_BLOCK_new_null()) == NULL)
|
if ((ret=sk_OPENSSL_BLOCK_new_null()) == NULL)
|
||||||
{
|
{
|
||||||
ASN1err(ASN1_F_D2I_ASN1_SET,ERR_R_MALLOC_FAILURE);
|
ASN1err(ASN1_F_D2I_ASN1_SET,ERR_R_MALLOC_FAILURE);
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -221,7 +222,7 @@ STACK_OF(BLOCK) *d2i_ASN1_SET(STACK_OF(BLOCK) **a, const unsigned char **pp,
|
||||||
asn1_add_error(*pp,(int)(c.p- *pp));
|
asn1_add_error(*pp,(int)(c.p- *pp));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (!sk_BLOCK_push(ret,s)) goto err;
|
if (!sk_OPENSSL_BLOCK_push(ret,s)) goto err;
|
||||||
}
|
}
|
||||||
if (a != NULL) (*a)=ret;
|
if (a != NULL) (*a)=ret;
|
||||||
*pp=c.p;
|
*pp=c.p;
|
||||||
|
@ -230,9 +231,9 @@ err:
|
||||||
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
|
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
|
||||||
{
|
{
|
||||||
if (free_func != NULL)
|
if (free_func != NULL)
|
||||||
sk_BLOCK_pop_free(ret,free_func);
|
sk_OPENSSL_BLOCK_pop_free(ret,free_func);
|
||||||
else
|
else
|
||||||
sk_BLOCK_free(ret);
|
sk_OPENSSL_BLOCK_free(ret);
|
||||||
}
|
}
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,6 +180,7 @@ int ASN1_TIME_set_string(ASN1_TIME *s, const char *str)
|
||||||
|
|
||||||
t.length = strlen(str);
|
t.length = strlen(str);
|
||||||
t.data = (unsigned char *)str;
|
t.data = (unsigned char *)str;
|
||||||
|
t.flags = 0;
|
||||||
|
|
||||||
t.type = V_ASN1_UTCTIME;
|
t.type = V_ASN1_UTCTIME;
|
||||||
|
|
||||||
|
|
|
@ -887,12 +887,13 @@ int ASN1_TIME_check(ASN1_TIME *t);
|
||||||
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
|
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
|
||||||
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
|
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
|
||||||
|
|
||||||
int i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
|
int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp,
|
||||||
i2d_of_void *i2d, int ex_tag, int ex_class,
|
i2d_of_void *i2d, int ex_tag, int ex_class,
|
||||||
int is_set);
|
int is_set);
|
||||||
STACK_OF(BLOCK) *d2i_ASN1_SET(STACK_OF(BLOCK) **a, const unsigned char **pp,
|
STACK_OF(OPENSSL_BLOCK) *d2i_ASN1_SET(STACK_OF(OPENSSL_BLOCK) **a,
|
||||||
|
const unsigned char **pp,
|
||||||
long length, d2i_of_void *d2i,
|
long length, d2i_of_void *d2i,
|
||||||
void (*free_func)(BLOCK), int ex_tag,
|
void (*free_func)(OPENSSL_BLOCK), int ex_tag,
|
||||||
int ex_class);
|
int ex_class);
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_BIO
|
#ifndef OPENSSL_NO_BIO
|
||||||
|
@ -1045,9 +1046,9 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
|
||||||
int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num,
|
int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num,
|
||||||
unsigned char *data, int max_len);
|
unsigned char *data, int max_len);
|
||||||
|
|
||||||
STACK_OF(BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,
|
STACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,
|
||||||
d2i_of_void *d2i, void (*free_func)(BLOCK));
|
d2i_of_void *d2i, void (*free_func)(OPENSSL_BLOCK));
|
||||||
unsigned char *ASN1_seq_pack(STACK_OF(BLOCK) *safes, i2d_of_void *i2d,
|
unsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d,
|
||||||
unsigned char **buf, int *len );
|
unsigned char **buf, int *len );
|
||||||
void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
|
void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
|
||||||
void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
|
void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
|
||||||
|
|
|
@ -66,10 +66,10 @@
|
||||||
|
|
||||||
/* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */
|
/* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */
|
||||||
|
|
||||||
STACK_OF(BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,
|
STACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,
|
||||||
d2i_of_void *d2i, void (*free_func)(BLOCK))
|
d2i_of_void *d2i, void (*free_func)(OPENSSL_BLOCK))
|
||||||
{
|
{
|
||||||
STACK_OF(BLOCK) *sk;
|
STACK_OF(OPENSSL_BLOCK) *sk;
|
||||||
const unsigned char *pbuf;
|
const unsigned char *pbuf;
|
||||||
pbuf = buf;
|
pbuf = buf;
|
||||||
if (!(sk = d2i_ASN1_SET(NULL, &pbuf, len, d2i, free_func,
|
if (!(sk = d2i_ASN1_SET(NULL, &pbuf, len, d2i, free_func,
|
||||||
|
@ -82,7 +82,7 @@ STACK_OF(BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,
|
||||||
* OPENSSL_malloc'ed buffer
|
* OPENSSL_malloc'ed buffer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unsigned char *ASN1_seq_pack(STACK_OF(BLOCK) *safes, i2d_of_void *i2d,
|
unsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d,
|
||||||
unsigned char **buf, int *len)
|
unsigned char **buf, int *len)
|
||||||
{
|
{
|
||||||
int safelen;
|
int safelen;
|
||||||
|
|
|
@ -402,7 +402,7 @@ typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen, void *parg);
|
||||||
#define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
|
#define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
|
||||||
#define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
|
#define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
|
||||||
#define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
|
#define BIO_get_conn_ip(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)
|
||||||
#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3)
|
#define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3,0)
|
||||||
|
|
||||||
|
|
||||||
#define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
|
#define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
|
||||||
|
|
|
@ -250,17 +250,22 @@ static void dgram_reset_rcv_timeout(BIO *b)
|
||||||
{
|
{
|
||||||
#if defined(SO_RCVTIMEO)
|
#if defined(SO_RCVTIMEO)
|
||||||
bio_dgram_data *data = (bio_dgram_data *)b->ptr;
|
bio_dgram_data *data = (bio_dgram_data *)b->ptr;
|
||||||
|
|
||||||
|
/* Is a timer active? */
|
||||||
|
if (data->next_timeout.tv_sec > 0 || data->next_timeout.tv_usec > 0)
|
||||||
|
{
|
||||||
#ifdef OPENSSL_SYS_WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
int timeout = data->socket_timeout.tv_sec * 1000 +
|
int timeout = data->socket_timeout.tv_sec * 1000 +
|
||||||
data->socket_timeout.tv_usec / 1000;
|
data->socket_timeout.tv_usec / 1000;
|
||||||
if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
if (setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO,
|
||||||
(void*)&timeout, sizeof(timeout)) < 0)
|
(void*)&timeout, sizeof(timeout)) < 0)
|
||||||
{ perror("setsockopt"); }
|
{ perror("setsockopt"); }
|
||||||
#else
|
#else
|
||||||
if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &(data->socket_timeout),
|
if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &(data->socket_timeout),
|
||||||
sizeof(struct timeval)) < 0)
|
sizeof(struct timeval)) < 0)
|
||||||
{ perror("setsockopt"); }
|
{ perror("setsockopt"); }
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ static const char* const lock_names[CRYPTO_NUM_LOCKS] =
|
||||||
|
|
||||||
/* This is for applications to allocate new type names in the non-dynamic
|
/* This is for applications to allocate new type names in the non-dynamic
|
||||||
array of lock names. These are numbered with positive numbers. */
|
array of lock names. These are numbered with positive numbers. */
|
||||||
static STACK_OF(STRING) *app_locks=NULL;
|
static STACK_OF(OPENSSL_STRING) *app_locks=NULL;
|
||||||
|
|
||||||
/* For applications that want a more dynamic way of handling threads, the
|
/* For applications that want a more dynamic way of handling threads, the
|
||||||
following stack is used. These are externally numbered with negative
|
following stack is used. These are externally numbered with negative
|
||||||
|
@ -210,7 +210,7 @@ int CRYPTO_get_new_lockid(char *name)
|
||||||
SSLeay_MSVC5_hack=(double)name[0]*(double)name[1];
|
SSLeay_MSVC5_hack=(double)name[0]*(double)name[1];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((app_locks == NULL) && ((app_locks=sk_STRING_new_null()) == NULL))
|
if ((app_locks == NULL) && ((app_locks=sk_OPENSSL_STRING_new_null()) == NULL))
|
||||||
{
|
{
|
||||||
CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE);
|
CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE);
|
||||||
return(0);
|
return(0);
|
||||||
|
@ -220,7 +220,7 @@ int CRYPTO_get_new_lockid(char *name)
|
||||||
CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE);
|
CRYPTOerr(CRYPTO_F_CRYPTO_GET_NEW_LOCKID,ERR_R_MALLOC_FAILURE);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
i=sk_STRING_push(app_locks,str);
|
i=sk_OPENSSL_STRING_push(app_locks,str);
|
||||||
if (!i)
|
if (!i)
|
||||||
OPENSSL_free(str);
|
OPENSSL_free(str);
|
||||||
else
|
else
|
||||||
|
@ -651,10 +651,10 @@ const char *CRYPTO_get_lock_name(int type)
|
||||||
return("dynamic");
|
return("dynamic");
|
||||||
else if (type < CRYPTO_NUM_LOCKS)
|
else if (type < CRYPTO_NUM_LOCKS)
|
||||||
return(lock_names[type]);
|
return(lock_names[type]);
|
||||||
else if (type-CRYPTO_NUM_LOCKS > sk_STRING_num(app_locks))
|
else if (type-CRYPTO_NUM_LOCKS > sk_OPENSSL_STRING_num(app_locks))
|
||||||
return("ERROR");
|
return("ERROR");
|
||||||
else
|
else
|
||||||
return(sk_STRING_value(app_locks,type-CRYPTO_NUM_LOCKS));
|
return(sk_OPENSSL_STRING_value(app_locks,type-CRYPTO_NUM_LOCKS));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
|
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
|
||||||
|
|
|
@ -351,6 +351,15 @@ static char *dlfcn_merger(DSO *dso, const char *filespec1,
|
||||||
return(merged);
|
return(merged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef OPENSSL_SYS_MACOSX
|
||||||
|
#define DSO_ext ".dylib"
|
||||||
|
#define DSO_extlen 6
|
||||||
|
#else
|
||||||
|
#define DSO_ext ".so"
|
||||||
|
#define DSO_extlen 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static char *dlfcn_name_converter(DSO *dso, const char *filename)
|
static char *dlfcn_name_converter(DSO *dso, const char *filename)
|
||||||
{
|
{
|
||||||
char *translated;
|
char *translated;
|
||||||
|
@ -361,8 +370,8 @@ static char *dlfcn_name_converter(DSO *dso, const char *filename)
|
||||||
transform = (strstr(filename, "/") == NULL);
|
transform = (strstr(filename, "/") == NULL);
|
||||||
if(transform)
|
if(transform)
|
||||||
{
|
{
|
||||||
/* We will convert this to "%s.so" or "lib%s.so" */
|
/* We will convert this to "%s.so" or "lib%s.so" etc */
|
||||||
rsize += 3; /* The length of ".so" */
|
rsize += DSO_extlen; /* The length of ".so" */
|
||||||
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||||
rsize += 3; /* The length of "lib" */
|
rsize += 3; /* The length of "lib" */
|
||||||
}
|
}
|
||||||
|
@ -376,9 +385,9 @@ static char *dlfcn_name_converter(DSO *dso, const char *filename)
|
||||||
if(transform)
|
if(transform)
|
||||||
{
|
{
|
||||||
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||||
sprintf(translated, "lib%s.so", filename);
|
sprintf(translated, "lib%s" DSO_ext, filename);
|
||||||
else
|
else
|
||||||
sprintf(translated, "%s.so", filename);
|
sprintf(translated, "%s" DSO_ext, filename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sprintf(translated, "%s", filename);
|
sprintf(translated, "%s", filename);
|
||||||
|
|
|
@ -355,6 +355,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
|
||||||
DSOerr(DSO_F_WIN32_SPLITTER,
|
DSOerr(DSO_F_WIN32_SPLITTER,
|
||||||
DSO_R_INCORRECT_FILE_SYNTAX);
|
DSO_R_INCORRECT_FILE_SYNTAX);
|
||||||
/*goto err;*/
|
/*goto err;*/
|
||||||
|
OPENSSL_free(result);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
result->device = start;
|
result->device = start;
|
||||||
|
@ -621,6 +622,8 @@ static char *win32_merger(DSO *dso, const char *filespec1, const char *filespec2
|
||||||
|
|
||||||
merged = win32_joiner(dso, filespec1_split);
|
merged = win32_joiner(dso, filespec1_split);
|
||||||
}
|
}
|
||||||
|
OPENSSL_free(filespec1_split);
|
||||||
|
OPENSSL_free(filespec2_split);
|
||||||
return(merged);
|
return(merged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
|
|
||||||
#if (defined(__unix__) || defined(unix)) && !defined(USG) && \
|
#if (defined(__unix__) || defined(unix)) && !defined(USG) && \
|
||||||
(defined(OpenBSD) || defined(__FreeBSD_version))
|
(defined(OpenBSD) || defined(__FreeBSD__))
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041)
|
# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041)
|
||||||
# define HAVE_CRYPTODEV
|
# define HAVE_CRYPTODEV
|
||||||
|
@ -86,7 +86,7 @@ static int get_asym_dev_crypto(void);
|
||||||
static int open_dev_crypto(void);
|
static int open_dev_crypto(void);
|
||||||
static int get_dev_crypto(void);
|
static int get_dev_crypto(void);
|
||||||
static int get_cryptodev_ciphers(const int **cnids);
|
static int get_cryptodev_ciphers(const int **cnids);
|
||||||
static int get_cryptodev_digests(const int **cnids);
|
/*static int get_cryptodev_digests(const int **cnids);*/
|
||||||
static int cryptodev_usable_ciphers(const int **nids);
|
static int cryptodev_usable_ciphers(const int **nids);
|
||||||
static int cryptodev_usable_digests(const int **nids);
|
static int cryptodev_usable_digests(const int **nids);
|
||||||
static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
static int cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||||
|
@ -124,7 +124,7 @@ static int cryptodev_mod_exp_dh(const DH *dh, BIGNUM *r, const BIGNUM *a,
|
||||||
static int cryptodev_dh_compute_key(unsigned char *key,
|
static int cryptodev_dh_compute_key(unsigned char *key,
|
||||||
const BIGNUM *pub_key, DH *dh);
|
const BIGNUM *pub_key, DH *dh);
|
||||||
static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p,
|
static int cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p,
|
||||||
void (*f)());
|
void (*f)(void));
|
||||||
void ENGINE_load_cryptodev(void);
|
void ENGINE_load_cryptodev(void);
|
||||||
|
|
||||||
static const ENGINE_CMD_DEFN cryptodev_defns[] = {
|
static const ENGINE_CMD_DEFN cryptodev_defns[] = {
|
||||||
|
@ -149,6 +149,7 @@ static struct {
|
||||||
{ 0, NID_undef, 0, 0, },
|
{ 0, NID_undef, 0, 0, },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0 /* not (yet?) used */
|
||||||
static struct {
|
static struct {
|
||||||
int id;
|
int id;
|
||||||
int nid;
|
int nid;
|
||||||
|
@ -163,6 +164,7 @@ static struct {
|
||||||
{ CRYPTO_SHA1, NID_sha1, 20},
|
{ CRYPTO_SHA1, NID_sha1, 20},
|
||||||
{ 0, NID_undef, 0},
|
{ 0, NID_undef, 0},
|
||||||
};
|
};
|
||||||
|
#endif /* 0 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return a fd if /dev/crypto seems usable, 0 otherwise.
|
* Return a fd if /dev/crypto seems usable, 0 otherwise.
|
||||||
|
@ -259,6 +261,7 @@ get_cryptodev_ciphers(const int **cnids)
|
||||||
* returning them here is harmless, as long as we return NULL
|
* returning them here is harmless, as long as we return NULL
|
||||||
* when asked for a handler in the cryptodev_engine_digests routine
|
* when asked for a handler in the cryptodev_engine_digests routine
|
||||||
*/
|
*/
|
||||||
|
#if 0 /* not (yet?) used */
|
||||||
static int
|
static int
|
||||||
get_cryptodev_digests(const int **cnids)
|
get_cryptodev_digests(const int **cnids)
|
||||||
{
|
{
|
||||||
|
@ -290,6 +293,7 @@ get_cryptodev_digests(const int **cnids)
|
||||||
*cnids = NULL;
|
*cnids = NULL;
|
||||||
return (count);
|
return (count);
|
||||||
}
|
}
|
||||||
|
#endif /* 0 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the useable ciphers|digests from dev/crypto - this is the first
|
* Find the useable ciphers|digests from dev/crypto - this is the first
|
||||||
|
@ -348,7 +352,7 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||||
struct crypt_op cryp;
|
struct crypt_op cryp;
|
||||||
struct dev_crypto_state *state = ctx->cipher_data;
|
struct dev_crypto_state *state = ctx->cipher_data;
|
||||||
struct session_op *sess = &state->d_sess;
|
struct session_op *sess = &state->d_sess;
|
||||||
void *iiv;
|
const void *iiv;
|
||||||
unsigned char save_iv[EVP_MAX_IV_LENGTH];
|
unsigned char save_iv[EVP_MAX_IV_LENGTH];
|
||||||
|
|
||||||
if (state->d_fd < 0)
|
if (state->d_fd < 0)
|
||||||
|
@ -372,7 +376,7 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||||
if (ctx->cipher->iv_len) {
|
if (ctx->cipher->iv_len) {
|
||||||
cryp.iv = (caddr_t) ctx->iv;
|
cryp.iv = (caddr_t) ctx->iv;
|
||||||
if (!ctx->encrypt) {
|
if (!ctx->encrypt) {
|
||||||
iiv = (void *) in + inl - ctx->cipher->iv_len;
|
iiv = in + inl - ctx->cipher->iv_len;
|
||||||
memcpy(save_iv, iiv, ctx->cipher->iv_len);
|
memcpy(save_iv, iiv, ctx->cipher->iv_len);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
@ -387,7 +391,7 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||||
|
|
||||||
if (ctx->cipher->iv_len) {
|
if (ctx->cipher->iv_len) {
|
||||||
if (ctx->encrypt)
|
if (ctx->encrypt)
|
||||||
iiv = (void *) out + inl - ctx->cipher->iv_len;
|
iiv = out + inl - ctx->cipher->iv_len;
|
||||||
else
|
else
|
||||||
iiv = save_iv;
|
iiv = save_iv;
|
||||||
memcpy(ctx->iv, iiv, ctx->cipher->iv_len);
|
memcpy(ctx->iv, iiv, ctx->cipher->iv_len);
|
||||||
|
@ -401,7 +405,7 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
|
||||||
{
|
{
|
||||||
struct dev_crypto_state *state = ctx->cipher_data;
|
struct dev_crypto_state *state = ctx->cipher_data;
|
||||||
struct session_op *sess = &state->d_sess;
|
struct session_op *sess = &state->d_sess;
|
||||||
int cipher, i;
|
int cipher = -1, i;
|
||||||
|
|
||||||
for (i = 0; ciphers[i].id; i++)
|
for (i = 0; ciphers[i].id; i++)
|
||||||
if (ctx->cipher->nid == ciphers[i].nid &&
|
if (ctx->cipher->nid == ciphers[i].nid &&
|
||||||
|
@ -1284,7 +1288,7 @@ static DH_METHOD cryptodev_dh = {
|
||||||
* but I expect we'll want some options soon.
|
* but I expect we'll want some options soon.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
|
cryptodev_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SYSLOG_R
|
#ifdef HAVE_SYSLOG_R
|
||||||
struct syslog_data sd = SYSLOG_DATA_INIT;
|
struct syslog_data sd = SYSLOG_DATA_INIT;
|
||||||
|
|
|
@ -146,7 +146,7 @@ struct st_dynamic_data_ctx
|
||||||
* 'dirs' for loading. Default is to use 'dirs' as a fallback. */
|
* 'dirs' for loading. Default is to use 'dirs' as a fallback. */
|
||||||
int dir_load;
|
int dir_load;
|
||||||
/* A stack of directories from which ENGINEs could be loaded */
|
/* A stack of directories from which ENGINEs could be loaded */
|
||||||
STACK_OF(STRING) *dirs;
|
STACK_OF(OPENSSL_STRING) *dirs;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This is the "ex_data" index we obtain and reserve for use with our context
|
/* This is the "ex_data" index we obtain and reserve for use with our context
|
||||||
|
@ -174,7 +174,7 @@ static void dynamic_data_ctx_free_func(void *parent, void *ptr,
|
||||||
if(ctx->engine_id)
|
if(ctx->engine_id)
|
||||||
OPENSSL_free((void*)ctx->engine_id);
|
OPENSSL_free((void*)ctx->engine_id);
|
||||||
if(ctx->dirs)
|
if(ctx->dirs)
|
||||||
sk_STRING_pop_free(ctx->dirs, int_free_str);
|
sk_OPENSSL_STRING_pop_free(ctx->dirs, int_free_str);
|
||||||
OPENSSL_free(ctx);
|
OPENSSL_free(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ static int dynamic_set_data_ctx(ENGINE *e, dynamic_data_ctx **ctx)
|
||||||
c->DYNAMIC_F1 = "v_check";
|
c->DYNAMIC_F1 = "v_check";
|
||||||
c->DYNAMIC_F2 = "bind_engine";
|
c->DYNAMIC_F2 = "bind_engine";
|
||||||
c->dir_load = 1;
|
c->dir_load = 1;
|
||||||
c->dirs = sk_STRING_new_null();
|
c->dirs = sk_OPENSSL_STRING_new_null();
|
||||||
if(!c->dirs)
|
if(!c->dirs)
|
||||||
{
|
{
|
||||||
ENGINEerr(ENGINE_F_DYNAMIC_SET_DATA_CTX,ERR_R_MALLOC_FAILURE);
|
ENGINEerr(ENGINE_F_DYNAMIC_SET_DATA_CTX,ERR_R_MALLOC_FAILURE);
|
||||||
|
@ -393,7 +393,7 @@ static int dynamic_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
|
||||||
ERR_R_MALLOC_FAILURE);
|
ERR_R_MALLOC_FAILURE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
sk_STRING_insert(ctx->dirs, tmp_str, -1);
|
sk_OPENSSL_STRING_insert(ctx->dirs, tmp_str, -1);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
default:
|
default:
|
||||||
|
@ -411,11 +411,11 @@ static int int_load(dynamic_data_ctx *ctx)
|
||||||
ctx->DYNAMIC_LIBNAME, NULL, 0)) != NULL)
|
ctx->DYNAMIC_LIBNAME, NULL, 0)) != NULL)
|
||||||
return 1;
|
return 1;
|
||||||
/* If we're not allowed to use 'dirs' or we have none, fail */
|
/* If we're not allowed to use 'dirs' or we have none, fail */
|
||||||
if(!ctx->dir_load || (num = sk_STRING_num(ctx->dirs)) < 1)
|
if(!ctx->dir_load || (num = sk_OPENSSL_STRING_num(ctx->dirs)) < 1)
|
||||||
return 0;
|
return 0;
|
||||||
for(loop = 0; loop < num; loop++)
|
for(loop = 0; loop < num; loop++)
|
||||||
{
|
{
|
||||||
const char *s = sk_STRING_value(ctx->dirs, loop);
|
const char *s = sk_OPENSSL_STRING_value(ctx->dirs, loop);
|
||||||
char *merge = DSO_merge(ctx->dynamic_dso, ctx->DYNAMIC_LIBNAME, s);
|
char *merge = DSO_merge(ctx->dynamic_dso, ctx->DYNAMIC_LIBNAME, s);
|
||||||
if(!merge)
|
if(!merge)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -230,8 +230,8 @@ void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);
|
||||||
lh_stats_bio(CHECKED_LHASH_OF(type, lh), out)
|
lh_stats_bio(CHECKED_LHASH_OF(type, lh), out)
|
||||||
#define LHM_lh_free(type, lh) lh_free(CHECKED_LHASH_OF(type, lh))
|
#define LHM_lh_free(type, lh) lh_free(CHECKED_LHASH_OF(type, lh))
|
||||||
|
|
||||||
DECLARE_LHASH_OF(STRING);
|
DECLARE_LHASH_OF(OPENSSL_STRING);
|
||||||
DECLARE_LHASH_OF(CSTRING);
|
DECLARE_LHASH_OF(OPENSSL_CSTRING);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -494,12 +494,28 @@ int RAND_poll(void)
|
||||||
* each entry. Consider each field a source of 1 byte
|
* each entry. Consider each field a source of 1 byte
|
||||||
* of entropy.
|
* of entropy.
|
||||||
*/
|
*/
|
||||||
|
ZeroMemory(&hlist, sizeof(HEAPLIST32));
|
||||||
hlist.dwSize = sizeof(HEAPLIST32);
|
hlist.dwSize = sizeof(HEAPLIST32);
|
||||||
if (good) stoptime = GetTickCount() + MAXDELAY;
|
if (good) stoptime = GetTickCount() + MAXDELAY;
|
||||||
if (heaplist_first(handle, &hlist))
|
if (heaplist_first(handle, &hlist))
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
following discussion on dev ML, exception on WinCE (or other Win
|
||||||
|
platform) is theoretically of unknown origin; prevent infinite
|
||||||
|
loop here when this theoretical case occurs; otherwise cope with
|
||||||
|
the expected (MSDN documented) exception-throwing behaviour of
|
||||||
|
Heap32Next() on WinCE.
|
||||||
|
|
||||||
|
based on patch in original message by Tanguy Fautré (2009/03/02)
|
||||||
|
Subject: RAND_poll() and CreateToolhelp32Snapshot() stability
|
||||||
|
*/
|
||||||
|
int ex_cnt_limit = 42;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
RAND_add(&hlist, hlist.dwSize, 3);
|
RAND_add(&hlist, hlist.dwSize, 3);
|
||||||
|
__try
|
||||||
|
{
|
||||||
|
ZeroMemory(&hentry, sizeof(HEAPENTRY32));
|
||||||
hentry.dwSize = sizeof(HEAPENTRY32);
|
hentry.dwSize = sizeof(HEAPENTRY32);
|
||||||
if (heap_first(&hentry,
|
if (heap_first(&hentry,
|
||||||
hlist.th32ProcessID,
|
hlist.th32ProcessID,
|
||||||
|
@ -512,8 +528,16 @@ int RAND_poll(void)
|
||||||
while (heap_next(&hentry)
|
while (heap_next(&hentry)
|
||||||
&& --entrycnt > 0);
|
&& --entrycnt > 0);
|
||||||
}
|
}
|
||||||
} while (heaplist_next(handle,
|
}
|
||||||
&hlist) && GetTickCount() < stoptime);
|
__except (EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
/* ignore access violations when walking the heap list */
|
||||||
|
ex_cnt_limit--;
|
||||||
|
}
|
||||||
|
} while (heaplist_next(handle, &hlist)
|
||||||
|
&& GetTickCount() < stoptime
|
||||||
|
&& ex_cnt_limit > 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* process walking */
|
/* process walking */
|
||||||
/* PROCESSENTRY32 contains 9 fields that will change
|
/* PROCESSENTRY32 contains 9 fields that will change
|
||||||
|
|
|
@ -110,9 +110,9 @@ o * In practice, however, it appears to be hard to have a const
|
||||||
* string. For now, I'm settling for dealing with the fact it is a
|
* string. For now, I'm settling for dealing with the fact it is a
|
||||||
* string at all.
|
* string at all.
|
||||||
*/
|
*/
|
||||||
typedef char *STRING;
|
typedef char *OPENSSL_STRING;
|
||||||
|
|
||||||
typedef const char *CSTRING;
|
typedef const char *OPENSSL_CSTRING;
|
||||||
|
|
||||||
/* Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
|
/* Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
|
||||||
* STACK_OF(STRING) is really more like STACK_OF(char), only, as
|
* STACK_OF(STRING) is really more like STACK_OF(char), only, as
|
||||||
|
@ -122,14 +122,14 @@ typedef const char *CSTRING;
|
||||||
* macros below.
|
* macros below.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DECLARE_SPECIAL_STACK_OF(STRING, char)
|
DECLARE_SPECIAL_STACK_OF(OPENSSL_STRING, char)
|
||||||
|
|
||||||
/* Similarly, we sometimes use a block of characters, NOT
|
/* Similarly, we sometimes use a block of characters, NOT
|
||||||
* nul-terminated. These should also be distinguished from "normal"
|
* nul-terminated. These should also be distinguished from "normal"
|
||||||
* stacks. */
|
* stacks. */
|
||||||
|
|
||||||
typedef void *BLOCK;
|
typedef void *OPENSSL_BLOCK;
|
||||||
DECLARE_SPECIAL_STACK_OF(BLOCK, void)
|
DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void)
|
||||||
|
|
||||||
/* SKM_sk_... stack macros are internal to safestack.h:
|
/* SKM_sk_... stack macros are internal to safestack.h:
|
||||||
* never use them directly, use sk_<type>_... instead */
|
* never use them directly, use sk_<type>_... instead */
|
||||||
|
@ -2030,79 +2030,79 @@ DECLARE_SPECIAL_STACK_OF(BLOCK, void)
|
||||||
#define sk_void_sort(st) SKM_sk_sort(void, (st))
|
#define sk_void_sort(st) SKM_sk_sort(void, (st))
|
||||||
#define sk_void_is_sorted(st) SKM_sk_is_sorted(void, (st))
|
#define sk_void_is_sorted(st) SKM_sk_is_sorted(void, (st))
|
||||||
|
|
||||||
#define sk_STRING_new(cmp) ((STACK_OF(STRING) *)sk_new(CHECKED_SK_CMP_FUNC(char, cmp)))
|
#define sk_OPENSSL_STRING_new(cmp) ((STACK_OF(OPENSSL_STRING) *)sk_new(CHECKED_SK_CMP_FUNC(char, cmp)))
|
||||||
#define sk_STRING_new_null() ((STACK_OF(STRING) *)sk_new_null())
|
#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)sk_new_null())
|
||||||
#define sk_STRING_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(STRING), st), CHECKED_PTR_OF(char, val))
|
#define sk_OPENSSL_STRING_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, val))
|
||||||
#define sk_STRING_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(STRING), st), CHECKED_PTR_OF(char, val))
|
#define sk_OPENSSL_STRING_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, val))
|
||||||
#define sk_STRING_value(st, i) ((STRING)sk_value(CHECKED_PTR_OF(STACK_OF(STRING), st), i))
|
#define sk_OPENSSL_STRING_value(st, i) ((OPENSSL_STRING)sk_value(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), i))
|
||||||
#define sk_STRING_num(st) SKM_sk_num(STRING, st)
|
#define sk_OPENSSL_STRING_num(st) SKM_sk_num(OPENSSL_STRING, st)
|
||||||
#define sk_STRING_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(STRING), st), CHECKED_SK_FREE_FUNC2(STRING, free_func))
|
#define sk_OPENSSL_STRING_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_SK_FREE_FUNC2(OPENSSL_STRING, free_func))
|
||||||
#define sk_STRING_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(STRING), st), CHECKED_PTR_OF(char, val), i)
|
#define sk_OPENSSL_STRING_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, val), i)
|
||||||
#define sk_STRING_free(st) SKM_sk_free(STRING, st)
|
#define sk_OPENSSL_STRING_free(st) SKM_sk_free(OPENSSL_STRING, st)
|
||||||
#define sk_STRING_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(STRING), st), i, CHECKED_PTR_OF(char, val))
|
#define sk_OPENSSL_STRING_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), i, CHECKED_PTR_OF(char, val))
|
||||||
#define sk_STRING_zero(st) SKM_sk_zero(STRING, (st))
|
#define sk_OPENSSL_STRING_zero(st) SKM_sk_zero(OPENSSL_STRING, (st))
|
||||||
#define sk_STRING_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(STRING), st), CHECKED_PTR_OF(char, val))
|
#define sk_OPENSSL_STRING_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, val))
|
||||||
#define sk_STRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(STRING), st), CHECKED_CONST_PTR_OF(char, val))
|
#define sk_OPENSSL_STRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_CONST_PTR_OF(char, val))
|
||||||
#define sk_STRING_delete(st, i) SKM_sk_delete(STRING, (st), (i))
|
#define sk_OPENSSL_STRING_delete(st, i) SKM_sk_delete(OPENSSL_STRING, (st), (i))
|
||||||
#define sk_STRING_delete_ptr(st, ptr) (STRING *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(STRING), st), CHECKED_PTR_OF(char, ptr))
|
#define sk_OPENSSL_STRING_delete_ptr(st, ptr) (OPENSSL_STRING *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_PTR_OF(char, ptr))
|
||||||
#define sk_STRING_set_cmp_func(st, cmp) \
|
#define sk_OPENSSL_STRING_set_cmp_func(st, cmp) \
|
||||||
((int (*)(const char * const *,const char * const *)) \
|
((int (*)(const char * const *,const char * const *)) \
|
||||||
sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(STRING), st), CHECKED_SK_CMP_FUNC(char, cmp)))
|
sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_SK_CMP_FUNC(char, cmp)))
|
||||||
#define sk_STRING_dup(st) SKM_sk_dup(STRING, st)
|
#define sk_OPENSSL_STRING_dup(st) SKM_sk_dup(OPENSSL_STRING, st)
|
||||||
#define sk_STRING_shift(st) SKM_sk_shift(STRING, (st))
|
#define sk_OPENSSL_STRING_shift(st) SKM_sk_shift(OPENSSL_STRING, (st))
|
||||||
#define sk_STRING_pop(st) (char *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(STRING), st))
|
#define sk_OPENSSL_STRING_pop(st) (char *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_STRING), st))
|
||||||
#define sk_STRING_sort(st) SKM_sk_sort(STRING, (st))
|
#define sk_OPENSSL_STRING_sort(st) SKM_sk_sort(OPENSSL_STRING, (st))
|
||||||
#define sk_STRING_is_sorted(st) SKM_sk_is_sorted(STRING, (st))
|
#define sk_OPENSSL_STRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_STRING, (st))
|
||||||
|
|
||||||
|
|
||||||
#define sk_BLOCK_new(cmp) ((STACK_OF(BLOCK) *)sk_new(CHECKED_SK_CMP_FUNC(void, cmp)))
|
#define sk_OPENSSL_BLOCK_new(cmp) ((STACK_OF(OPENSSL_BLOCK) *)sk_new(CHECKED_SK_CMP_FUNC(void, cmp)))
|
||||||
#define sk_BLOCK_new_null() ((STACK_OF(BLOCK) *)sk_new_null())
|
#define sk_OPENSSL_BLOCK_new_null() ((STACK_OF(OPENSSL_BLOCK) *)sk_new_null())
|
||||||
#define sk_BLOCK_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(BLOCK), st), CHECKED_PTR_OF(void, val))
|
#define sk_OPENSSL_BLOCK_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, val))
|
||||||
#define sk_BLOCK_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(BLOCK), st), CHECKED_PTR_OF(void, val))
|
#define sk_OPENSSL_BLOCK_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, val))
|
||||||
#define sk_BLOCK_value(st, i) ((BLOCK)sk_value(CHECKED_PTR_OF(STACK_OF(BLOCK), st), i))
|
#define sk_OPENSSL_BLOCK_value(st, i) ((OPENSSL_BLOCK)sk_value(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), i))
|
||||||
#define sk_BLOCK_num(st) SKM_sk_num(BLOCK, st)
|
#define sk_OPENSSL_BLOCK_num(st) SKM_sk_num(OPENSSL_BLOCK, st)
|
||||||
#define sk_BLOCK_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(BLOCK), st), CHECKED_SK_FREE_FUNC2(BLOCK, free_func))
|
#define sk_OPENSSL_BLOCK_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_SK_FREE_FUNC2(OPENSSL_BLOCK, free_func))
|
||||||
#define sk_BLOCK_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(BLOCK), st), CHECKED_PTR_OF(void, val), i)
|
#define sk_OPENSSL_BLOCK_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, val), i)
|
||||||
#define sk_BLOCK_free(st) SKM_sk_free(BLOCK, st)
|
#define sk_OPENSSL_BLOCK_free(st) SKM_sk_free(OPENSSL_BLOCK, st)
|
||||||
#define sk_BLOCK_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(BLOCK), st), i, CHECKED_PTR_OF(void, val))
|
#define sk_OPENSSL_BLOCK_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), i, CHECKED_PTR_OF(void, val))
|
||||||
#define sk_BLOCK_zero(st) SKM_sk_zero(BLOCK, (st))
|
#define sk_OPENSSL_BLOCK_zero(st) SKM_sk_zero(OPENSSL_BLOCK, (st))
|
||||||
#define sk_BLOCK_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(BLOCK), st), CHECKED_PTR_OF(void, val))
|
#define sk_OPENSSL_BLOCK_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, val))
|
||||||
#define sk_BLOCK_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(BLOCK), st), CHECKED_CONST_PTR_OF(void, val))
|
#define sk_OPENSSL_BLOCK_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_CONST_PTR_OF(void, val))
|
||||||
#define sk_BLOCK_delete(st, i) SKM_sk_delete(BLOCK, (st), (i))
|
#define sk_OPENSSL_BLOCK_delete(st, i) SKM_sk_delete(OPENSSL_BLOCK, (st), (i))
|
||||||
#define sk_BLOCK_delete_ptr(st, ptr) (BLOCK *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(BLOCK), st), CHECKED_PTR_OF(void, ptr))
|
#define sk_OPENSSL_BLOCK_delete_ptr(st, ptr) (OPENSSL_BLOCK *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_PTR_OF(void, ptr))
|
||||||
#define sk_BLOCK_set_cmp_func(st, cmp) \
|
#define sk_OPENSSL_BLOCK_set_cmp_func(st, cmp) \
|
||||||
((int (*)(const void * const *,const void * const *)) \
|
((int (*)(const void * const *,const void * const *)) \
|
||||||
sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(BLOCK), st), CHECKED_SK_CMP_FUNC(void, cmp)))
|
sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_SK_CMP_FUNC(void, cmp)))
|
||||||
#define sk_BLOCK_dup(st) SKM_sk_dup(BLOCK, st)
|
#define sk_OPENSSL_BLOCK_dup(st) SKM_sk_dup(OPENSSL_BLOCK, st)
|
||||||
#define sk_BLOCK_shift(st) SKM_sk_shift(BLOCK, (st))
|
#define sk_OPENSSL_BLOCK_shift(st) SKM_sk_shift(OPENSSL_BLOCK, (st))
|
||||||
#define sk_BLOCK_pop(st) (void *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(BLOCK), st))
|
#define sk_OPENSSL_BLOCK_pop(st) (void *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_BLOCK), st))
|
||||||
#define sk_BLOCK_sort(st) SKM_sk_sort(BLOCK, (st))
|
#define sk_OPENSSL_BLOCK_sort(st) SKM_sk_sort(OPENSSL_BLOCK, (st))
|
||||||
#define sk_BLOCK_is_sorted(st) SKM_sk_is_sorted(BLOCK, (st))
|
#define sk_OPENSSL_BLOCK_is_sorted(st) SKM_sk_is_sorted(OPENSSL_BLOCK, (st))
|
||||||
|
|
||||||
|
|
||||||
#define sk_PSTRING_new(cmp) ((STACK_OF(PSTRING) *)sk_new(CHECKED_SK_CMP_FUNC(STRING, cmp)))
|
#define sk_OPENSSL_PSTRING_new(cmp) ((STACK_OF(OPENSSL_PSTRING) *)sk_new(CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp)))
|
||||||
#define sk_PSTRING_new_null() ((STACK_OF(PSTRING) *)sk_new_null())
|
#define sk_OPENSSL_PSTRING_new_null() ((STACK_OF(OPENSSL_PSTRING) *)sk_new_null())
|
||||||
#define sk_PSTRING_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(PSTRING), st), CHECKED_PTR_OF(STRING, val))
|
#define sk_OPENSSL_PSTRING_push(st, val) sk_push(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, val))
|
||||||
#define sk_PSTRING_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(PSTRING), st), CHECKED_PTR_OF(STRING, val))
|
#define sk_OPENSSL_PSTRING_find(st, val) sk_find(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, val))
|
||||||
#define sk_PSTRING_value(st, i) ((PSTRING)sk_value(CHECKED_PTR_OF(STACK_OF(PSTRING), st), i))
|
#define sk_OPENSSL_PSTRING_value(st, i) ((OPENSSL_PSTRING)sk_value(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), i))
|
||||||
#define sk_PSTRING_num(st) SKM_sk_num(PSTRING, st)
|
#define sk_OPENSSL_PSTRING_num(st) SKM_sk_num(OPENSSL_PSTRING, st)
|
||||||
#define sk_PSTRING_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(PSTRING), st), CHECKED_SK_FREE_FUNC2(PSTRING, free_func))
|
#define sk_OPENSSL_PSTRING_pop_free(st, free_func) sk_pop_free(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_SK_FREE_FUNC2(OPENSSL_PSTRING, free_func))
|
||||||
#define sk_PSTRING_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(PSTRING), st), CHECKED_PTR_OF(STRING, val), i)
|
#define sk_OPENSSL_PSTRING_insert(st, val, i) sk_insert(CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, val), i)
|
||||||
#define sk_PSTRING_free(st) SKM_sk_free(PSTRING, st)
|
#define sk_OPENSSL_PSTRING_free(st) SKM_sk_free(OPENSSL_PSTRING, st)
|
||||||
#define sk_PSTRING_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(PSTRING), st), i, CHECKED_PTR_OF(STRING, val))
|
#define sk_OPENSSL_PSTRING_set(st, i, val) sk_set((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), i, CHECKED_PTR_OF(OPENSSL_STRING, val))
|
||||||
#define sk_PSTRING_zero(st) SKM_sk_zero(PSTRING, (st))
|
#define sk_OPENSSL_PSTRING_zero(st) SKM_sk_zero(OPENSSL_PSTRING, (st))
|
||||||
#define sk_PSTRING_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(PSTRING), st), CHECKED_PTR_OF(STRING, val))
|
#define sk_OPENSSL_PSTRING_unshift(st, val) sk_unshift((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, val))
|
||||||
#define sk_PSTRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(PSTRING), st), CHECKED_CONST_PTR_OF(STRING, val))
|
#define sk_OPENSSL_PSTRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_CONST_PTR_OF(OPENSSL_STRING, val))
|
||||||
#define sk_PSTRING_delete(st, i) SKM_sk_delete(PSTRING, (st), (i))
|
#define sk_OPENSSL_PSTRING_delete(st, i) SKM_sk_delete(OPENSSL_PSTRING, (st), (i))
|
||||||
#define sk_PSTRING_delete_ptr(st, ptr) (PSTRING *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(PSTRING), st), CHECKED_PTR_OF(STRING, ptr))
|
#define sk_OPENSSL_PSTRING_delete_ptr(st, ptr) (OPENSSL_PSTRING *)sk_delete_ptr((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_PTR_OF(OPENSSL_STRING, ptr))
|
||||||
#define sk_PSTRING_set_cmp_func(st, cmp) \
|
#define sk_OPENSSL_PSTRING_set_cmp_func(st, cmp) \
|
||||||
((int (*)(const STRING * const *,const STRING * const *)) \
|
((int (*)(const OPENSSL_STRING * const *,const OPENSSL_STRING * const *)) \
|
||||||
sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(PSTRING), st), CHECKED_SK_CMP_FUNC(STRING, cmp)))
|
sk_set_cmp_func((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp)))
|
||||||
#define sk_PSTRING_dup(st) SKM_sk_dup(PSTRING, st)
|
#define sk_OPENSSL_PSTRING_dup(st) SKM_sk_dup(OPENSSL_PSTRING, st)
|
||||||
#define sk_PSTRING_shift(st) SKM_sk_shift(PSTRING, (st))
|
#define sk_OPENSSL_PSTRING_shift(st) SKM_sk_shift(OPENSSL_PSTRING, (st))
|
||||||
#define sk_PSTRING_pop(st) (STRING *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(PSTRING), st))
|
#define sk_OPENSSL_PSTRING_pop(st) (OPENSSL_STRING *)sk_pop((_STACK *)CHECKED_PTR_OF(STACK_OF(OPENSSL_PSTRING), st))
|
||||||
#define sk_PSTRING_sort(st) SKM_sk_sort(PSTRING, (st))
|
#define sk_OPENSSL_PSTRING_sort(st) SKM_sk_sort(OPENSSL_PSTRING, (st))
|
||||||
#define sk_PSTRING_is_sorted(st) SKM_sk_is_sorted(PSTRING, (st))
|
#define sk_OPENSSL_PSTRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_PSTRING, (st))
|
||||||
|
|
||||||
|
|
||||||
#define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
|
#define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
|
||||||
|
@ -2390,24 +2390,6 @@ DECLARE_SPECIAL_STACK_OF(BLOCK, void)
|
||||||
LHM_lh_stats_bio(CONF_VALUE,lh,out)
|
LHM_lh_stats_bio(CONF_VALUE,lh,out)
|
||||||
#define lh_CONF_VALUE_free(lh) LHM_lh_free(CONF_VALUE,lh)
|
#define lh_CONF_VALUE_free(lh) LHM_lh_free(CONF_VALUE,lh)
|
||||||
|
|
||||||
#define lh_CSTRING_new() LHM_lh_new(CSTRING,cstring)
|
|
||||||
#define lh_CSTRING_insert(lh,inst) LHM_lh_insert(CSTRING,lh,inst)
|
|
||||||
#define lh_CSTRING_retrieve(lh,inst) LHM_lh_retrieve(CSTRING,lh,inst)
|
|
||||||
#define lh_CSTRING_delete(lh,inst) LHM_lh_delete(CSTRING,lh,inst)
|
|
||||||
#define lh_CSTRING_doall(lh,fn) LHM_lh_doall(CSTRING,lh,fn)
|
|
||||||
#define lh_CSTRING_doall_arg(lh,fn,arg_type,arg) \
|
|
||||||
LHM_lh_doall_arg(CSTRING,lh,fn,arg_type,arg)
|
|
||||||
#define lh_CSTRING_error(lh) LHM_lh_error(CSTRING,lh)
|
|
||||||
#define lh_CSTRING_num_items(lh) LHM_lh_num_items(CSTRING,lh)
|
|
||||||
#define lh_CSTRING_down_load(lh) LHM_lh_down_load(CSTRING,lh)
|
|
||||||
#define lh_CSTRING_node_stats_bio(lh,out) \
|
|
||||||
LHM_lh_node_stats_bio(CSTRING,lh,out)
|
|
||||||
#define lh_CSTRING_node_usage_stats_bio(lh,out) \
|
|
||||||
LHM_lh_node_usage_stats_bio(CSTRING,lh,out)
|
|
||||||
#define lh_CSTRING_stats_bio(lh,out) \
|
|
||||||
LHM_lh_stats_bio(CSTRING,lh,out)
|
|
||||||
#define lh_CSTRING_free(lh) LHM_lh_free(CSTRING,lh)
|
|
||||||
|
|
||||||
#define lh_ENGINE_PILE_new() LHM_lh_new(ENGINE_PILE,engine_pile)
|
#define lh_ENGINE_PILE_new() LHM_lh_new(ENGINE_PILE,engine_pile)
|
||||||
#define lh_ENGINE_PILE_insert(lh,inst) LHM_lh_insert(ENGINE_PILE,lh,inst)
|
#define lh_ENGINE_PILE_insert(lh,inst) LHM_lh_insert(ENGINE_PILE,lh,inst)
|
||||||
#define lh_ENGINE_PILE_retrieve(lh,inst) LHM_lh_retrieve(ENGINE_PILE,lh,inst)
|
#define lh_ENGINE_PILE_retrieve(lh,inst) LHM_lh_retrieve(ENGINE_PILE,lh,inst)
|
||||||
|
@ -2534,6 +2516,42 @@ DECLARE_SPECIAL_STACK_OF(BLOCK, void)
|
||||||
LHM_lh_stats_bio(OBJ_NAME,lh,out)
|
LHM_lh_stats_bio(OBJ_NAME,lh,out)
|
||||||
#define lh_OBJ_NAME_free(lh) LHM_lh_free(OBJ_NAME,lh)
|
#define lh_OBJ_NAME_free(lh) LHM_lh_free(OBJ_NAME,lh)
|
||||||
|
|
||||||
|
#define lh_OPENSSL_CSTRING_new() LHM_lh_new(OPENSSL_CSTRING,openssl_cstring)
|
||||||
|
#define lh_OPENSSL_CSTRING_insert(lh,inst) LHM_lh_insert(OPENSSL_CSTRING,lh,inst)
|
||||||
|
#define lh_OPENSSL_CSTRING_retrieve(lh,inst) LHM_lh_retrieve(OPENSSL_CSTRING,lh,inst)
|
||||||
|
#define lh_OPENSSL_CSTRING_delete(lh,inst) LHM_lh_delete(OPENSSL_CSTRING,lh,inst)
|
||||||
|
#define lh_OPENSSL_CSTRING_doall(lh,fn) LHM_lh_doall(OPENSSL_CSTRING,lh,fn)
|
||||||
|
#define lh_OPENSSL_CSTRING_doall_arg(lh,fn,arg_type,arg) \
|
||||||
|
LHM_lh_doall_arg(OPENSSL_CSTRING,lh,fn,arg_type,arg)
|
||||||
|
#define lh_OPENSSL_CSTRING_error(lh) LHM_lh_error(OPENSSL_CSTRING,lh)
|
||||||
|
#define lh_OPENSSL_CSTRING_num_items(lh) LHM_lh_num_items(OPENSSL_CSTRING,lh)
|
||||||
|
#define lh_OPENSSL_CSTRING_down_load(lh) LHM_lh_down_load(OPENSSL_CSTRING,lh)
|
||||||
|
#define lh_OPENSSL_CSTRING_node_stats_bio(lh,out) \
|
||||||
|
LHM_lh_node_stats_bio(OPENSSL_CSTRING,lh,out)
|
||||||
|
#define lh_OPENSSL_CSTRING_node_usage_stats_bio(lh,out) \
|
||||||
|
LHM_lh_node_usage_stats_bio(OPENSSL_CSTRING,lh,out)
|
||||||
|
#define lh_OPENSSL_CSTRING_stats_bio(lh,out) \
|
||||||
|
LHM_lh_stats_bio(OPENSSL_CSTRING,lh,out)
|
||||||
|
#define lh_OPENSSL_CSTRING_free(lh) LHM_lh_free(OPENSSL_CSTRING,lh)
|
||||||
|
|
||||||
|
#define lh_OPENSSL_STRING_new() LHM_lh_new(OPENSSL_STRING,openssl_string)
|
||||||
|
#define lh_OPENSSL_STRING_insert(lh,inst) LHM_lh_insert(OPENSSL_STRING,lh,inst)
|
||||||
|
#define lh_OPENSSL_STRING_retrieve(lh,inst) LHM_lh_retrieve(OPENSSL_STRING,lh,inst)
|
||||||
|
#define lh_OPENSSL_STRING_delete(lh,inst) LHM_lh_delete(OPENSSL_STRING,lh,inst)
|
||||||
|
#define lh_OPENSSL_STRING_doall(lh,fn) LHM_lh_doall(OPENSSL_STRING,lh,fn)
|
||||||
|
#define lh_OPENSSL_STRING_doall_arg(lh,fn,arg_type,arg) \
|
||||||
|
LHM_lh_doall_arg(OPENSSL_STRING,lh,fn,arg_type,arg)
|
||||||
|
#define lh_OPENSSL_STRING_error(lh) LHM_lh_error(OPENSSL_STRING,lh)
|
||||||
|
#define lh_OPENSSL_STRING_num_items(lh) LHM_lh_num_items(OPENSSL_STRING,lh)
|
||||||
|
#define lh_OPENSSL_STRING_down_load(lh) LHM_lh_down_load(OPENSSL_STRING,lh)
|
||||||
|
#define lh_OPENSSL_STRING_node_stats_bio(lh,out) \
|
||||||
|
LHM_lh_node_stats_bio(OPENSSL_STRING,lh,out)
|
||||||
|
#define lh_OPENSSL_STRING_node_usage_stats_bio(lh,out) \
|
||||||
|
LHM_lh_node_usage_stats_bio(OPENSSL_STRING,lh,out)
|
||||||
|
#define lh_OPENSSL_STRING_stats_bio(lh,out) \
|
||||||
|
LHM_lh_stats_bio(OPENSSL_STRING,lh,out)
|
||||||
|
#define lh_OPENSSL_STRING_free(lh) LHM_lh_free(OPENSSL_STRING,lh)
|
||||||
|
|
||||||
#define lh_SSL_SESSION_new() LHM_lh_new(SSL_SESSION,ssl_session)
|
#define lh_SSL_SESSION_new() LHM_lh_new(SSL_SESSION,ssl_session)
|
||||||
#define lh_SSL_SESSION_insert(lh,inst) LHM_lh_insert(SSL_SESSION,lh,inst)
|
#define lh_SSL_SESSION_insert(lh,inst) LHM_lh_insert(SSL_SESSION,lh,inst)
|
||||||
#define lh_SSL_SESSION_retrieve(lh,inst) LHM_lh_retrieve(SSL_SESSION,lh,inst)
|
#define lh_SSL_SESSION_retrieve(lh,inst) LHM_lh_retrieve(SSL_SESSION,lh,inst)
|
||||||
|
@ -2551,24 +2569,6 @@ DECLARE_SPECIAL_STACK_OF(BLOCK, void)
|
||||||
#define lh_SSL_SESSION_stats_bio(lh,out) \
|
#define lh_SSL_SESSION_stats_bio(lh,out) \
|
||||||
LHM_lh_stats_bio(SSL_SESSION,lh,out)
|
LHM_lh_stats_bio(SSL_SESSION,lh,out)
|
||||||
#define lh_SSL_SESSION_free(lh) LHM_lh_free(SSL_SESSION,lh)
|
#define lh_SSL_SESSION_free(lh) LHM_lh_free(SSL_SESSION,lh)
|
||||||
|
|
||||||
#define lh_STRING_new() LHM_lh_new(STRING,string)
|
|
||||||
#define lh_STRING_insert(lh,inst) LHM_lh_insert(STRING,lh,inst)
|
|
||||||
#define lh_STRING_retrieve(lh,inst) LHM_lh_retrieve(STRING,lh,inst)
|
|
||||||
#define lh_STRING_delete(lh,inst) LHM_lh_delete(STRING,lh,inst)
|
|
||||||
#define lh_STRING_doall(lh,fn) LHM_lh_doall(STRING,lh,fn)
|
|
||||||
#define lh_STRING_doall_arg(lh,fn,arg_type,arg) \
|
|
||||||
LHM_lh_doall_arg(STRING,lh,fn,arg_type,arg)
|
|
||||||
#define lh_STRING_error(lh) LHM_lh_error(STRING,lh)
|
|
||||||
#define lh_STRING_num_items(lh) LHM_lh_num_items(STRING,lh)
|
|
||||||
#define lh_STRING_down_load(lh) LHM_lh_down_load(STRING,lh)
|
|
||||||
#define lh_STRING_node_stats_bio(lh,out) \
|
|
||||||
LHM_lh_node_stats_bio(STRING,lh,out)
|
|
||||||
#define lh_STRING_node_usage_stats_bio(lh,out) \
|
|
||||||
LHM_lh_node_usage_stats_bio(STRING,lh,out)
|
|
||||||
#define lh_STRING_stats_bio(lh,out) \
|
|
||||||
LHM_lh_stats_bio(STRING,lh,out)
|
|
||||||
#define lh_STRING_free(lh) LHM_lh_free(STRING,lh)
|
|
||||||
/* End of util/mkstack.pl block, you may now edit :-) */
|
/* End of util/mkstack.pl block, you may now edit :-) */
|
||||||
|
|
||||||
#endif /* !defined HEADER_SAFESTACK_H */
|
#endif /* !defined HEADER_SAFESTACK_H */
|
||||||
|
|
|
@ -78,7 +78,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
|
||||||
int size=BUFSIZE;
|
int size=BUFSIZE;
|
||||||
int offset=0;
|
int offset=0;
|
||||||
char *p,*f;
|
char *p,*f;
|
||||||
STRING *pp;
|
OPENSSL_STRING *pp;
|
||||||
BUF_MEM *buf=NULL;
|
BUF_MEM *buf=NULL;
|
||||||
|
|
||||||
if ((buf=BUF_MEM_new()) == NULL) goto err;
|
if ((buf=BUF_MEM_new()) == NULL) goto err;
|
||||||
|
@ -89,7 +89,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
|
||||||
ret->num_fields=num;
|
ret->num_fields=num;
|
||||||
ret->index=NULL;
|
ret->index=NULL;
|
||||||
ret->qual=NULL;
|
ret->qual=NULL;
|
||||||
if ((ret->data=sk_PSTRING_new_null()) == NULL)
|
if ((ret->data=sk_OPENSSL_PSTRING_new_null()) == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
if ((ret->index=OPENSSL_malloc(sizeof(*ret->index)*num)) == NULL)
|
if ((ret->index=OPENSSL_malloc(sizeof(*ret->index)*num)) == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -163,7 +163,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
pp[n]=p;
|
pp[n]=p;
|
||||||
if (!sk_PSTRING_push(ret->data,pp))
|
if (!sk_OPENSSL_PSTRING_push(ret->data,pp))
|
||||||
{
|
{
|
||||||
#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) /* temporary fix :-( */
|
#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) /* temporary fix :-( */
|
||||||
fprintf(stderr,"failure in sk_push\n");
|
fprintf(stderr,"failure in sk_push\n");
|
||||||
|
@ -182,7 +182,7 @@ err:
|
||||||
#endif
|
#endif
|
||||||
if (ret != NULL)
|
if (ret != NULL)
|
||||||
{
|
{
|
||||||
if (ret->data != NULL) sk_PSTRING_free(ret->data);
|
if (ret->data != NULL) sk_OPENSSL_PSTRING_free(ret->data);
|
||||||
if (ret->index != NULL) OPENSSL_free(ret->index);
|
if (ret->index != NULL) OPENSSL_free(ret->index);
|
||||||
if (ret->qual != NULL) OPENSSL_free(ret->qual);
|
if (ret->qual != NULL) OPENSSL_free(ret->qual);
|
||||||
if (ret != NULL) OPENSSL_free(ret);
|
if (ret != NULL) OPENSSL_free(ret);
|
||||||
|
@ -193,10 +193,10 @@ err:
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, STRING *value)
|
OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value)
|
||||||
{
|
{
|
||||||
STRING *ret;
|
OPENSSL_STRING *ret;
|
||||||
LHASH_OF(STRING) *lh;
|
LHASH_OF(OPENSSL_STRING) *lh;
|
||||||
|
|
||||||
if (idx >= db->num_fields)
|
if (idx >= db->num_fields)
|
||||||
{
|
{
|
||||||
|
@ -209,16 +209,16 @@ STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, STRING *value)
|
||||||
db->error=DB_ERROR_NO_INDEX;
|
db->error=DB_ERROR_NO_INDEX;
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
ret=lh_STRING_retrieve(lh,value);
|
ret=lh_OPENSSL_STRING_retrieve(lh,value);
|
||||||
db->error=DB_ERROR_OK;
|
db->error=DB_ERROR_OK;
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(STRING *),
|
int TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(OPENSSL_STRING *),
|
||||||
LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp)
|
LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp)
|
||||||
{
|
{
|
||||||
LHASH_OF(STRING) *idx;
|
LHASH_OF(OPENSSL_STRING) *idx;
|
||||||
STRING *r;
|
OPENSSL_STRING *r;
|
||||||
int i,n;
|
int i,n;
|
||||||
|
|
||||||
if (field >= db->num_fields)
|
if (field >= db->num_fields)
|
||||||
|
@ -227,26 +227,26 @@ int TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(STRING *),
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
/* FIXME: we lose type checking at this point */
|
/* FIXME: we lose type checking at this point */
|
||||||
if ((idx=(LHASH_OF(STRING) *)lh_new(hash,cmp)) == NULL)
|
if ((idx=(LHASH_OF(OPENSSL_STRING) *)lh_new(hash,cmp)) == NULL)
|
||||||
{
|
{
|
||||||
db->error=DB_ERROR_MALLOC;
|
db->error=DB_ERROR_MALLOC;
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
n=sk_PSTRING_num(db->data);
|
n=sk_OPENSSL_PSTRING_num(db->data);
|
||||||
for (i=0; i<n; i++)
|
for (i=0; i<n; i++)
|
||||||
{
|
{
|
||||||
r=sk_PSTRING_value(db->data,i);
|
r=sk_OPENSSL_PSTRING_value(db->data,i);
|
||||||
if ((qual != NULL) && (qual(r) == 0)) continue;
|
if ((qual != NULL) && (qual(r) == 0)) continue;
|
||||||
if ((r=lh_STRING_insert(idx,r)) != NULL)
|
if ((r=lh_OPENSSL_STRING_insert(idx,r)) != NULL)
|
||||||
{
|
{
|
||||||
db->error=DB_ERROR_INDEX_CLASH;
|
db->error=DB_ERROR_INDEX_CLASH;
|
||||||
db->arg1=sk_PSTRING_find(db->data,r);
|
db->arg1=sk_OPENSSL_PSTRING_find(db->data,r);
|
||||||
db->arg2=i;
|
db->arg2=i;
|
||||||
lh_STRING_free(idx);
|
lh_OPENSSL_STRING_free(idx);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (db->index[field] != NULL) lh_STRING_free(db->index[field]);
|
if (db->index[field] != NULL) lh_OPENSSL_STRING_free(db->index[field]);
|
||||||
db->index[field]=idx;
|
db->index[field]=idx;
|
||||||
db->qual[field]=qual;
|
db->qual[field]=qual;
|
||||||
return(1);
|
return(1);
|
||||||
|
@ -261,11 +261,11 @@ long TXT_DB_write(BIO *out, TXT_DB *db)
|
||||||
|
|
||||||
if ((buf=BUF_MEM_new()) == NULL)
|
if ((buf=BUF_MEM_new()) == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
n=sk_PSTRING_num(db->data);
|
n=sk_OPENSSL_PSTRING_num(db->data);
|
||||||
nn=db->num_fields;
|
nn=db->num_fields;
|
||||||
for (i=0; i<n; i++)
|
for (i=0; i<n; i++)
|
||||||
{
|
{
|
||||||
pp=sk_PSTRING_value(db->data,i);
|
pp=sk_OPENSSL_PSTRING_value(db->data,i);
|
||||||
|
|
||||||
l=0;
|
l=0;
|
||||||
for (j=0; j<nn; j++)
|
for (j=0; j<nn; j++)
|
||||||
|
@ -300,10 +300,10 @@ err:
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TXT_DB_insert(TXT_DB *db, STRING *row)
|
int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *row)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
STRING *r;
|
OPENSSL_STRING *r;
|
||||||
|
|
||||||
for (i=0; i<db->num_fields; i++)
|
for (i=0; i<db->num_fields; i++)
|
||||||
{
|
{
|
||||||
|
@ -311,7 +311,7 @@ int TXT_DB_insert(TXT_DB *db, STRING *row)
|
||||||
{
|
{
|
||||||
if ((db->qual[i] != NULL) &&
|
if ((db->qual[i] != NULL) &&
|
||||||
(db->qual[i](row) == 0)) continue;
|
(db->qual[i](row) == 0)) continue;
|
||||||
r=lh_STRING_retrieve(db->index[i],row);
|
r=lh_OPENSSL_STRING_retrieve(db->index[i],row);
|
||||||
if (r != NULL)
|
if (r != NULL)
|
||||||
{
|
{
|
||||||
db->error=DB_ERROR_INDEX_CLASH;
|
db->error=DB_ERROR_INDEX_CLASH;
|
||||||
|
@ -322,7 +322,7 @@ int TXT_DB_insert(TXT_DB *db, STRING *row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* We have passed the index checks, now just append and insert */
|
/* We have passed the index checks, now just append and insert */
|
||||||
if (!sk_PSTRING_push(db->data,row))
|
if (!sk_OPENSSL_PSTRING_push(db->data,row))
|
||||||
{
|
{
|
||||||
db->error=DB_ERROR_MALLOC;
|
db->error=DB_ERROR_MALLOC;
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -334,7 +334,7 @@ int TXT_DB_insert(TXT_DB *db, STRING *row)
|
||||||
{
|
{
|
||||||
if ((db->qual[i] != NULL) &&
|
if ((db->qual[i] != NULL) &&
|
||||||
(db->qual[i](row) == 0)) continue;
|
(db->qual[i](row) == 0)) continue;
|
||||||
(void)lh_STRING_insert(db->index[i],row);
|
(void)lh_OPENSSL_STRING_insert(db->index[i],row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(1);
|
return(1);
|
||||||
|
@ -353,18 +353,18 @@ void TXT_DB_free(TXT_DB *db)
|
||||||
if (db->index != NULL)
|
if (db->index != NULL)
|
||||||
{
|
{
|
||||||
for (i=db->num_fields-1; i>=0; i--)
|
for (i=db->num_fields-1; i>=0; i--)
|
||||||
if (db->index[i] != NULL) lh_STRING_free(db->index[i]);
|
if (db->index[i] != NULL) lh_OPENSSL_STRING_free(db->index[i]);
|
||||||
OPENSSL_free(db->index);
|
OPENSSL_free(db->index);
|
||||||
}
|
}
|
||||||
if (db->qual != NULL)
|
if (db->qual != NULL)
|
||||||
OPENSSL_free(db->qual);
|
OPENSSL_free(db->qual);
|
||||||
if (db->data != NULL)
|
if (db->data != NULL)
|
||||||
{
|
{
|
||||||
for (i=sk_PSTRING_num(db->data)-1; i>=0; i--)
|
for (i=sk_OPENSSL_PSTRING_num(db->data)-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
/* check if any 'fields' have been allocated
|
/* check if any 'fields' have been allocated
|
||||||
* from outside of the initial block */
|
* from outside of the initial block */
|
||||||
p=sk_PSTRING_value(db->data,i);
|
p=sk_OPENSSL_PSTRING_value(db->data,i);
|
||||||
max=p[db->num_fields]; /* last address */
|
max=p[db->num_fields]; /* last address */
|
||||||
if (max == NULL) /* new row */
|
if (max == NULL) /* new row */
|
||||||
{
|
{
|
||||||
|
@ -380,9 +380,9 @@ void TXT_DB_free(TXT_DB *db)
|
||||||
OPENSSL_free(p[n]);
|
OPENSSL_free(p[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OPENSSL_free(sk_PSTRING_value(db->data,i));
|
OPENSSL_free(sk_OPENSSL_PSTRING_value(db->data,i));
|
||||||
}
|
}
|
||||||
sk_PSTRING_free(db->data);
|
sk_OPENSSL_PSTRING_free(db->data);
|
||||||
}
|
}
|
||||||
OPENSSL_free(db);
|
OPENSSL_free(db);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,19 +77,19 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef STRING *PSTRING;
|
typedef OPENSSL_STRING *OPENSSL_PSTRING;
|
||||||
DECLARE_SPECIAL_STACK_OF(PSTRING, STRING)
|
DECLARE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
|
||||||
|
|
||||||
typedef struct txt_db_st
|
typedef struct txt_db_st
|
||||||
{
|
{
|
||||||
int num_fields;
|
int num_fields;
|
||||||
STACK_OF(PSTRING) *data;
|
STACK_OF(OPENSSL_PSTRING) *data;
|
||||||
LHASH_OF(STRING) **index;
|
LHASH_OF(OPENSSL_STRING) **index;
|
||||||
int (**qual)(STRING *);
|
int (**qual)(OPENSSL_STRING *);
|
||||||
long error;
|
long error;
|
||||||
long arg1;
|
long arg1;
|
||||||
long arg2;
|
long arg2;
|
||||||
STRING *arg_row;
|
OPENSSL_STRING *arg_row;
|
||||||
} TXT_DB;
|
} TXT_DB;
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_BIO
|
#ifndef OPENSSL_NO_BIO
|
||||||
|
@ -99,11 +99,11 @@ long TXT_DB_write(BIO *out, TXT_DB *db);
|
||||||
TXT_DB *TXT_DB_read(char *in, int num);
|
TXT_DB *TXT_DB_read(char *in, int num);
|
||||||
long TXT_DB_write(char *out, TXT_DB *db);
|
long TXT_DB_write(char *out, TXT_DB *db);
|
||||||
#endif
|
#endif
|
||||||
int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(STRING *),
|
int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(OPENSSL_STRING *),
|
||||||
LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp);
|
LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp);
|
||||||
void TXT_DB_free(TXT_DB *db);
|
void TXT_DB_free(TXT_DB *db);
|
||||||
STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, STRING *value);
|
OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value);
|
||||||
int TXT_DB_insert(TXT_DB *db, STRING *value);
|
int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,9 +67,9 @@
|
||||||
|
|
||||||
static char *strip_spaces(char *name);
|
static char *strip_spaces(char *name);
|
||||||
static int sk_strcmp(const char * const *a, const char * const *b);
|
static int sk_strcmp(const char * const *a, const char * const *b);
|
||||||
static STACK_OF(STRING) *get_email(X509_NAME *name, GENERAL_NAMES *gens);
|
static STACK_OF(OPENSSL_STRING) *get_email(X509_NAME *name, GENERAL_NAMES *gens);
|
||||||
static void str_free(STRING str);
|
static void str_free(OPENSSL_STRING str);
|
||||||
static int append_ia5(STACK_OF(STRING) **sk, ASN1_IA5STRING *email);
|
static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, ASN1_IA5STRING *email);
|
||||||
|
|
||||||
static int ipv4_from_asc(unsigned char *v4, const char *in);
|
static int ipv4_from_asc(unsigned char *v4, const char *in);
|
||||||
static int ipv6_from_asc(unsigned char *v6, const char *in);
|
static int ipv6_from_asc(unsigned char *v6, const char *in);
|
||||||
|
@ -463,10 +463,10 @@ static int sk_strcmp(const char * const *a, const char * const *b)
|
||||||
return strcmp(*a, *b);
|
return strcmp(*a, *b);
|
||||||
}
|
}
|
||||||
|
|
||||||
STACK_OF(STRING) *X509_get1_email(X509 *x)
|
STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x)
|
||||||
{
|
{
|
||||||
GENERAL_NAMES *gens;
|
GENERAL_NAMES *gens;
|
||||||
STACK_OF(STRING) *ret;
|
STACK_OF(OPENSSL_STRING) *ret;
|
||||||
|
|
||||||
gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL);
|
gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL);
|
||||||
ret = get_email(X509_get_subject_name(x), gens);
|
ret = get_email(X509_get_subject_name(x), gens);
|
||||||
|
@ -474,10 +474,10 @@ STACK_OF(STRING) *X509_get1_email(X509 *x)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
STACK_OF(STRING) *X509_get1_ocsp(X509 *x)
|
STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x)
|
||||||
{
|
{
|
||||||
AUTHORITY_INFO_ACCESS *info;
|
AUTHORITY_INFO_ACCESS *info;
|
||||||
STACK_OF(STRING) *ret = NULL;
|
STACK_OF(OPENSSL_STRING) *ret = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
info = X509_get_ext_d2i(x, NID_info_access, NULL, NULL);
|
info = X509_get_ext_d2i(x, NID_info_access, NULL, NULL);
|
||||||
|
@ -499,11 +499,11 @@ STACK_OF(STRING) *X509_get1_ocsp(X509 *x)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
STACK_OF(STRING) *X509_REQ_get1_email(X509_REQ *x)
|
STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x)
|
||||||
{
|
{
|
||||||
GENERAL_NAMES *gens;
|
GENERAL_NAMES *gens;
|
||||||
STACK_OF(X509_EXTENSION) *exts;
|
STACK_OF(X509_EXTENSION) *exts;
|
||||||
STACK_OF(STRING) *ret;
|
STACK_OF(OPENSSL_STRING) *ret;
|
||||||
|
|
||||||
exts = X509_REQ_get_extensions(x);
|
exts = X509_REQ_get_extensions(x);
|
||||||
gens = X509V3_get_d2i(exts, NID_subject_alt_name, NULL, NULL);
|
gens = X509V3_get_d2i(exts, NID_subject_alt_name, NULL, NULL);
|
||||||
|
@ -514,9 +514,9 @@ STACK_OF(STRING) *X509_REQ_get1_email(X509_REQ *x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static STACK_OF(STRING) *get_email(X509_NAME *name, GENERAL_NAMES *gens)
|
static STACK_OF(OPENSSL_STRING) *get_email(X509_NAME *name, GENERAL_NAMES *gens)
|
||||||
{
|
{
|
||||||
STACK_OF(STRING) *ret = NULL;
|
STACK_OF(OPENSSL_STRING) *ret = NULL;
|
||||||
X509_NAME_ENTRY *ne;
|
X509_NAME_ENTRY *ne;
|
||||||
ASN1_IA5STRING *email;
|
ASN1_IA5STRING *email;
|
||||||
GENERAL_NAME *gen;
|
GENERAL_NAME *gen;
|
||||||
|
@ -539,23 +539,23 @@ static STACK_OF(STRING) *get_email(X509_NAME *name, GENERAL_NAMES *gens)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void str_free(STRING str)
|
static void str_free(OPENSSL_STRING str)
|
||||||
{
|
{
|
||||||
OPENSSL_free(str);
|
OPENSSL_free(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int append_ia5(STACK_OF(STRING) **sk, ASN1_IA5STRING *email)
|
static int append_ia5(STACK_OF(OPENSSL_STRING) **sk, ASN1_IA5STRING *email)
|
||||||
{
|
{
|
||||||
char *emtmp;
|
char *emtmp;
|
||||||
/* First some sanity checks */
|
/* First some sanity checks */
|
||||||
if(email->type != V_ASN1_IA5STRING) return 1;
|
if(email->type != V_ASN1_IA5STRING) return 1;
|
||||||
if(!email->data || !email->length) return 1;
|
if(!email->data || !email->length) return 1;
|
||||||
if(!*sk) *sk = sk_STRING_new(sk_strcmp);
|
if(!*sk) *sk = sk_OPENSSL_STRING_new(sk_strcmp);
|
||||||
if(!*sk) return 0;
|
if(!*sk) return 0;
|
||||||
/* Don't add duplicates */
|
/* Don't add duplicates */
|
||||||
if(sk_STRING_find(*sk, (char *)email->data) != -1) return 1;
|
if(sk_OPENSSL_STRING_find(*sk, (char *)email->data) != -1) return 1;
|
||||||
emtmp = BUF_strdup((char *)email->data);
|
emtmp = BUF_strdup((char *)email->data);
|
||||||
if(!emtmp || !sk_STRING_push(*sk, emtmp)) {
|
if(!emtmp || !sk_OPENSSL_STRING_push(*sk, emtmp)) {
|
||||||
X509_email_free(*sk);
|
X509_email_free(*sk);
|
||||||
*sk = NULL;
|
*sk = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -563,9 +563,9 @@ static int append_ia5(STACK_OF(STRING) **sk, ASN1_IA5STRING *email)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void X509_email_free(STACK_OF(STRING) *sk)
|
void X509_email_free(STACK_OF(OPENSSL_STRING) *sk)
|
||||||
{
|
{
|
||||||
sk_STRING_pop_free(sk, str_free);
|
sk_OPENSSL_STRING_pop_free(sk, str_free);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert IP addresses both IPv4 and IPv6 into an
|
/* Convert IP addresses both IPv4 and IPv6 into an
|
||||||
|
|
|
@ -693,10 +693,10 @@ int X509_PURPOSE_get_trust(X509_PURPOSE *xp);
|
||||||
void X509_PURPOSE_cleanup(void);
|
void X509_PURPOSE_cleanup(void);
|
||||||
int X509_PURPOSE_get_id(X509_PURPOSE *);
|
int X509_PURPOSE_get_id(X509_PURPOSE *);
|
||||||
|
|
||||||
STACK_OF(STRING) *X509_get1_email(X509 *x);
|
STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x);
|
||||||
STACK_OF(STRING) *X509_REQ_get1_email(X509_REQ *x);
|
STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x);
|
||||||
void X509_email_free(STACK_OF(STRING) *sk);
|
void X509_email_free(STACK_OF(OPENSSL_STRING) *sk);
|
||||||
STACK_OF(STRING) *X509_get1_ocsp(X509 *x);
|
STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x);
|
||||||
|
|
||||||
ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc);
|
ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc);
|
||||||
ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc);
|
ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc);
|
||||||
|
|
|
@ -132,7 +132,9 @@ return B<EVP_MD> structures for the MD2, MD5, SHA, SHA1, MDC2 and RIPEMD160 dige
|
||||||
algorithms respectively. The associated signature algorithm is RSA in each case.
|
algorithms respectively. The associated signature algorithm is RSA in each case.
|
||||||
|
|
||||||
EVP_dss() and EVP_dss1() return B<EVP_MD> structures for SHA and SHA1 digest
|
EVP_dss() and EVP_dss1() return B<EVP_MD> structures for SHA and SHA1 digest
|
||||||
algorithms but using DSS (DSA) for the signature algorithm.
|
algorithms but using DSS (DSA) for the signature algorithm. Note: there is
|
||||||
|
no need to use these pseudo-digests in OpenSSL 1.0.0 and later, they are
|
||||||
|
however retained for compatibility.
|
||||||
|
|
||||||
EVP_md_null() is a "null" message digest that does nothing: i.e. the hash it
|
EVP_md_null() is a "null" message digest that does nothing: i.e. the hash it
|
||||||
returns is of zero length.
|
returns is of zero length.
|
||||||
|
@ -228,12 +230,6 @@ digest name passed on the command line.
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
=head1 BUGS
|
|
||||||
|
|
||||||
The link between digests and signing algorithms results in a situation where
|
|
||||||
EVP_sha1() must be used with RSA and EVP_dss1() must be used with DSS
|
|
||||||
even though they are identical digests.
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>,
|
L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>,
|
||||||
|
@ -253,4 +249,11 @@ EVP_md_null(), EVP_md2(), EVP_md5(), EVP_sha(), EVP_sha1(),
|
||||||
EVP_dss(), EVP_dss1(), EVP_mdc2() and EVP_ripemd160() were
|
EVP_dss(), EVP_dss1(), EVP_mdc2() and EVP_ripemd160() were
|
||||||
changed to return truely const EVP_MD * in OpenSSL 0.9.7.
|
changed to return truely const EVP_MD * in OpenSSL 0.9.7.
|
||||||
|
|
||||||
|
The link between digests and signing algorithms was fixed in OpenSSL 1.0 and
|
||||||
|
later, so now EVP_sha1() can be used with RSA and DSA, there is no need to
|
||||||
|
use EVP_dss1() any more.
|
||||||
|
|
||||||
|
OpenSSL 1.0 and later does not include the MD2 digest algorithm in the
|
||||||
|
default configuration due to its security weaknesses.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
|
@ -41,8 +41,6 @@ If B<md> is NULL, the digest is placed in a static array. The size of
|
||||||
the output is placed in B<md_len>, unless it is B<NULL>.
|
the output is placed in B<md_len>, unless it is B<NULL>.
|
||||||
|
|
||||||
B<evp_md> can be EVP_sha1(), EVP_ripemd160() etc.
|
B<evp_md> can be EVP_sha1(), EVP_ripemd160() etc.
|
||||||
B<key> and B<evp_md> may be B<NULL> if a key and hash function have
|
|
||||||
been set in a previous call to HMAC_Init() for that B<HMAC_CTX>.
|
|
||||||
|
|
||||||
HMAC_CTX_init() initialises a B<HMAC_CTX> before first use. It must be
|
HMAC_CTX_init() initialises a B<HMAC_CTX> before first use. It must be
|
||||||
called.
|
called.
|
||||||
|
|
|
@ -35,10 +35,6 @@ echo md5test
|
||||||
md5test
|
md5test
|
||||||
if errorlevel 1 goto done
|
if errorlevel 1 goto done
|
||||||
|
|
||||||
echo md2test
|
|
||||||
md2test
|
|
||||||
if errorlevel 1 goto done
|
|
||||||
|
|
||||||
echo rc2test
|
echo rc2test
|
||||||
rc2test
|
rc2test
|
||||||
if errorlevel 1 goto done
|
if errorlevel 1 goto done
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
%define _unpackaged_files_terminate_build 0
|
||||||
%define libmaj 1
|
%define libmaj 1
|
||||||
%define libmin 1
|
%define libmin 1
|
||||||
%define librel 0
|
%define librel 0
|
||||||
|
@ -96,6 +97,9 @@ perl util/perlpath.pl /usr/bin/perl
|
||||||
%ifarch alpha
|
%ifarch alpha
|
||||||
./Configure %{CONFIG_FLAGS} linux-alpha shared
|
./Configure %{CONFIG_FLAGS} linux-alpha shared
|
||||||
%endif
|
%endif
|
||||||
|
%ifarch x86_64
|
||||||
|
./Configure %{CONFIG_FLAGS} linux-x86_64 shared
|
||||||
|
%endif
|
||||||
LD_LIBRARY_PATH=`pwd` make
|
LD_LIBRARY_PATH=`pwd` make
|
||||||
LD_LIBRARY_PATH=`pwd` make rehash
|
LD_LIBRARY_PATH=`pwd` make rehash
|
||||||
LD_LIBRARY_PATH=`pwd` make test
|
LD_LIBRARY_PATH=`pwd` make test
|
||||||
|
|
|
@ -815,21 +815,21 @@ int dtls1_send_change_cipher_spec(SSL *s, int a, int b)
|
||||||
|
|
||||||
static int dtls1_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x)
|
static int dtls1_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
|
||||||
n=i2d_X509(x,NULL);
|
n=i2d_X509(x,NULL);
|
||||||
if (!BUF_MEM_grow_clean(buf,(int)(n+(*l)+3)))
|
if (!BUF_MEM_grow_clean(buf,(int)(n+(*l)+3)))
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_DTLS1_OUTPUT_CERT_CHAIN,ERR_R_BUF_LIB);
|
SSLerr(SSL_F_DTLS1_ADD_CERT_TO_BUF,ERR_R_BUF_LIB);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
p=(unsigned char *)&(buf->data[*l]);
|
p=(unsigned char *)&(buf->data[*l]);
|
||||||
l2n3(n,p);
|
l2n3(n,p);
|
||||||
i2d_X509(x,&p);
|
i2d_X509(x,&p);
|
||||||
*l+=n+3;
|
*l+=n+3;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
unsigned long dtls1_output_cert_chain(SSL *s, X509 *x)
|
unsigned long dtls1_output_cert_chain(SSL *s, X509 *x)
|
||||||
{
|
{
|
||||||
|
|
|
@ -223,6 +223,8 @@ int dtls1_connect(SSL *s)
|
||||||
s->init_num=0;
|
s->init_num=0;
|
||||||
/* mark client_random uninitialized */
|
/* mark client_random uninitialized */
|
||||||
memset(s->s3->client_random,0,sizeof(s->s3->client_random));
|
memset(s->s3->client_random,0,sizeof(s->s3->client_random));
|
||||||
|
s->d1->send_cookie = 0;
|
||||||
|
s->hit = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SSL3_ST_CW_CLNT_HELLO_A:
|
case SSL3_ST_CW_CLNT_HELLO_A:
|
||||||
|
@ -1353,7 +1355,7 @@ int dtls1_send_client_verify(SSL *s)
|
||||||
SHA_DIGEST_LENGTH,&(p[2]),
|
SHA_DIGEST_LENGTH,&(p[2]),
|
||||||
(unsigned int *)&j,pkey->pkey.ec))
|
(unsigned int *)&j,pkey->pkey.ec))
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_SSL3_SEND_CLIENT_VERIFY,
|
SSLerr(SSL_F_DTLS1_SEND_CLIENT_VERIFY,
|
||||||
ERR_R_ECDSA_LIB);
|
ERR_R_ECDSA_LIB);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -561,7 +561,12 @@ again:
|
||||||
/* read timeout is handled by dtls1_read_bytes */
|
/* read timeout is handled by dtls1_read_bytes */
|
||||||
if (n <= 0) return(n); /* error or non-blocking */
|
if (n <= 0) return(n); /* error or non-blocking */
|
||||||
|
|
||||||
OPENSSL_assert(s->packet_length == DTLS1_RT_HEADER_LENGTH);
|
/* this packet contained a partial record, dump it */
|
||||||
|
if (s->packet_length != DTLS1_RT_HEADER_LENGTH)
|
||||||
|
{
|
||||||
|
s->packet_length = 0;
|
||||||
|
goto again;
|
||||||
|
}
|
||||||
|
|
||||||
s->rstate=SSL_ST_READ_BODY;
|
s->rstate=SSL_ST_READ_BODY;
|
||||||
|
|
||||||
|
@ -770,7 +775,7 @@ start:
|
||||||
/* Check for timeout */
|
/* Check for timeout */
|
||||||
if (dtls1_is_timer_expired(s))
|
if (dtls1_is_timer_expired(s))
|
||||||
{
|
{
|
||||||
if (dtls1_read_failed(s, -1) > 0);
|
if (dtls1_read_failed(s, -1) > 0)
|
||||||
goto start;
|
goto start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -264,21 +264,21 @@ int ssl3_send_change_cipher_spec(SSL *s, int a, int b)
|
||||||
|
|
||||||
static int ssl3_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x)
|
static int ssl3_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
|
||||||
n=i2d_X509(x,NULL);
|
n=i2d_X509(x,NULL);
|
||||||
if (!BUF_MEM_grow_clean(buf,(int)(n+(*l)+3)))
|
if (!BUF_MEM_grow_clean(buf,(int)(n+(*l)+3)))
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_SSL3_OUTPUT_CERT_CHAIN,ERR_R_BUF_LIB);
|
SSLerr(SSL_F_SSL3_ADD_CERT_TO_BUF,ERR_R_BUF_LIB);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
p=(unsigned char *)&(buf->data[*l]);
|
p=(unsigned char *)&(buf->data[*l]);
|
||||||
l2n3(n,p);
|
l2n3(n,p);
|
||||||
i2d_X509(x,&p);
|
i2d_X509(x,&p);
|
||||||
*l+=n+3;
|
*l+=n+3;
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
|
unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
|
||||||
|
|
|
@ -160,7 +160,7 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
|
||||||
if (pkt[0] == SSL3_RT_APPLICATION_DATA
|
if (pkt[0] == SSL3_RT_APPLICATION_DATA
|
||||||
&& (pkt[3]<<8|pkt[4]) >= 128)
|
&& (pkt[3]<<8|pkt[4]) >= 128)
|
||||||
{
|
{
|
||||||
/* Note that even if packet is corrupted
|
/* Note that even if packet is corrupted
|
||||||
* and its length field is insane, we can
|
* and its length field is insane, we can
|
||||||
* only be led to wrong decision about
|
* only be led to wrong decision about
|
||||||
* whether memmove will occur or not.
|
* whether memmove will occur or not.
|
||||||
|
@ -176,11 +176,12 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
|
||||||
/* ... now we can act as if 'extend' was set */
|
/* ... now we can act as if 'extend' was set */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* extend reads should not span multiple packets for DTLS */
|
/* For DTLS/UDP reads should not span multiple packets
|
||||||
if ( (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER)
|
* because the read operation returns the whole packet
|
||||||
&& extend)
|
* at once (as long as it fits into the buffer). */
|
||||||
|
if (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER)
|
||||||
{
|
{
|
||||||
if ( left > 0 && n > left)
|
if (left > 0 && n > left)
|
||||||
n = left;
|
n = left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,15 +208,22 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
|
||||||
rb->offset = len + align;
|
rb->offset = len + align;
|
||||||
}
|
}
|
||||||
|
|
||||||
max = rb->len - rb->offset;
|
if (n > (int)(rb->len - rb->offset)) /* does not happen */
|
||||||
if (n > max) /* does not happen */
|
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_SSL3_READ_N,ERR_R_INTERNAL_ERROR);
|
SSLerr(SSL_F_SSL3_READ_N,ERR_R_INTERNAL_ERROR);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!s->read_ahead)
|
if (!s->read_ahead)
|
||||||
max=n;
|
/* ignore max parameter */
|
||||||
|
max = n;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (max < n)
|
||||||
|
max = n;
|
||||||
|
if (max > (int)(rb->len - rb->offset))
|
||||||
|
max = rb->len - rb->offset;
|
||||||
|
}
|
||||||
|
|
||||||
while (left < n)
|
while (left < n)
|
||||||
{
|
{
|
||||||
|
@ -244,6 +252,14 @@ int ssl3_read_n(SSL *s, int n, int max, int extend)
|
||||||
return(i);
|
return(i);
|
||||||
}
|
}
|
||||||
left+=i;
|
left+=i;
|
||||||
|
/* reads should *never* span multiple packets for DTLS because
|
||||||
|
* the underlying transport protocol is message oriented as opposed
|
||||||
|
* to byte oriented as in the TLS case. */
|
||||||
|
if (SSL_version(s) == DTLS1_VERSION || SSL_version(s) == DTLS1_BAD_VER)
|
||||||
|
{
|
||||||
|
if (n > left)
|
||||||
|
n = left; /* makes the while condition false */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* done reading, now the book-keeping */
|
/* done reading, now the book-keeping */
|
||||||
|
|
|
@ -1794,6 +1794,7 @@ void ERR_load_SSL_strings(void);
|
||||||
#define SSL_F_DO_DTLS1_WRITE 245
|
#define SSL_F_DO_DTLS1_WRITE 245
|
||||||
#define SSL_F_DO_SSL3_WRITE 104
|
#define SSL_F_DO_SSL3_WRITE 104
|
||||||
#define SSL_F_DTLS1_ACCEPT 246
|
#define SSL_F_DTLS1_ACCEPT 246
|
||||||
|
#define SSL_F_DTLS1_ADD_CERT_TO_BUF 295
|
||||||
#define SSL_F_DTLS1_BUFFER_RECORD 247
|
#define SSL_F_DTLS1_BUFFER_RECORD 247
|
||||||
#define SSL_F_DTLS1_CLIENT_HELLO 248
|
#define SSL_F_DTLS1_CLIENT_HELLO 248
|
||||||
#define SSL_F_DTLS1_CONNECT 249
|
#define SSL_F_DTLS1_CONNECT 249
|
||||||
|
@ -1847,6 +1848,7 @@ void ERR_load_SSL_strings(void);
|
||||||
#define SSL_F_SSL2_SET_CERTIFICATE 126
|
#define SSL_F_SSL2_SET_CERTIFICATE 126
|
||||||
#define SSL_F_SSL2_WRITE 127
|
#define SSL_F_SSL2_WRITE 127
|
||||||
#define SSL_F_SSL3_ACCEPT 128
|
#define SSL_F_SSL3_ACCEPT 128
|
||||||
|
#define SSL_F_SSL3_ADD_CERT_TO_BUF 296
|
||||||
#define SSL_F_SSL3_CALLBACK_CTRL 233
|
#define SSL_F_SSL3_CALLBACK_CTRL 233
|
||||||
#define SSL_F_SSL3_CHANGE_CIPHER_STATE 129
|
#define SSL_F_SSL3_CHANGE_CIPHER_STATE 129
|
||||||
#define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130
|
#define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* ssl/ssl_err.c */
|
/* ssl/ssl_err.c */
|
||||||
/* ====================================================================
|
/* ====================================================================
|
||||||
* Copyright (c) 1999-2008 The OpenSSL Project. All rights reserved.
|
* Copyright (c) 1999-2009 The OpenSSL Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
|
@ -78,6 +78,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
|
||||||
{ERR_FUNC(SSL_F_DO_DTLS1_WRITE), "DO_DTLS1_WRITE"},
|
{ERR_FUNC(SSL_F_DO_DTLS1_WRITE), "DO_DTLS1_WRITE"},
|
||||||
{ERR_FUNC(SSL_F_DO_SSL3_WRITE), "DO_SSL3_WRITE"},
|
{ERR_FUNC(SSL_F_DO_SSL3_WRITE), "DO_SSL3_WRITE"},
|
||||||
{ERR_FUNC(SSL_F_DTLS1_ACCEPT), "DTLS1_ACCEPT"},
|
{ERR_FUNC(SSL_F_DTLS1_ACCEPT), "DTLS1_ACCEPT"},
|
||||||
|
{ERR_FUNC(SSL_F_DTLS1_ADD_CERT_TO_BUF), "DTLS1_ADD_CERT_TO_BUF"},
|
||||||
{ERR_FUNC(SSL_F_DTLS1_BUFFER_RECORD), "DTLS1_BUFFER_RECORD"},
|
{ERR_FUNC(SSL_F_DTLS1_BUFFER_RECORD), "DTLS1_BUFFER_RECORD"},
|
||||||
{ERR_FUNC(SSL_F_DTLS1_CLIENT_HELLO), "DTLS1_CLIENT_HELLO"},
|
{ERR_FUNC(SSL_F_DTLS1_CLIENT_HELLO), "DTLS1_CLIENT_HELLO"},
|
||||||
{ERR_FUNC(SSL_F_DTLS1_CONNECT), "DTLS1_CONNECT"},
|
{ERR_FUNC(SSL_F_DTLS1_CONNECT), "DTLS1_CONNECT"},
|
||||||
|
@ -131,6 +132,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
|
||||||
{ERR_FUNC(SSL_F_SSL2_SET_CERTIFICATE), "SSL2_SET_CERTIFICATE"},
|
{ERR_FUNC(SSL_F_SSL2_SET_CERTIFICATE), "SSL2_SET_CERTIFICATE"},
|
||||||
{ERR_FUNC(SSL_F_SSL2_WRITE), "SSL2_WRITE"},
|
{ERR_FUNC(SSL_F_SSL2_WRITE), "SSL2_WRITE"},
|
||||||
{ERR_FUNC(SSL_F_SSL3_ACCEPT), "SSL3_ACCEPT"},
|
{ERR_FUNC(SSL_F_SSL3_ACCEPT), "SSL3_ACCEPT"},
|
||||||
|
{ERR_FUNC(SSL_F_SSL3_ADD_CERT_TO_BUF), "SSL3_ADD_CERT_TO_BUF"},
|
||||||
{ERR_FUNC(SSL_F_SSL3_CALLBACK_CTRL), "SSL3_CALLBACK_CTRL"},
|
{ERR_FUNC(SSL_F_SSL3_CALLBACK_CTRL), "SSL3_CALLBACK_CTRL"},
|
||||||
{ERR_FUNC(SSL_F_SSL3_CHANGE_CIPHER_STATE), "SSL3_CHANGE_CIPHER_STATE"},
|
{ERR_FUNC(SSL_F_SSL3_CHANGE_CIPHER_STATE), "SSL3_CHANGE_CIPHER_STATE"},
|
||||||
{ERR_FUNC(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM), "SSL3_CHECK_CERT_AND_ALGORITHM"},
|
{ERR_FUNC(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM), "SSL3_CHECK_CERT_AND_ALGORITHM"},
|
||||||
|
|
|
@ -134,7 +134,7 @@ alltests: \
|
||||||
test_enc test_x509 test_rsa test_crl test_sid \
|
test_enc test_x509 test_rsa test_crl test_sid \
|
||||||
test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
|
test_gen test_req test_pkcs7 test_verify test_dh test_dsa \
|
||||||
test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
|
test_ss test_ca test_engine test_evp test_ssl test_tsa test_ige \
|
||||||
test_jpake
|
test_jpake test_cms
|
||||||
|
|
||||||
test_evp:
|
test_evp:
|
||||||
../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
|
../util/shlib_wrap.sh ./$(EVPTEST) evptests.txt
|
||||||
|
@ -304,6 +304,10 @@ test_jpake: $(JPAKETEST)$(EXE_EXT)
|
||||||
@echo "Test JPAKE"
|
@echo "Test JPAKE"
|
||||||
../util/shlib_wrap.sh ./$(JPAKETEST)
|
../util/shlib_wrap.sh ./$(JPAKETEST)
|
||||||
|
|
||||||
|
test_cms:
|
||||||
|
@echo "CMS consistency test"
|
||||||
|
$(PERL) cms-test.pl
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
lint -DLINT $(INCLUDES) $(SRC)>fluff
|
||||||
|
|
||||||
|
@ -448,7 +452,7 @@ $(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO)
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
|
dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
|
||||||
@target=dummytest$; $(BUILD_CMD)
|
@target=dummytest; $(BUILD_CMD)
|
||||||
|
|
||||||
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue