Class CertificateCredentialsImpl.UploadedKeyStoreSource
java.lang.Object
hudson.model.AbstractDescribableImpl<CertificateCredentialsImpl.KeyStoreSource>
com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.KeyStoreSource
com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl.UploadedKeyStoreSource
- All Implemented Interfaces:
Describable<CertificateCredentialsImpl.KeyStoreSource>,Serializable
- Enclosing class:
- CertificateCredentialsImpl
public static class CertificateCredentialsImpl.UploadedKeyStoreSource
extends CertificateCredentialsImpl.KeyStoreSource
implements Serializable
Let the user reference an uploaded PKCS12 file.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionUploadedKeyStoreSource(SecretBytes uploadedKeystore) Deprecated.UploadedKeyStoreSource(String uploadedKeystore) Deprecated.UploadedKeyStoreSource(org.apache.commons.fileupload.FileItem uploadedCertFile, SecretBytes uploadedKeystore) Constructor able to receive file directly -
Method Summary
Modifier and TypeMethodDescriptionbyte[]longReturns aSystem.currentTimeMillis()comparable timestamp of when the content was last modified.Returns the private key file name.booleanReturnstrueif and only if the source is self contained.toKeyStore(char[] password) Returns an in memoryKeyStorecreated from the source.toString()Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
UploadedKeyStoreSource
Deprecated.Our constructor.- Parameters:
uploadedKeystore- the keystore content.
-
UploadedKeyStoreSource
Deprecated.Our constructor.- Parameters:
uploadedKeystore- the keystore content.
-
UploadedKeyStoreSource
@DataBoundConstructor public UploadedKeyStoreSource(org.apache.commons.fileupload.FileItem uploadedCertFile, @CheckForNull SecretBytes uploadedKeystore) Constructor able to receive file directly- Parameters:
uploadedCertFile- the keystore content from the file uploaduploadedKeystore- the keystore encrypted data, in case the file is not uploaded (e.g. update of the password / description)
-
-
Method Details
-
getUploadedKeystore
Returns the private key file name.- Returns:
- the private key file name.
-
getKeyStoreBytes
@NonNull public byte[] getKeyStoreBytes()- Overrides:
getKeyStoreBytesin classCertificateCredentialsImpl.KeyStoreSource- See Also:
-
getKeyStoreLastModified
public 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 classCertificateCredentialsImpl.KeyStoreSource- Returns:
- a
System.currentTimeMillis()comparable timestamp of when the content was last modified.
-
isSnapshotSource
public boolean isSnapshotSource()Returnstrueif and only if the source is self contained.- Overrides:
isSnapshotSourcein classCertificateCredentialsImpl.KeyStoreSource- Returns:
trueif and only if the source is self contained.
-
toKeyStore
public KeyStore toKeyStore(char[] password) throws NoSuchAlgorithmException, CertificateException, KeyStoreException, KeyStoreException, IOException Description copied from class:CertificateCredentialsImpl.KeyStoreSourceReturns an in memoryKeyStorecreated from the source.- Specified by:
toKeyStorein classCertificateCredentialsImpl.KeyStoreSource- Returns:
- The KeyStore content of the
KeyStore. - Throws:
IOException- if there was an IOException whilst creating the KeyStoreNoSuchAlgorithmExceptionCertificateExceptionKeyStoreExceptionKeyStoreException
-
toString
-