com.groupbyinc.flux.common.settings.KeyStoreWrapper.class Maven / Gradle / Ivy
???? 4t 3com/groupbyinc/flux/common/settings/KeyStoreWrapper java/lang/Object 2com/groupbyinc/flux/common/settings/SecureSettings KeyStoreWrapper.java 9com/groupbyinc/flux/common/settings/KeyStoreWrapper$Entry Entry =com/groupbyinc/flux/common/settings/KeyStoreWrapper$EntryType EntryType java/util/Map$Entry
java/util/Map %java/security/KeyStore$SecretKeyEntry java/security/KeyStore SecretKeyEntry )java/security/KeyStore$PasswordProtection PasswordProtection 4com/groupbyinc/flux/common/settings/Setting$Property +com/groupbyinc/flux/common/settings/Setting Property *java/security/KeyStore$ProtectionParameter ProtectionParameter java/security/KeyStore$Entry " java/util/Base64$Decoder $ java/util/Base64 & Decoder ALLOWED_SETTING_NAME Ljava/util/regex/Pattern; SEED_SETTING -Lcom/groupbyinc/flux/common/settings/Setting; aLcom/groupbyinc/flux/common/settings/Setting;
SEED_CHARS [C KEYSTORE_FILENAME Ljava/lang/String; elasticsearch.keystore 2 FORMAT_VERSION I MIN_FORMAT_VERSION KDF_ALGO PBKDF2WithHmacSHA512 : KDF_ITERS ' CIPHER_KEY_BITS ? GCM_TAG_BITS CIPHER_ALGO AES B CIPHER_MODE GCM E CIPHER_PADDING NoPadding H
formatVersion hasPassword Z dataBytes [B entries 7Lcom/groupbyinc/flux/common/apache/lucene/util/SetOnce; ?Lcom/groupbyinc/flux/common/apache/lucene/util/SetOnce;>; closed $assertionsDisabled (IZ[B)V ()V T V
W 5com/groupbyinc/flux/common/apache/lucene/util/SetOnce Y
Z W O P \ J 5 ^ K L ` M N b this 5Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper; getFormatVersion ()I keystorePath *(Ljava/nio/file/Path;)Ljava/nio/file/Path; java/nio/file/Path j resolve ((Ljava/lang/String;)Ljava/nio/file/Path; l m k n configDir Ljava/nio/file/Path; create 7()Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper; T U
t java/util/HashMap v
w W set (Ljava/lang/Object;)V y z
Z { addBootstrapSeed 8(Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper;)V } ~
wrapper S L ? getSettingNames ()Ljava/util/Set; ? ?
? + , ? getKey ()Ljava/lang/String; ? ?
?
java/util/Set ? contains (Ljava/lang/Object;)Z ? ? ? ? java/lang/AssertionError ?
? W %com/groupbyinc/flux/common/Randomness ? createSecure ()Ljava/security/SecureRandom; ? ?
? ? java/security/SecureRandom ? / . / ? nextInt (I)I ? ?
? ? setString (Ljava/lang/String;[C)V ? ?
? java/util/Arrays ? fill ([CC)V ? ?
? ? i random Ljava/security/SecureRandom; passwordLength
characters load K(Ljava/nio/file/Path;)Lcom/groupbyinc/flux/common/settings/KeyStoreWrapper; java/io/IOException ? java/lang/Throwable ? h i
? java/nio/file/LinkOption ? java/nio/file/Files ? exists 2(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z ? ?
? ? @com/groupbyinc/flux/common/apache/lucene/store/SimpleFSDirectory ? (Ljava/nio/file/Path;)V T ?
? ? 8com/groupbyinc/flux/common/apache/lucene/store/IOContext ? READONCE :Lcom/groupbyinc/flux/common/apache/lucene/store/IOContext; ? ? ? ? openInput ?(Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/store/IOContext;)Lcom/groupbyinc/flux/common/apache/lucene/store/IndexInput; ? ?
? ? Icom/groupbyinc/flux/common/apache/lucene/store/BufferedChecksumIndexInput ? >(Lcom/groupbyinc/flux/common/apache/lucene/store/IndexInput;)V T ?
? ? 9com/groupbyinc/flux/common/apache/lucene/codecs/CodecUtil ? checkHeader Q(Lcom/groupbyinc/flux/common/apache/lucene/store/DataInput;Ljava/lang/String;II)I ? ?
? ? Acom/groupbyinc/flux/common/apache/lucene/store/ChecksumIndexInput ? readByte ()B ? ?
? ? 9com/groupbyinc/flux/common/apache/lucene/store/IndexInput ? java/lang/IllegalStateException ? java/lang/StringBuilder ?
? W hasPassword boolean is corrupt: ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? java/util/Locale ? ROOT Ljava/util/Locale; ? ? ? ? %02x ? java/lang/Byte ? valueOf (B)Ljava/lang/Byte; ? ?
? ? java/lang/String format K(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
toString ?
? (Ljava/lang/String;)V T
?
readString ?
?
PKCS12 equals ?
5Corrupted legacy keystore string encryption algorithm PBE 3Corrupted legacy keystore file encryption algorithm readMapOfStrings ()Ljava/util/Map;
? java/io/ByteArrayOutputStream
W java/io/DataOutputStream! (Ljava/io/OutputStream;)V T#
"$ size&