Created
August 17, 2010 20:45
-
-
Save lenards/531926 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... snippet | |
| /** | |
| * Generates the keystore file according to the in-memory specification for | |
| * this class. | |
| * | |
| * @throws RuntimeException if the keystore file can't be generated. | |
| */ | |
| public void generateKeystoreFile() | |
| { | |
| try | |
| { | |
| KeyStore keystore = KeyStore.getInstance(type); | |
| keystore.load(null); | |
| generateKeys(keystore); | |
| keystore.store(new FileOutputStream(path), password.toCharArray()); | |
| } | |
| catch(GeneralSecurityException e) | |
| { | |
| throw new RuntimeException(e); | |
| } | |
| catch(IOException e) | |
| { | |
| throw new RuntimeException(e); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment