Created
February 12, 2019 15:07
-
-
Save abhirockzz/ab48b37cb61f6edd106d5dc0db674822 to your computer and use it in GitHub Desktop.
This file contains 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
String privateKey = System.getenv().get("OCI_PRIVATE_KEY_FILE_NAME"); | |
Supplier<InputStream> privateKeySupplier = () -> { | |
InputStream is = null; | |
String ociPrivateKeyPath = "/function/" + privateKey; | |
System.err.println("Private key location - " + ociPrivateKeyPath); | |
try { | |
is = new FileInputStream(ociPrivateKeyPath); | |
} catch (FileNotFoundException ex) { | |
System.err.println("Problem accessing OCI private key at " + ociPrivateKeyPath + " - " + ex.getMessage()); | |
} | |
return is; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment