Skip to content

Commit

Permalink
Update dated-out authType check for SSLSecurity (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray authored Mar 11, 2024
1 parent 47e7a33 commit 04894bf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sdk-java/src/main/java/ly/count/sdk/java/internal/Transport.java
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,12 @@ public void checkServerTrusted(X509Certificate[] chain, String authType) throws
throw new IllegalArgumentException("PublicKeyManager: X509Certificate is empty");
}

if (!(null != authType && authType.contains("RSA"))) {
throw new CertificateException("PublicKeyManager: AuthType is not RSA");
if (authType == null) {
throw new CertificateException("PublicKeyManager: AuthType is null");
}

if (authType.isEmpty()) {
throw new CertificateException("PublicKeyManager: AuthType is empty");
}

// Perform standard SSL/TLS checks
Expand Down Expand Up @@ -496,4 +500,4 @@ public void checkServerTrusted(X509Certificate[] chain, String authType) throws
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
}
}

0 comments on commit 04894bf

Please sign in to comment.