Package com.browserup.bup.mitm
Class KeyStoreCertificateSource
- java.lang.Object
-
- com.browserup.bup.mitm.KeyStoreCertificateSource
-
- All Implemented Interfaces:
CertificateAndKeySource
public class KeyStoreCertificateSource extends java.lang.Object implements CertificateAndKeySource
ACertificateAndKeySourcethat loads the root certificate and private key from a Java KeyStore. The KeyStore must contain a certificate and a private key, specified by the privateKeyAlias value. The KeyStore must already be loaded and initialized; to load the KeyStore from a file or classpath resource, useKeyStoreFileCertificateSource,PemFileCertificateSource, or a custom implementation ofCertificateAndKeySource.
-
-
Constructor Summary
Constructors Constructor Description KeyStoreCertificateSource(java.security.KeyStore keyStore, java.lang.String privateKeyAlias, java.lang.String keyStorePassword)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CertificateAndKeyload()Loads a certificate and its corresponding private key.
-
-
-
Method Detail
-
load
public CertificateAndKey load()
Description copied from interface:CertificateAndKeySourceLoads a certificate and its corresponding private key. Every time this method is called, it should return the same certificate and private key (although it may be a differentCertificateAndKeyinstance).- Specified by:
loadin interfaceCertificateAndKeySource- Returns:
- certificate and its corresponding private key
-
-