summaryrefslogtreecommitdiff
path: root/apps/include
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2022-05-30 16:53:05 +0200
committerHugo Landau <hlandau@openssl.org>2022-07-14 07:26:34 +0100
commitb74fc77b447ad6dd47a5d3dbe1dfedde75ff6278 (patch)
tree675862bbaf7acd0c00481782e49de6b418751bea /apps/include
parentfcdd41fea3ed56660ce03cec7f07217c99d90d31 (diff)
downloadopenssl-new-b74fc77b447ad6dd47a5d3dbe1dfedde75ff6278.tar.gz
APPS/x509: With -CA but both -CAserial and -CAcreateserial not given, use random serial.
Also improve openssl-x509.pod.in and error handling of load_serial() in apps.c. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18373) (cherry picked from commit ec8a3409487c871b440fa52bff7c3ef33378494a)
Diffstat (limited to 'apps/include')
-rw-r--r--apps/include/apps.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/include/apps.h b/apps/include/apps.h
index 9d5db16600..848d111bbd 100644
--- a/apps/include/apps.h
+++ b/apps/include/apps.h
@@ -219,12 +219,16 @@ typedef struct ca_db_st {
void app_bail_out(char *fmt, ...);
void *app_malloc(size_t sz, const char *what);
-BIGNUM *load_serial(const char *serialfile, int create, ASN1_INTEGER **retai);
-int save_serial(const char *serialfile, const char *suffix, const BIGNUM *serial,
- ASN1_INTEGER **retai);
+
+/* load_serial, save_serial, and rotate_serial are also used for CRL numbers */
+BIGNUM *load_serial(const char *serialfile, int *exists, int create,
+ ASN1_INTEGER **retai);
+int save_serial(const char *serialfile, const char *suffix,
+ const BIGNUM *serial, ASN1_INTEGER **retai);
int rotate_serial(const char *serialfile, const char *new_suffix,
const char *old_suffix);
int rand_serial(BIGNUM *b, ASN1_INTEGER *ai);
+
CA_DB *load_index(const char *dbfile, DB_ATTR *dbattr);
int index_index(CA_DB *db);
int save_index(const char *dbfile, const char *suffix, CA_DB *db);