mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-03 00:00:24 -04:00
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:
parent
65e121b498
commit
ddd1126e96
@ -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
|
* see header file
|
||||||
*/
|
*/
|
||||||
@ -234,7 +227,6 @@ static pubkey_cert_t *pubkey_cert_create(public_key_t *key,
|
|||||||
.get_ref = _get_ref,
|
.get_ref = _get_ref,
|
||||||
.destroy = _destroy,
|
.destroy = _destroy,
|
||||||
},
|
},
|
||||||
.set_subject = _set_subject,
|
|
||||||
},
|
},
|
||||||
.ref = 1,
|
.ref = 1,
|
||||||
.key = key,
|
.key = key,
|
||||||
|
@ -36,13 +36,6 @@ struct pubkey_cert_t {
|
|||||||
* Implements certificate_t.
|
* Implements certificate_t.
|
||||||
*/
|
*/
|
||||||
certificate_t interface;
|
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);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user