Throw BadDataException when reading certificate

This commit is contained in:
Paul Schaub 2022-07-04 19:40:26 +02:00
parent 0846528072
commit 1b63a4ac9a
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 6 additions and 3 deletions

View file

@ -4,6 +4,8 @@
package pgp.certificate_store;
import pgp.certificate_store.exception.BadDataException;
import java.io.IOException;
import java.io.InputStream;
@ -20,7 +22,8 @@ public interface CertificateReaderBackend {
* @return certificate object
*
* @throws IOException in case of an IO error
* @throws BadDataException in case that the input stream does not contain OpenPGP certificate data
*/
Certificate readCertificate(InputStream inputStream) throws IOException;
Certificate readCertificate(InputStream inputStream) throws IOException, BadDataException;
}