SOP update-key: Rename --no-new-mechanisms option to --no-added-capabilities

This commit is contained in:
Paul Schaub 2025-04-10 14:36:28 +02:00
parent a8cfb8fbf4
commit 8c077a9c13
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ class UpdateKeyExternal(binary: String, environment: Properties) : UpdateKey {
override fun signingOnly(): UpdateKey = apply { commandList.add("--signing-only") }
override fun noNewMechanisms(): UpdateKey = apply { commandList.add("--no-new-mechanisms") }
override fun noAddedCapabilities(): UpdateKey = apply { commandList.add("--no-added-capabilities") }
override fun withKeyPassword(password: ByteArray): UpdateKey = apply {
commandList.add("--with-key-password=@ENV:KEY_PASSWORD_$argCount")

View file

@ -20,7 +20,7 @@ class UpdateKeyCmd : AbstractSopCmd() {
@Option(names = ["--signing-only"]) var signingOnly = false
@Option(names = ["--no-new-mechanisms"]) var noNewMechanisms = false
@Option(names = ["--no-added-capabilities"]) var noAddedCapabilities = false
@Option(names = ["--with-key-password"], paramLabel = "PASSWORD")
var withKeyPassword: List<String> = listOf()
@ -38,8 +38,8 @@ class UpdateKeyCmd : AbstractSopCmd() {
updateKey.signingOnly()
}
if (noNewMechanisms) {
updateKey.noNewMechanisms()
if (noAddedCapabilities) {
updateKey.noAddedCapabilities()
}
for (passwordFileName in withKeyPassword) {

View file

@ -21,7 +21,7 @@ interface UpdateKey {
@Throws(SOPGPException.UnsupportedOption::class) fun signingOnly(): UpdateKey
@Throws(SOPGPException.UnsupportedOption::class) fun noNewMechanisms(): UpdateKey
@Throws(SOPGPException.UnsupportedOption::class) fun noAddedCapabilities(): UpdateKey
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
fun withKeyPassword(password: String): UpdateKey =