mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 14:54:15 +00:00
Don't throw just because the name of the CA cannot be determined.
This commit is contained in:
parent
295e8a154d
commit
249df81e5d
@ -412,7 +412,7 @@ public class PaymentSession {
|
||||
this.rootAuthorityName = getNameFromCert(rootAuthority);
|
||||
}
|
||||
|
||||
private String getNameFromCert(TrustAnchor rootAuthority) throws PaymentRequestException.PkiVerificationException {
|
||||
private @Nullable String getNameFromCert(TrustAnchor rootAuthority) throws PaymentRequestException.PkiVerificationException {
|
||||
org.spongycastle.asn1.x500.X500Name name = new X500Name(rootAuthority.getTrustedCert().getSubjectX500Principal().getName());
|
||||
String commonName = null, org = null, location = null, country = null;
|
||||
for (RDN rdn : name.getRDNs()) {
|
||||
@ -430,8 +430,6 @@ public class PaymentSession {
|
||||
if (org != null) {
|
||||
return Joiner.on(", ").skipNulls().join(org, location, country);
|
||||
} else {
|
||||
if (commonName == null)
|
||||
throw new PaymentRequestException.PkiVerificationException("Could not find any identity info for root CA");
|
||||
return commonName;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user