Skip to content

Commit 04894bf

Browse files
Update dated-out authType check for SSLSecurity (#249)
1 parent 47e7a33 commit 04894bf

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sdk-java/src/main/java/ly/count/sdk/java/internal/Transport.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,12 @@ public void checkServerTrusted(X509Certificate[] chain, String authType) throws
465465
throw new IllegalArgumentException("PublicKeyManager: X509Certificate is empty");
466466
}
467467

468-
if (!(null != authType && authType.contains("RSA"))) {
469-
throw new CertificateException("PublicKeyManager: AuthType is not RSA");
468+
if (authType == null) {
469+
throw new CertificateException("PublicKeyManager: AuthType is null");
470+
}
471+
472+
if (authType.isEmpty()) {
473+
throw new CertificateException("PublicKeyManager: AuthType is empty");
470474
}
471475

472476
// Perform standard SSL/TLS checks
@@ -496,4 +500,4 @@ public void checkServerTrusted(X509Certificate[] chain, String authType) throws
496500
public X509Certificate[] getAcceptedIssuers() {
497501
return new X509Certificate[0];
498502
}
499-
}
503+
}

0 commit comments

Comments
 (0)