mirror of
https://codeberg.org/PGPainless/cert-d-java.git
synced 2025-09-09 03:09:39 +02:00
Throw BadDataException when reading certificate
This commit is contained in:
parent
0846528072
commit
1b63a4ac9a
2 changed files with 6 additions and 3 deletions
|
@ -97,7 +97,7 @@ public class SharedPGPCertificateDirectoryImpl implements SharedPGPCertificateDi
|
|||
|
||||
@Override
|
||||
public Certificate getBySpecialName(String specialName)
|
||||
throws IOException, BadNameException {
|
||||
throws IOException, BadNameException, BadDataException {
|
||||
File certFile = resolver.getCertFileBySpecialName(specialName);
|
||||
if (!certFile.exists()) {
|
||||
return null;
|
||||
|
@ -122,7 +122,7 @@ public class SharedPGPCertificateDirectoryImpl implements SharedPGPCertificateDi
|
|||
|
||||
@Override
|
||||
public Certificate getBySpecialNameIfChanged(String specialName, String tag)
|
||||
throws IOException, BadNameException {
|
||||
throws IOException, BadNameException, BadDataException {
|
||||
Certificate certificate = getBySpecialName(specialName);
|
||||
if (certificate.getTag().equals(tag)) {
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue