- Timestamp:
- 2018-05-01T15:58:03+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r13647 r13693 402 402 public X509Certificate getX509Certificate(NativeCertAmend certAmend) 403 403 throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { 404 File f = new File("/usr/share/ca-certificates/mozilla", certAmend.getFilename()); 405 if (f.exists()) { 406 CertificateFactory fact = CertificateFactory.getInstance("X.509"); 407 try (InputStream is = Files.newInputStream(f.toPath())) { 408 return (X509Certificate) fact.generateCertificate(is); 404 for (String dir : new String[] {"/etc/ssl/certs", "/usr/share/ca-certificates/mozilla"}) { 405 File f = new File(dir, certAmend.getFilename()); 406 if (f.exists()) { 407 CertificateFactory fact = CertificateFactory.getInstance("X.509"); 408 try (InputStream is = Files.newInputStream(f.toPath())) { 409 return (X509Certificate) fact.generateCertificate(is); 410 } 409 411 } 410 412 }
Note: See TracChangeset
for help on using the changeset viewer.