cert-d-java/pgp-certificate-store/src/main/java/pgp/certificate_store/SubkeyLookup.java

35 lines
1.0 KiB
Java
Raw Normal View History

2022-03-01 15:19:01 +01:00
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package pgp.certificate_store;
import java.io.IOException;
import java.util.List;
import java.util.Set;
public interface SubkeyLookup {
/**
* Lookup the fingerprint of the certificate that contains the given subkey.
* If no record is found, return null.
*
* @param subkeyId subkey id
* @return fingerprint of the certificate
2022-04-29 16:31:49 +02:00
*
* @throws IOException in case of an IO error
2022-03-01 15:19:01 +01:00
*/
Set<String> getCertificateFingerprintsForSubkeyId(long subkeyId) throws IOException;
/**
* Record, which certificate the subkey-ids in the list belong to.
* This method does not change the affiliation of subkey-ids not contained in the provided list.
*
* @param certificate certificate fingerprint
* @param subkeyIds subkey ids
2022-04-29 16:31:49 +02:00
*
2022-03-01 15:19:01 +01:00
* @throws IOException in case of an IO error
*/
void storeCertificateSubkeyIds(String certificate, List<Long> subkeyIds) throws IOException;
}