public final class TlsKeyGenerator extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CERTIFICATE_PRINCIPAL_DN |
static String |
KEY_ALGORITHM_AT |
static String |
PRIVATE_KEY_AT |
static String |
PRIVATE_KEY_FORMAT_AT |
static String |
PUBLIC_KEY_AT |
static String |
PUBLIC_KEY_FORMAT_AT |
static String |
TLS_KEY_INFO_OC |
static String |
USER_CERTIFICATE_AT |
static long |
YEAR_MILLIS |
Modifier and Type | Method and Description |
---|---|
static void |
addKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry)
Adds a private key pair along with a self signed certificate to an
entry making sure it contains the objectClasses and attributes needed
to support the additions.
|
static void |
addKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry,
String issuerDN,
String subjectDN,
Date startDate,
Date expiryDate,
String keyAlgo,
int keySize,
PrivateKey optionalSigningKey) |
static void |
addKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry,
String issuerDN,
String subjectDN,
String keyAlgo) |
static void |
addKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry,
String issuerDN,
String subjectDN,
String keyAlgo,
int keySize) |
static X509Certificate |
getCertificate(org.apache.directory.api.ldap.model.entry.Entry entry)
Gets the certificate associated with the self signed TLS private/public
key pair.
|
static KeyPair |
getKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry)
Extracts the public private key pair from the tlsKeyInfo entry.
|
public static final String TLS_KEY_INFO_OC
public static final String PRIVATE_KEY_AT
public static final String PUBLIC_KEY_AT
public static final String KEY_ALGORITHM_AT
public static final String PRIVATE_KEY_FORMAT_AT
public static final String PUBLIC_KEY_FORMAT_AT
public static final String USER_CERTIFICATE_AT
public static final String CERTIFICATE_PRINCIPAL_DN
public static final long YEAR_MILLIS
public static X509Certificate getCertificate(org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
entry
- the TLS key/cert entryorg.apache.directory.api.ldap.model.exception.LdapException
- if there are problems accessing or decodingpublic static KeyPair getKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
entry
- an entry of the tlsKeyInfo objectClassorg.apache.directory.api.ldap.model.exception.LdapException
- if there are format or access issuespublic static void addKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
entry
- the entry to add security attributes toorg.apache.directory.api.ldap.model.exception.LdapException
- on problems generating the content in the entrypublic static void addKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry, String issuerDN, String subjectDN, String keyAlgo) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
public static void addKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry, String issuerDN, String subjectDN, String keyAlgo, int keySize) throws org.apache.directory.api.ldap.model.exception.LdapException
entry
- The Entry to updateissuerDN
- The issuersubjectDN
- The subjectkeyAlgo
- The algorithmkeySize
- The key sizeorg.apache.directory.api.ldap.model.exception.LdapException
- If the addition failedaddKeyPair(org.apache.directory.api.ldap.model.entry.Entry)
public static void addKeyPair(org.apache.directory.api.ldap.model.entry.Entry entry, String issuerDN, String subjectDN, Date startDate, Date expiryDate, String keyAlgo, int keySize, PrivateKey optionalSigningKey) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.