brainlag / JavaNSQClient

Fast Java client for NSQ
MIT License
90 stars 57 forks source link

change test resource client.key from pkcs#1 to pkcs#8 #18

Closed rukyzhc closed 8 years ago

rukyzhc commented 8 years ago

The original client.key is in pkcs#1 format and the unittest related to ssl will fail with Exception: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : algid parse error, not a sequence

I change the client.key from pkcs#1 to pkcs#8 and then all unittests pass successfully.

mv client.key client.key.pkcs1 && openssl pkcs8 -topk8 -inform PEM -outform PEM -in client.key.pkcs1 -out client.key -nocrypt && rm -f client.key.pkcs1

My runtime environment is "Darwin Kernel Version 14.5.0" and the openssl version is "OpenSSL 1.0.2d 9 Jul 2015"

rukyzhc commented 8 years ago

Please refer to http://stackoverflow.com/questions/6559272/algid-parse-error-not-a-sequence