The reason I had this was due to ```PEM_write_bio_PUBKEY()``` adding a trailing ```\n``` or ```\r```. I have removed it as requested as this can be accounted for in user land with ```pubKey.replace(/\n|\r/, '')``` easy enough.