Package com.fathomdb.crypto

Examples of com.fathomdb.crypto.SimpleCertificateAndKey


    // return "project-" + getProjectId().getKey();
    //
    // KeyPair keyPair = projectContext.getSshKey().getKeyPair();
    // X500Principal subject = getX500Principal();

    return new SimpleCertificateAndKey(chain, keyPair.getPrivate());
  }
View Full Code Here


      privateKey = PrivateKeys.fromPem(keyPath);
    } catch (IOException e) {
      throw new IllegalArgumentException("Error reading private key: " + keyPath, e);
    }

    certificateAndKey = new SimpleCertificateAndKey(certificate, privateKey);

    return certificateAndKey;
  }
View Full Code Here

      }

      X509Certificate[] certificateChain = new X509Certificate[1];
      certificateChain[0] = project.getPkiCertificate();

      CertificateAndKey certificateAndKey = new SimpleCertificateAndKey(certificateChain,
          project.getPkiPrivateKey());

      return certificateAndKey;
    } catch (SQLException e) {
      throw new RepositoryException("Error retrieving PKI info", e);
View Full Code Here

        privateKey = PrivateKeys.fromPem(keyPath);
      } catch (IOException e) {
        throw new IllegalArgumentException("Error reading private key: " + keyPath, e);
      }

      certificateAndKey = new SimpleCertificateAndKey(certificate, privateKey);
    } else {
      String password = DEFAULT_PASSWORD;

      // TODO: Cache??
View Full Code Here

        List<X509Certificate> certificateChain = Certificates.fromPem(certificate);

        String keypairEncoded = getSecret(found, "privatekey");
        KeyPair keypair = KeyPairs.fromPem(keypairEncoded);

        CertificateAndKey certificateAndKey = new SimpleCertificateAndKey(certificateChain, keypair.getPrivate());
        encryptionStore.setCertificateAndKey(alias, certificateAndKey);

        return null;
    }
View Full Code Here

                issuerPrivateKey);

        X509Certificate[] certificateChain = new X509Certificate[1];
        certificateChain[0] = certificate;

        return new SimpleCertificateAndKey(certificateChain, keypair.getPrivate());
    }
View Full Code Here

TOP

Related Classes of com.fathomdb.crypto.SimpleCertificateAndKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.