PEM to JWK using javascript

杀马特。学长 韩版系。学妹 提交于 2020-06-01 07:40:37

问题


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

  1. refer the crypto cert object from DataPower (example crypto cert object JWKCryptoCertObj)
  2. Decrypt the .pem from crypto cert object (example PEM JWKCryptoCertObj.pem)
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!