Bugfix: correct privkey serialization
Use privkey serialization to construct OpenSSL keys