Alternative to mem_cred_t.add_cert added, which returns the certificate.
If the certificate is already cached, the cached version is returned.
This commit is contained in:
@@ -46,6 +46,17 @@ struct mem_cred_t {
|
||||
*/
|
||||
void (*add_cert)(mem_cred_t *this, bool trusted, certificate_t *cert);
|
||||
|
||||
/**
|
||||
* Add a certificate to the credential set, returning a reference to it or
|
||||
* to a cached duplicate.
|
||||
*
|
||||
* @param trusted TRUE to serve certificate as trusted
|
||||
* @param cert certificate, reference gets owned by set
|
||||
* @return reference to cert or a previously cached duplicate
|
||||
*/
|
||||
certificate_t *(*add_cert_ref)(mem_cred_t *this, bool trusted,
|
||||
certificate_t *cert);
|
||||
|
||||
/**
|
||||
* Add a private key to the credential set.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user