Skip to content

Commit c2283bb

Browse files
p-avitalcpu
authored andcommitted
Provide a non-owning constructor for Issuer
1 parent fe0ee64 commit c2283bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rcgen/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ impl<'a, S: SigningKey> Issuer<'a, S> {
209209
}
210210
}
211211

212-
fn from_params(params: &'a CertificateParams, signing_key: &'a S) -> Self {
212+
/// Create a new issuer from the given parameters and signing key references.
213+
///
214+
/// Use [`Issuer::new`] instead if you want to obtain an [`Issuer`] that owns
215+
/// its parameters.
216+
pub fn from_params(params: &'a CertificateParams, signing_key: &'a S) -> Self {
213217
Self {
214218
distinguished_name: Cow::Borrowed(&params.distinguished_name),
215219
key_identifier_method: Cow::Borrowed(&params.key_identifier_method),

0 commit comments

Comments
 (0)