Skip to content

Commit 87aaf51

Browse files
committed
Rename change_key() to update_key()
1 parent 8a02e16 commit 87aaf51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/account.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,15 @@ impl Account {
332332
&self.inner.id
333333
}
334334

335-
/// Account key rollover
335+
/// Update the account's authentication key
336336
///
337337
/// This is useful if you want to change the ACME account key of an existing account, e.g.
338338
/// to mitigate the risk of a key compromise. This method creates a new client key and changes
339339
/// the key associated with the existing account. `self` will be updated with the new key,
340340
/// and a fresh set of [`AccountCredentials`] will be returned to update stored credentials.
341341
///
342342
/// See <https://datatracker.ietf.org/doc/html/rfc8555#section-7.3.5> for more information.
343-
pub async fn change_key(&mut self) -> Result<AccountCredentials, Error> {
343+
pub async fn update_key(&mut self) -> Result<AccountCredentials, Error> {
344344
let new_key_url = match self.inner.client.directory.key_change.as_deref() {
345345
Some(url) => url,
346346
None => return Err("Account key rollover not supported by ACME CA".into()),

tests/pebble.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ async fn change_key() -> Result<(), Box<dyn StdError>> {
341341
let mut env = Environment::new(EnvironmentConfig::default()).await?;
342342

343343
// Change the account key
344-
let new_credentials = env.account.change_key().await?;
344+
let new_credentials = env.account.update_key().await?;
345345

346346
// Using the old ACME account key should now produce malformed error.
347347
let Err(Error::Api(problem)) = env

0 commit comments

Comments
 (0)