nts: allow multiple server keys and certificates

Allow the ntsservercert and ntsserverkey directives to be specified
multiple times to enable the NTS-KE server to operate under multiple
names.
This commit is contained in:
Miroslav Lichvar
2021-02-11 12:26:35 +01:00
parent 80e627c86b
commit 90557cf1ba
8 changed files with 73 additions and 40 deletions

View File

@@ -41,7 +41,8 @@ typedef int (*NKSN_MessageHandler)(void *arg);
/* Get server or client credentials using a server certificate and key,
or certificates of trusted CAs. The credentials may be shared between
different clients or servers. */
extern NKSN_Credentials NKSN_CreateServerCertCredentials(const char *cert, const char *key);
extern NKSN_Credentials NKSN_CreateServerCertCredentials(const char **certs, const char **keys,
int n_certs_keys);
extern NKSN_Credentials NKSN_CreateClientCertCredentials(const char *trusted_certs);
/* Destroy the credentials */