pubkey: Remove unused set_subject() method

If not properly used (i.e. before sharing the object), this was not
thread-safe.  So better remove it and force users to create immutable
objects.
This commit is contained in:
Tobias Brunner 2024-12-06 11:52:37 +01:00
parent 65e121b498
commit ddd1126e96
2 changed files with 0 additions and 15 deletions

View File

@ -201,13 +201,6 @@ 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
*/
@ -234,7 +227,6 @@ 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,

View File

@ -36,13 +36,6 @@ 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);
};
/**