Open magnus-puresalmon opened 1 week ago
Thanks for filing this. It's interesting that a "miss" on the alias works like a Map
key miss, just returning null
. There are exceptions thrown by other sorts of getKey
failures but this does not rise to that bar for Java.
In any case, easy enough to trap and throw a meaningful exception. This is IGN-10929
in our internal tracker.
Currently, if using a pfx keystore and specifying the wrong certificate alias, the keystore returns null for
which then throws
null cannot be cast to non-null type java.security.PrivateKey
from line 360 in the SignModule.kt file, rather than informing the user that the requested alias was not found.