diff --git a/src/main/java/be/atbash/ee/security/octopus/keys/config/JwtSupportConfiguration.java b/src/main/java/be/atbash/ee/security/octopus/keys/config/JwtSupportConfiguration.java index d965a1a..17cf3a1 100644 --- a/src/main/java/be/atbash/ee/security/octopus/keys/config/JwtSupportConfiguration.java +++ b/src/main/java/be/atbash/ee/security/octopus/keys/config/JwtSupportConfiguration.java @@ -44,7 +44,7 @@ public class JwtSupportConfiguration extends AbstractConfiguration implements Mo /** * The return value can also be a directory where multiple files are located (and retrieved). * - * @return + * @return Location, file or directory where the keys are located. */ @ConfigEntry public String getKeysLocation() { diff --git a/src/main/java/be/atbash/ee/security/octopus/keys/reader/KeyReader.java b/src/main/java/be/atbash/ee/security/octopus/keys/reader/KeyReader.java index 76648fc..bf9add6 100755 --- a/src/main/java/be/atbash/ee/security/octopus/keys/reader/KeyReader.java +++ b/src/main/java/be/atbash/ee/security/octopus/keys/reader/KeyReader.java @@ -57,7 +57,6 @@ public List readKeyResource(String path, KeyResourcePasswordLookup pa if (keyResourceType == null) { throw new UnknownKeyResourceTypeException(path); } - // FIXME keyResourceType == null -> Exception. switch (keyResourceType) { case JWK: diff --git a/src/main/java/be/atbash/ee/security/octopus/keys/reader/KeyReaderKeyStore.java b/src/main/java/be/atbash/ee/security/octopus/keys/reader/KeyReaderKeyStore.java index 3263563..450a97d 100755 --- a/src/main/java/be/atbash/ee/security/octopus/keys/reader/KeyReaderKeyStore.java +++ b/src/main/java/be/atbash/ee/security/octopus/keys/reader/KeyReaderKeyStore.java @@ -43,7 +43,7 @@ public class KeyReaderKeyStore { public List readResource(String path, KeyResourcePasswordLookup passwordLookup) { List result = new ArrayList<>(); - KeyStore keyStore = null; + KeyStore keyStore; try { keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); } catch (KeyStoreException e) { diff --git a/src/main/java/be/atbash/ee/security/octopus/keys/writer/KeyWriter.java b/src/main/java/be/atbash/ee/security/octopus/keys/writer/KeyWriter.java index 9585f0d..581f83d 100644 --- a/src/main/java/be/atbash/ee/security/octopus/keys/writer/KeyWriter.java +++ b/src/main/java/be/atbash/ee/security/octopus/keys/writer/KeyWriter.java @@ -144,7 +144,7 @@ private void writeFile(String target, byte[] fileContent) throws IOException { outputStream.close(); } - public byte[] writeKeyResource(AtbashKey atbashKey, KeyResourceType keyResourceType, char[] keyPasssword, char[] filePassword) { + public byte[] writeKeyResource(AtbashKey atbashKey, KeyResourceType keyResourceType, char[] keyPassword, char[] filePassword) { checkDependencies(); byte[] result; try { @@ -152,19 +152,19 @@ public byte[] writeKeyResource(AtbashKey atbashKey, KeyResourceType keyResourceT case JWK: // FIXME support for encrypted JWK of Atbash (see JWKEncryptedCreator) - result = writeKeyAsJWK(atbashKey, keyPasssword); + result = writeKeyAsJWK(atbashKey, keyPassword); break; case JWKSET: result = writeKeyAsJWKSet(atbashKey, new JWKSet()); break; case PEM: - result = writeKeyAsPEM(atbashKey, keyPasssword); + result = writeKeyAsPEM(atbashKey, keyPassword); break; case KEYSTORE: KeyStore keyStore = KeyStore.getInstance("JKS"); keyStore.load(null, null); - result = writeKeyAsKeyStore(atbashKey, keyPasssword, filePassword, keyStore); + result = writeKeyAsKeyStore(atbashKey, keyPassword, filePassword, keyStore); break; default: throw new IllegalArgumentException(String.format("Unsupported value for KeyResourceType : %s", keyResourceType));