hx509: Make hxtool default store type to FILE

A common complaint about hxtool(1) is that if one fails to add a TYPE:
prefix to a CSR or certificate/private key store names, then hxtool
fails somewhat inscrutably.  We can't just fix hx509_certs_init() or
hx509_certs_append() because they default to "MEMORY" so who knows what
might break.  Instead we fix all uses of user-provided store names in
hxtool to have a FILE: prefix if no type was given.  For CSRs we'll
default to adding the only type prefix supported, "PKCS10".
This commit is contained in:
Nicolas Williams
2021-03-24 01:07:50 -05:00
parent 8e7c7209e8
commit 5d939ba1b6
5 changed files with 135 additions and 56 deletions

View File

@@ -66,7 +66,7 @@ struct hx509_certs_data {
int flags;
};
static struct hx509_keyset_ops *
struct hx509_keyset_ops *
_hx509_ks_type(hx509_context context, const char *type)
{
int i;