Skip to content

Provide better error message if certAlias is wrong in SignModule #60

@magnus-puresalmon

Description

@magnus-puresalmon

Currently, if using a pfx keystore and specifying the wrong certificate alias, the keystore returns null for

val privateKey: PrivateKey = keyStore.getKey(
            certAlias,
            certPassword?.toCharArray()
        ) as PrivateKey

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions