Package org.mockserver.socket.tls
Interface KeyAndCertificateFactory
-
- All Known Implementing Classes:
BCKeyAndCertificateFactory
public interface KeyAndCertificateFactory- Author:
- jamesdbloom
-
-
Field Summary
Fields Modifier and Type Field Description static StringCERTIFICATE_DOMAINdefault CN for leaf distinguishing namestatic StringCOUNTRYC for distinguishing namestatic AsymmetricKeyPairAlgorithmDEFAULT_KEY_GENERATION_AND_SIGNING_ALGORITHMdefault key pair generation and signing algorithmstatic StringLOCALITYL for distinguishing namestatic DateNOT_AFTERThe maximum possible value in X.509 specification: 9999-12-31 23:59:59, new Date(253402300799000L), but Apple iOS 8 fails with a certificate expiration date grater than Mon, 24 Jan 6084 02:07:59 GMT (issue #6).static DateNOT_BEFORECurrent time minus 1 year, just in case software clock goes back due to time synchronizationstatic StringORGANISATIONO for distinguishing namestatic StringROOT_COMMON_NAMECN for CA distinguishing namestatic StringSTATEST for distinguishing name
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbuildAndSaveCertificateAuthorityPrivateKeyAndX509Certificate()voidbuildAndSavePrivateKeyAndX509Certificate()X509CertificatecertificateAuthorityX509Certificate()List<X509Certificate>certificateChain()booleancertificateNotYetCreated()PrivateKeyprivateKey()X509Certificatex509Certificate()
-
-
-
Field Detail
-
DEFAULT_KEY_GENERATION_AND_SIGNING_ALGORITHM
static final AsymmetricKeyPairAlgorithm DEFAULT_KEY_GENERATION_AND_SIGNING_ALGORITHM
default key pair generation and signing algorithm
-
NOT_BEFORE
static final Date NOT_BEFORE
Current time minus 1 year, just in case software clock goes back due to time synchronization
-
NOT_AFTER
static final Date NOT_AFTER
The maximum possible value in X.509 specification: 9999-12-31 23:59:59, new Date(253402300799000L), but Apple iOS 8 fails with a certificate expiration date grater than Mon, 24 Jan 6084 02:07:59 GMT (issue #6).A hundred years in the future from starting the proxy should be enough.
-
ROOT_COMMON_NAME
static final String ROOT_COMMON_NAME
CN for CA distinguishing name- See Also:
- Constant Field Values
-
CERTIFICATE_DOMAIN
static final String CERTIFICATE_DOMAIN
default CN for leaf distinguishing name- See Also:
- Constant Field Values
-
ORGANISATION
static final String ORGANISATION
O for distinguishing name- See Also:
- Constant Field Values
-
LOCALITY
static final String LOCALITY
L for distinguishing name- See Also:
- Constant Field Values
-
STATE
static final String STATE
ST for distinguishing name- See Also:
- Constant Field Values
-
COUNTRY
static final String COUNTRY
C for distinguishing name- See Also:
- Constant Field Values
-
-
Method Detail
-
buildAndSaveCertificateAuthorityPrivateKeyAndX509Certificate
void buildAndSaveCertificateAuthorityPrivateKeyAndX509Certificate()
-
buildAndSavePrivateKeyAndX509Certificate
void buildAndSavePrivateKeyAndX509Certificate()
-
certificateNotYetCreated
boolean certificateNotYetCreated()
-
privateKey
PrivateKey privateKey()
-
x509Certificate
X509Certificate x509Certificate()
-
certificateAuthorityX509Certificate
X509Certificate certificateAuthorityX509Certificate()
-
certificateChain
List<X509Certificate> certificateChain()
-
-