Search in sources :

Example 1 with PrivateKeyReader

use of org.candlepin.pki.PrivateKeyReader in project candlepin by candlepin.

the class CertificateReaderTest method readkey.

@Test
public void readkey() throws Exception {
    Configuration config = new MapConfiguration(new HashMap<String, String>() {

        {
            put(ConfigProperties.CA_CERT, "target/test/resources/certs/test.crt");
            put(ConfigProperties.CA_CERT_UPSTREAM, "target/test/resources/certs/upstream");
            put(ConfigProperties.CA_KEY, "target/test/resources/keys/pkcs1-des-encrypted.pem");
            put(ConfigProperties.CA_KEY_PASSWORD, "password");
        }
    });
    new CertificateReader(config, new PrivateKeyReader());
}
Also used : MapConfiguration(org.candlepin.common.config.MapConfiguration) Configuration(org.candlepin.common.config.Configuration) MapConfiguration(org.candlepin.common.config.MapConfiguration) PrivateKeyReader(org.candlepin.pki.PrivateKeyReader) CertificateReader(org.candlepin.pki.CertificateReader) Test(org.junit.Test)

Aggregations

Configuration (org.candlepin.common.config.Configuration)1 MapConfiguration (org.candlepin.common.config.MapConfiguration)1 CertificateReader (org.candlepin.pki.CertificateReader)1 PrivateKeyReader (org.candlepin.pki.PrivateKeyReader)1 Test (org.junit.Test)1