Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch null key (caused by wrong cert filename) before jdk catches it and throws an unhelpful exception instead #255

Open
alechenninger opened this issue Jan 18, 2016 · 3 comments

Comments

@alechenninger
Copy link
Contributor

Had this happen to me, putting this here so we have a better error msg in the future. If your cert's filename does not match its alias, you'll get a cryptic exception about a keystore not allowing non-private keys, when really it is because the key is null, which is because there was no key associated with the alias, which is because the alias was wrong, which is because the filename was wrong. Wowsa!

@alechenninger
Copy link
Contributor Author

This happens at line ~148 on SslSocketFactories

@jblashka
Copy link
Contributor

I would suggest having the cert alias be a configuration property instead of assuming the cert alias is the keystore file base name. We also just ran into this.

@derek63
Copy link
Member

derek63 commented Dec 7, 2016

The certAlias used to be separately configurable but it was removed in #20. We could always add it back...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants