Home  >  Q&A  >  body text

ios - 支付宝支付集成,上传RSA公钥一直显示格式错误

在“合作伙伴密钥管理”那一块上传公钥,我已经按照文档里面说的,用openssl生成了公钥和私钥,然后将公钥的”-----BEGIN PUBLIC KEY-----”、“-----END PUBLIC KEY-----”、空格、换行都去掉了,可是上传的时候一直提示我“格式错误,请输入正确的RSA公钥”,换了很多个浏览器都不行,而且我试了一下文档给的公钥示例,也是格式错误。。。这是怎么回事啊?急求

PHP中文网PHP中文网2766 days ago438

reply all(7)I'll reply

  • 阿神

    阿神2017-04-17 17:20:01

    I encountered the same problem with Alipay, and there is a solution: https://openhome.alipay.com/platform/keyManage.htm?keyType=partner

    reply
    0
  • PHPz

    PHPz2017-04-17 17:20:01

    To convert to pcks format, one of the steps will be printed on the screen. Copy that and upload it

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 17:20:01

    Generate RSA private key
    openssl>genrsa -out rsa_private_key.pem 1024
    Generate RSA public key
    openssl>rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem
    Upload rsa_public_key.pem
    https://cshall.alipay .com/enterprise/help_detail.htm?help_id=473890

    reply
    0
  • 阿神

    阿神2017-04-17 17:20:01

    Did the original poster solve the problem?

    reply
    0
  • PHPz

    PHPz2017-04-17 17:20:01

    1 There is a problem with the uploaded module itself. Please ask the relevant Alipay staff to modify it as soon as possible

    reply
    0
  • 阿神

    阿神2017-04-17 17:20:01

    It was the same at the time, and it still succeeded occasionally. Later I found out that it was because after a short period of time after entering the password, when I tried to upload the key, it would say an error. Refresh it, re-enter the login password, and then upload it and it would be ok

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 17:20:01

    It should take a while to refresh the web page and re-enter the Alipay password.

    reply
    0
  • Cancelreply