> +   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());

How do you know you'll have this available? Does Docker depend on the 
BouncyCastle driver? Do you rely on the ssh driver dependency for this?

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

Reply via email to