/** * Create a builder for {@link KeyConfig} from this keystore builder. This allows you to enhance the config * with additional (explicit) fields. * * @return builder of {@link KeyConfig} */ public Builder toFullBuilder() { return updateBuilder(KeyConfig.fullBuilder()); }
/** * Get a builder filled from this builder to add additional information (such as public key from certificate etc.). * * @return builder for {@link KeyConfig} */ public Builder toFullBuilder() { return updateBuilder(KeyConfig.fullBuilder()); }
/** * Load key config from config. * * @param config config instance located at keys configuration (expects "keystore-path" child) * @return KeyConfig loaded from config * @throws PkiException when keys or certificates fail to load from keystore or when misconfigured */ public static KeyConfig create(Config config) throws PkiException { try { return fullBuilder().config(config).build(); } catch (ResourceException e) { throw new PkiException("Failed to load from config", e); } }
.ifPresent(keystoreBuilder::keyAlias); Optional<PrivateKey> result = KeyConfig.fullBuilder() .updateWith(pemBuilder) .updateWith(keystoreBuilder)
/** * Get a builder filled from this builder to add additional information (such as public key from certificate etc.). * * @return builder for {@link KeyConfig} */ public Builder toFullBuilder() { return updateBuilder(KeyConfig.fullBuilder()); }
/** * Create a builder for {@link KeyConfig} from this keystore builder. This allows you to enhance the config * with additional (explicit) fields. * * @return builder of {@link KeyConfig} */ public Builder toFullBuilder() { return updateBuilder(KeyConfig.fullBuilder()); }
/** * Load key config from config. * * @param config config instance located at keys configuration (expects "keystore-path" child) * @return KeyConfig loaded from config * @throws PkiException when keys or certificates fail to load from keystore or when misconfigured */ public static KeyConfig create(Config config) throws PkiException { try { return fullBuilder().config(config).build(); } catch (ResourceException e) { throw new PkiException("Failed to load from config", e); } }
.ifPresent(keystoreBuilder::keyAlias); Optional<PrivateKey> result = KeyConfig.fullBuilder() .updateWith(pemBuilder) .updateWith(keystoreBuilder)