> +   private static X509Certificate getCertificate(String certificate) {
> +      try {
> +         return (X509Certificate) 
> CertificateFactory.getInstance("X.509").generateCertificate(
> +                 new 
> ByteArrayInputStream(certificate.getBytes(Charsets.UTF_8)));
> +      } catch (CertificateException ex) {
> +         throw new RuntimeException("Invalid certificate", ex);
> +      }
> +   }
> +
> +   private static PrivateKey getKey(String privateKey, String... password) {
> +
> +      try {
> +         PEMParser pemParser = new PEMParser(new StringReader(privateKey));
> +         Object object = pemParser.readObject();
> +         if (Security.getProvider("BC") == null) {
> +            Security.addProvider(new BouncyCastleProvider());

I think 
```
<groupId>org.apache.jclouds.driver</groupId>
<artifactId>jclouds-sshj</artifactId>
```
is giving us the bouncy-caste provider in the classpath

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/113/files#r21886316

Reply via email to