netty5/handler
Norman Maurer 5ff6b57940
PemPrivateKey.toPem(...) should throw IllegalArgumentException when P… (#8253)
* PemPrivateKey.toPem(...) should throw IllegalArgumentException when PrivateKey which does not support encoding is used.

Motivation:

At the moment when a PrivateKey is used that does not support encoding we throw a NPE when trying to convert the key. We should better throw an IllegalArgumentException with the details about what key we tried to encode.

Modifications:

- Check if PrivateKey.getEncoded() returns null and if so throw an IllegalArgumentException
- Add unit test.

Result:

Better handling of non-supported PrivateKey implementations.
2018-09-05 20:33:40 +02:00
..
src PemPrivateKey.toPem(...) should throw IllegalArgumentException when P… (#8253) 2018-09-05 20:33:40 +02:00
pom.xml [maven-release-plugin] prepare for next development iteration 2018-08-24 06:36:33 +00:00