Class CertificateCredentialsImpl.UploadedKeyStoreSource.DescriptorImpl

All Implemented Interfaces:
Saveable, OnMaster
Enclosing class:
CertificateCredentialsImpl.UploadedKeyStoreSource

public static class CertificateCredentialsImpl.UploadedKeyStoreSource.DescriptorImpl extends CertificateCredentialsImpl.KeyStoreSourceDescriptor
  • Field Details

    • DEFAULT_VALUE

      public static final String DEFAULT_VALUE
  • Constructor Details

    • DescriptorImpl

      public DescriptorImpl()
  • Method Details

    • extension

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension public static CertificateCredentialsImpl.KeyStoreSourceDescriptor extension()
      Creates the extension if we are not in FIPS mode, do NOT call this directly!
    • toByteArray

      @NonNull public static byte[] toByteArray(@Nullable Secret secret)
      Decode the Base64 keystore wrapped in a Secret.
      Parameters:
      secret - the keystore as a secret.
      Returns:
      the keystore bytes.
      See Also:
    • toSecret

      @Deprecated @CheckForNull public static Secret toSecret(@Nullable byte[] contents)
      Encodes the keystore bytes into Base64 and wraps in a Secret
      Parameters:
      contents - the keystore bytes.
      Returns:
      the keystore as a secret.
      See Also:
    • getDisplayName

      @NonNull public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<CertificateCredentialsImpl.KeyStoreSource>
    • doCheckUploadedKeystore

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public FormValidation doCheckUploadedKeystore(@QueryParameter String value, @QueryParameter String uploadedCertFile, @QueryParameter String password)
      Checks the keystore content.
      Parameters:
      value - the keystore content.
      password - the password.
      Returns:
      the FormValidation results.
    • validateCertificateKeystore

      @NonNull protected static FormValidation validateCertificateKeystore(byte[] keystoreBytes, String password)
      Helper method that performs form validation on a KeyStore.
      Parameters:
      keystoreBytes - the byte[] content of the KeyStore.
      password - the password to use when loading the KeyStore and recovering the key from the KeyStore.
      Returns:
      the validation results.