vici: Support of raw public keys

This commit is contained in:
Andreas Steffen
2016-01-09 07:23:29 +01:00
parent bffbf2f5fd
commit 87371460f6
9 changed files with 110 additions and 20 deletions
@@ -196,6 +196,13 @@ METHOD(certificate_t, destroy, void,
}
}
METHOD(pubkey_cert_t, set_subject, void,
private_pubkey_cert_t *this, identification_t *subject)
{
DESTROY_IF(this->subject);
this->subject = subject->clone(subject);
}
/*
* see header file
*/
@@ -222,6 +229,7 @@ static pubkey_cert_t *pubkey_cert_create(public_key_t *key,
.get_ref = _get_ref,
.destroy = _destroy,
},
.set_subject = _set_subject,
},
.ref = 1,
.key = key,
@@ -35,6 +35,13 @@ struct pubkey_cert_t {
* Implements certificate_t.
*/
certificate_t interface;
/**
* Set the subject of the trusted public key.
*
* @param subject subject to be set
*/
void (*set_subject)(pubkey_cert_t *this, identification_t *subject);
};
/**