No support for keystore aliases.
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.8k
- Forks
- 410
- PR merge metrics
- No merged PRs in 30d
Description
Keystores, which clj-http supports, may contain multiple entries. To determine which one is selected, keystore aliases are used. Failing to specify an alias for a keystore with multiple entries means that the first entry is used.
The code which fails to specify an alias is the ssl-context-for-keystore function in the clj-http.conn-mgr namespace.
(.loadKeyMaterial
ks (when keystore-pass
(.toCharArray keystore-pass)))
uses the loadKeyMaterial method with signature java.security.KeyStore keystore, char[] keyPassword, but for alias support, the method with signature java.security.KeyStore keystore, char[] keyPassword, PrivateKeyStrategy aliasStrategy is needed. The chooseAlias method can just return the alias name if it occurs in the map, and the alias-name can be passed as keystore-alias in the arguments to ssl-context-for-keystore.
This does not apply to truststores.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the clj-http.conn-mgr namespace at the ssl-context-for-keystore function and inspect the existing loadKeyMaterial call and its overloads. Implement alias selection through the keystore-alias argument, then verify that a matching alias is selected for keystores with multiple entries and that truststores remain unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, java
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100