Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #289 from JulioV/fix_ssl_bug
Browse files Browse the repository at this point in the history
Fix SSL certificate null exception
  • Loading branch information
JulioV authored Feb 20, 2020
2 parents 2e671da + cc444e2 commit f4c0ac0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions aware-core/src/main/java/com/aware/utils/SSLManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,10 @@ public static InputStream getHTTPS(Context context, String server) throws FileNo
File host_credentials = new File(root_folder.toString(), hostname);
if (host_credentials.exists()) {
File[] certs = host_credentials.listFiles();
for (File crt : certs) {
if (crt.getName().equals("server.crt")) return new FileInputStream(crt);
}
if(certs != null)
for (File crt : certs) {
if (crt.getName().equals("server.crt")) return new FileInputStream(crt);
}
}
return null;
}
Expand Down

0 comments on commit f4c0ac0

Please sign in to comment.