Changeset 5afa32a
- Timestamp:
- Apr 24, 2019 12:23:35 PM (23 months ago)
- Branches:
- master
- Children:
- baeaa65
- Parents:
- ca0f127
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
core/java/src/net/i2p/crypto/KeyStoreUtil.java
rca0f127 r5afa32a 12 12 import java.security.MessageDigest; 13 13 import java.security.PrivateKey; 14 import java.security.ProviderException; 14 15 import java.security.PublicKey; 15 16 import java.security.cert.Certificate; … … 1020 1021 char[] keypwchars = keyPW.toCharArray(); 1021 1022 return (PrivateKey) keyStore.getKey(alias, keypwchars); 1023 } catch (ProviderException pe) { 1024 // PE is unchecked 1025 throw new GeneralSecurityException(pe); 1022 1026 } finally { 1023 1027 if (fis != null) try { fis.close(); } catch (IOException ioe) {} … … 1050 1054 Certificate[] certs = keyStore.getCertificateChain(alias); 1051 1055 CertUtil.exportPrivateKey(pk, certs, out); 1056 } catch (ProviderException pe) { 1057 // PE is unchecked 1058 throw new GeneralSecurityException(pe); 1052 1059 } finally { 1053 1060 if (fis != null) try { fis.close(); } catch (IOException ioe) {} … … 1102 1109 keyStore.store(fos, pwchars); 1103 1110 return cert; 1111 } catch (ProviderException pe) { 1112 // PE is unchecked 1113 throw new GeneralSecurityException(pe); 1104 1114 } finally { 1105 1115 if (fis != null) try { fis.close(); } catch (IOException ioe) {} … … 1142 1152 keyStore.store(fos, pwchars); 1143 1153 return alias; 1154 } catch (ProviderException pe) { 1155 // PE is unchecked 1156 throw new GeneralSecurityException(pe); 1144 1157 } finally { 1145 1158 if (fos != null) try { fos.close(); } catch (IOException ioe) {} … … 1170 1183 fos = new SecureFileOutputStream(ks); 1171 1184 keyStore.store(fos, pwchars); 1185 } catch (ProviderException pe) { 1186 // PE is unchecked 1187 throw new GeneralSecurityException(pe); 1172 1188 } finally { 1173 1189 if (fos != null) try { fos.close(); } catch (IOException ioe) {}
Note: See TracChangeset
for help on using the changeset viewer.