Remove label() option from armor() operation

This commit is contained in:
Paul Schaub 2024-03-30 19:00:09 +01:00
parent a13f1e2a0d
commit 9356447226
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
5 changed files with 0 additions and 31 deletions

View File

@ -7,7 +7,6 @@ package sop.external.operation
import java.io.InputStream
import java.util.Properties
import sop.Ready
import sop.enums.ArmorLabel
import sop.exception.SOPGPException
import sop.external.ExternalSOP
import sop.operation.Armor
@ -18,8 +17,6 @@ class ArmorExternal(binary: String, environment: Properties) : Armor {
private val commandList: MutableList<String> = mutableListOf(binary, "armor")
private val envList: List<String> = ExternalSOP.propertiesToEnv(environment)
override fun label(label: ArmorLabel): Armor = apply { commandList.add("--label=$label") }
@Throws(SOPGPException.BadData::class)
override fun data(data: InputStream): Ready =
ExternalSOP.executeTransformingOperation(Runtime.getRuntime(), commandList, envList, data)

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: Apache-2.0
usage.header=Add ASCII Armor to standard input
label=Label to be used in the header and tail of the armoring
stacktrace=Print stacktrace
# Generic TODO: Remove when bumping picocli to 4.7.0

View File

@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: Apache-2.0
usage.header=Schütze Standard-Eingabe mit ASCII Armor
label=Label für Kopf- und Fußzeile der ASCII Armor
stacktrace=Stacktrace ausgeben
# Generic TODO: Remove when bumping picocli to 4.7.0

View File

@ -1,14 +0,0 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package sop.enums
@Deprecated("Use of armor labels is deprecated.")
enum class ArmorLabel {
auto,
sig,
key,
cert,
message
}

View File

@ -7,22 +7,10 @@ package sop.operation
import java.io.IOException
import java.io.InputStream
import sop.Ready
import sop.enums.ArmorLabel
import sop.exception.SOPGPException.BadData
import sop.exception.SOPGPException.UnsupportedOption
interface Armor {
/**
* Overrides automatic detection of label.
*
* @param label armor label
* @return builder instance
*/
@Deprecated("Use of armor labels is deprecated and will be removed in a future release.")
@Throws(UnsupportedOption::class)
fun label(label: ArmorLabel): Armor
/**
* Armor the provided data.
*