Skip to content

Commit

Permalink
private key file management issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamid committed Apr 10, 2019
1 parent b296353 commit c17cbe7
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,22 @@ public class Utility {
private static PemObject pemObject;

public static String getPrivateKeyFileName(String identifier){
identifier = removePeriodFromIdentifier(identifier);
String PRIVATEKEY_FILE = identifier +"-priv-key.pem";
return PRIVATEKEY_FILE;
}

public static String getPublicKeyFileName(String identifier){
identifier = removePeriodFromIdentifier(identifier);
String PUBLICKEY_FILE = identifier +"-pub-key.pem";
return PUBLICKEY_FILE;
}

public static String removePeriodFromIdentifier(String identifier)
{
return identifier.replace(".","");
}

public static synchronized Utility getInstance() {
if (instance == null) {
instance = new Utility();
Expand Down

0 comments on commit c17cbe7

Please sign in to comment.