Package org.mockserver.socket.tls
Interface KeyAndCertificateFactory
- All Known Implementing Classes:
BCKeyAndCertificateFactory
public interface KeyAndCertificateFactory
- Author:
- jamesdbloom
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdefault CN for leaf distinguishing namestatic final StringC for distinguishing namestatic final AsymmetricKeyPairAlgorithmdefault key pair generation and signing algorithmstatic final StringL for distinguishing namestatic final DateThe 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 final DateCurrent time minus 1 year, just in case software clock goes back due to time synchronizationstatic final StringO for distinguishing namestatic final StringCN for CA distinguishing namestatic final StringST for distinguishing name -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidboolean
-
Field Details
-
DEFAULT_KEY_GENERATION_AND_SIGNING_ALGORITHM
default key pair generation and signing algorithm -
NOT_BEFORE
Current time minus 1 year, just in case software clock goes back due to time synchronization -
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
CN for CA distinguishing name- See Also:
-
CERTIFICATE_DOMAIN
default CN for leaf distinguishing name- See Also:
-
ORGANISATION
O for distinguishing name- See Also:
-
LOCALITY
L for distinguishing name- See Also:
-
STATE
ST for distinguishing name- See Also:
-
COUNTRY
C for distinguishing name- See Also:
-
-
Method Details
-
buildAndSaveCertificateAuthorityPrivateKeyAndX509Certificate
void buildAndSaveCertificateAuthorityPrivateKeyAndX509Certificate() -
buildAndSavePrivateKeyAndX509Certificate
void buildAndSavePrivateKeyAndX509Certificate() -
certificateNotYetCreated
boolean certificateNotYetCreated() -
privateKey
PrivateKey privateKey() -
x509Certificate
X509Certificate x509Certificate() -
certificateAuthorityX509Certificate
X509Certificate certificateAuthorityX509Certificate() -
certificateChain
List<X509Certificate> certificateChain()
-