mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-09 18:29:48 +02:00
Add implementation of merge-certs command
This commit is contained in:
parent
4115a5041d
commit
84404d629f
6 changed files with 116 additions and 0 deletions
|
@ -64,4 +64,9 @@ interface SOP : SOPV {
|
|||
* Keep a secret key up-to-date.
|
||||
*/
|
||||
fun updateKey(): UpdateKey
|
||||
|
||||
/**
|
||||
* Merge OpenPGP certificates.
|
||||
*/
|
||||
fun mergeCerts(): MergeCerts
|
||||
}
|
||||
|
|
28
sop-java/src/main/kotlin/sop/operation/MergeCerts.kt
Normal file
28
sop-java/src/main/kotlin/sop/operation/MergeCerts.kt
Normal file
|
@ -0,0 +1,28 @@
|
|||
// SPDX-FileCopyrightText: 2024 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.operation
|
||||
|
||||
import sop.Ready
|
||||
import sop.exception.SOPGPException
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
|
||||
interface MergeCerts {
|
||||
|
||||
@Throws(SOPGPException.UnsupportedOption::class)
|
||||
fun noArmor(): MergeCerts
|
||||
|
||||
@Throws(SOPGPException.BadData::class, IOException::class)
|
||||
fun updates(updateCerts: InputStream): MergeCerts
|
||||
|
||||
@Throws(SOPGPException.BadData::class, IOException::class)
|
||||
fun updates(updateCerts: ByteArray): MergeCerts = updates(updateCerts.inputStream())
|
||||
|
||||
@Throws(SOPGPException.BadData::class, IOException::class)
|
||||
fun baseCertificates(certs: InputStream): Ready
|
||||
|
||||
@Throws(SOPGPException.BadData::class, IOException::class)
|
||||
fun baseCertificates(certs: ByteArray): Ready = baseCertificates(certs.inputStream())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue