Closed zhixiongdu027 closed 6 years ago
PEM is just a base-64 encoded version of DER (with header/footer).
For now, if you want a DER string, you could use :toPEM()
and then decode the base64.
It seems like a reasonable feature request to add a :toDER()
though.
Why close the issue? It's a reasonable feature request.
Sorry, I did an inappropriate operation
Btw, this seems related to #122:
Some objects have :tostring("PEM")
and :tostring("DER")
as well as a :toPEM(options)
However my solution over there was to add :toPEM()
for all objects.
I can get an "PEM" format pkey by use pkey:toPEM() . but when I want "DER" fromat string , there is no pkey:toDER() api.
someone can help ,thanks very mutch .