Class CertificateCredentialsImpl.PEMEntryKeyStoreSource
java.lang.Object
hudson.model.AbstractDescribableImpl<CertificateCredentialsImpl.KeyStoreSource>
com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.KeyStoreSource
com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.PEMEntryKeyStoreSource
- All Implemented Interfaces:
- Describable<CertificateCredentialsImpl.KeyStoreSource>,- Serializable
- Enclosing class:
- CertificateCredentialsImpl
public static class CertificateCredentialsImpl.PEMEntryKeyStoreSource
extends CertificateCredentialsImpl.KeyStoreSource
implements Serializable
A user entered PEM encoded certificate chain and key.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic class
- 
Constructor SummaryConstructorsConstructorDescriptionPEMEntryKeyStoreSource(String certChain, String privateKey) Constructor able to receive file directly
- 
Method SummaryModifier and TypeMethodDescriptionReturns the PEM encoded certificate chain.longReturns aSystem.currentTimeMillis()comparable timestamp of when the content was last modified.Returns the PEM encoded private key.booleanReturnstrueif and only if the source is self contained.toKeyStore(char[] password) Returns an in memoryKeyStorecreated from the source.protected static KeyStoretoKeyStore(String pemEncodedCerts, String pemEncodedKey, char[] password) toString()Methods inherited from class com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.KeyStoreSourcegetKeyStoreBytesMethods inherited from class hudson.model.AbstractDescribableImplgetDescriptor
- 
Constructor Details- 
PEMEntryKeyStoreSourceConstructor able to receive file directly- Parameters:
- certChain- the PEM encoded certificate chain (possibly encrypted as a secret)
- privateKey- the PEM encoded and possibly encrypted key for the certificate (possibly encrypted as a secret)
 
 
- 
- 
Method Details- 
getCertChainReturns the PEM encoded certificate chain.
- 
getPrivateKeyReturns the PEM encoded private key.
- 
getKeyStoreLastModifiedpublic long getKeyStoreLastModified()Returns aSystem.currentTimeMillis()comparable timestamp of when the content was last modified. Used to track refreshing theCertificateCredentialsImpl.keyStorecache for sources that pull from an external source.- Specified by:
- getKeyStoreLastModifiedin class- CertificateCredentialsImpl.KeyStoreSource
- Returns:
- a System.currentTimeMillis()comparable timestamp of when the content was last modified.
 
- 
isSnapshotSourcepublic boolean isSnapshotSource()Returnstrueif and only if the source is self contained.- Overrides:
- isSnapshotSourcein class- CertificateCredentialsImpl.KeyStoreSource
- Returns:
- trueif and only if the source is self contained.
 
- 
toKeyStorepublic KeyStore toKeyStore(char[] password) throws NoSuchAlgorithmException, CertificateException, KeyStoreException, KeyStoreException, UnrecoverableKeyException, IOException Description copied from class:CertificateCredentialsImpl.KeyStoreSourceReturns an in memoryKeyStorecreated from the source.- Specified by:
- toKeyStorein class- CertificateCredentialsImpl.KeyStoreSource
- Returns:
- The KeyStore content of the KeyStore.
- Throws:
- IOException- if there was an IOException whilst creating the KeyStore
- NoSuchAlgorithmException
- CertificateException
- KeyStoreException
- KeyStoreException
- UnrecoverableKeyException
 
- 
toKeyStoreprotected static KeyStore toKeyStore(String pemEncodedCerts, String pemEncodedKey, char[] password) throws NoSuchAlgorithmException, CertificateException, KeyStoreException, KeyStoreException, UnrecoverableKeyException, IOException 
- 
toString
 
-