Latest update.
This commit is contained in:
@@ -26,7 +26,6 @@ void app_RAND_load_conf(CONF *c, const char *section)
|
||||
if (RAND_load_file(randfile, -1) < 0) {
|
||||
BIO_printf(bio_err, "Can't load %s into RNG\n", randfile);
|
||||
ERR_print_errors(bio_err);
|
||||
return;
|
||||
}
|
||||
if (save_rand_file == NULL)
|
||||
save_rand_file = OPENSSL_strdup(randfile);
|
||||
|
||||
@@ -950,6 +950,7 @@ static void spawn_loop(void)
|
||||
sleep(30);
|
||||
break;
|
||||
case 0: /* child */
|
||||
OPENSSL_free(kidpids);
|
||||
signal(SIGINT, SIG_DFL);
|
||||
signal(SIGTERM, SIG_DFL);
|
||||
if (termsig)
|
||||
@@ -976,6 +977,7 @@ static void spawn_loop(void)
|
||||
}
|
||||
|
||||
/* The loop above can only break on termsig */
|
||||
OPENSSL_free(kidpids);
|
||||
syslog(LOG_INFO, "terminating on signal: %d", termsig);
|
||||
killall(0, kidpids);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
# This definition stops the following lines choking if HOME isn't
|
||||
# defined.
|
||||
HOME = .
|
||||
RANDFILE = $ENV::HOME/.rnd
|
||||
|
||||
# Extra OBJECT IDENTIFIER info:
|
||||
#oid_file = $ENV::HOME/.oid
|
||||
@@ -57,7 +56,6 @@ crlnumber = $dir]crlnumber. # the current crl number
|
||||
# must be commented out to leave a V1 CRL
|
||||
crl = $dir]crl.pem # The current CRL
|
||||
private_key = $dir.private]cakey.pem# The private key
|
||||
RANDFILE = $dir.private].rand # private random number file
|
||||
|
||||
x509_extensions = usr_cert # The extensions to add to the cert
|
||||
|
||||
|
||||
+57
-1
@@ -316,6 +316,56 @@ static void list_missing_help(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void list_objects(void)
|
||||
{
|
||||
int max_nid = OBJ_new_nid(0);
|
||||
int i;
|
||||
char *oid_buf = NULL;
|
||||
int oid_size = 0;
|
||||
|
||||
/* Skip 0, since that's NID_undef */
|
||||
for (i = 1; i < max_nid; i++) {
|
||||
const ASN1_OBJECT *obj = OBJ_nid2obj(i);
|
||||
const char *sn = OBJ_nid2sn(i);
|
||||
const char *ln = OBJ_nid2ln(i);
|
||||
int n = 0;
|
||||
|
||||
/*
|
||||
* If one of the retrieved objects somehow generated an error,
|
||||
* we ignore it. The check for NID_undef below will detect the
|
||||
* error and simply skip to the next NID.
|
||||
*/
|
||||
ERR_clear_error();
|
||||
|
||||
if (OBJ_obj2nid(obj) == NID_undef)
|
||||
continue;
|
||||
|
||||
if ((n = OBJ_obj2txt(NULL, 0, obj, 1)) == 0) {
|
||||
BIO_printf(bio_out, "# None-OID object: %s, %s\n", sn, ln);
|
||||
continue;
|
||||
}
|
||||
if (n < 0)
|
||||
break; /* Error */
|
||||
|
||||
if (n > oid_size) {
|
||||
oid_buf = OPENSSL_realloc(oid_buf, n + 1);
|
||||
if (oid_buf == NULL) {
|
||||
BIO_printf(bio_err, "ERROR: Memory allocation\n");
|
||||
break; /* Error */
|
||||
}
|
||||
oid_size = n + 1;
|
||||
}
|
||||
if (OBJ_obj2txt(oid_buf, oid_size, obj, 1) < 0)
|
||||
break; /* Error */
|
||||
if (ln == NULL || strcmp(sn, ln) == 0)
|
||||
BIO_printf(bio_out, "%s = %s\n", sn, oid_buf);
|
||||
else
|
||||
BIO_printf(bio_out, "%s = %s, %s\n", sn, ln, oid_buf);
|
||||
}
|
||||
|
||||
OPENSSL_free(oid_buf);
|
||||
}
|
||||
|
||||
static void list_options_for_command(const char *command)
|
||||
{
|
||||
const FUNCTION *fp;
|
||||
@@ -348,7 +398,8 @@ typedef enum HELPLIST_CHOICE {
|
||||
OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_ONE,
|
||||
OPT_COMMANDS, OPT_DIGEST_COMMANDS, OPT_OPTIONS,
|
||||
OPT_DIGEST_ALGORITHMS, OPT_CIPHER_COMMANDS, OPT_CIPHER_ALGORITHMS,
|
||||
OPT_PK_ALGORITHMS, OPT_PK_METHOD, OPT_DISABLED, OPT_MISSING_HELP
|
||||
OPT_PK_ALGORITHMS, OPT_PK_METHOD, OPT_DISABLED, OPT_MISSING_HELP,
|
||||
OPT_OBJECTS
|
||||
} HELPLIST_CHOICE;
|
||||
|
||||
const OPTIONS list_options[] = {
|
||||
@@ -372,6 +423,8 @@ const OPTIONS list_options[] = {
|
||||
"List missing detailed help strings"},
|
||||
{"options", OPT_OPTIONS, 's',
|
||||
"List options for specified command"},
|
||||
{"objects", OPT_OBJECTS, '-',
|
||||
"List built in objects (OID<->name mappings)"},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
@@ -422,6 +475,9 @@ opthelp:
|
||||
case OPT_MISSING_HELP:
|
||||
list_missing_help();
|
||||
break;
|
||||
case OPT_OBJECTS:
|
||||
list_objects();
|
||||
break;
|
||||
case OPT_OPTIONS:
|
||||
list_options_for_command(opt_arg());
|
||||
break;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
# This definition stops the following lines choking if HOME isn't
|
||||
# defined.
|
||||
HOME = .
|
||||
RANDFILE = $ENV::HOME/.rnd
|
||||
|
||||
# Extra OBJECT IDENTIFIER info:
|
||||
#oid_file = $ENV::HOME/.oid
|
||||
@@ -57,7 +56,6 @@ crlnumber = $dir/crlnumber # the current crl number
|
||||
# must be commented out to leave a V1 CRL
|
||||
crl = $dir/crl.pem # The current CRL
|
||||
private_key = $dir/private/cakey.pem# The private key
|
||||
RANDFILE = $dir/private/.rand # private random number file
|
||||
|
||||
x509_extensions = usr_cert # The extensions to add to the cert
|
||||
|
||||
|
||||
Reference in New Issue
Block a user