问题
I am a newbie in API Connect and Java Script. I have a requirement where I need to convert the content of a .pem (which is in DataPower under local:///cert) to JWK in API connect.
Could anyone help me with the starting point on how to develop a javascript to
- refer the crypto cert object from DataPower (example crypto cert object JWKCryptoCertObj)
- Decrypt the .pem from crypto cert object (example PEM JWKCryptoCertObj.pem)
- Convert the content of the .pem to JWK (
jwk.readCertificate()
)
So far I have got to know that jwk.readCertificate()
can help me to convert a key object to a JWK. How can I combine all the requirements in a single javascript?
Thanks in advance!!
来源:https://stackoverflow.com/questions/62084352/pem-to-jwk-using-javascript