summaryrefslogtreecommitdiffstats
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:23:58 +0100
commitec8a3409487c871b440fa52bff7c3ef33378494a (patch)
tree0a6b5b97453598924479be779e8004d68796a83b /apps/include
parent10c7887330bb6ca136cd16fe081639f4462a072e (diff)
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)
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 c567ed5664..44892dc3e5 100644
--- a/apps/include/apps.h
+++ b/apps/include/apps.h
@@ -225,12 +225,16 @@ extern int do_updatedb(CA_DB *db, time_t *now);
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);