证书模式签名报错
cffycls opened this issue · 7 comments
cffycls commented
// 计算签名
const sign = crypto.createSign(ALIPAY_ALGORITHM_MAPPING[config.signType])
.update(signStr, 'utf8').sign(config.privateKey, 'base64');
通过打断点和日志确定是 sign(config.privateKey, 'base64') 这步的问题,该怎么解决
opensslErrorStack: [
'error:04093004:rsa routines:old_rsa_priv_decode:RSA lib',
'error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error',
'error:0D06C03A:asn1 encoding routines:asn1_d2i_ex_primitive:nested asn1 error'
],
library: 'asn1 encoding routines',
function: 'asn1_check_tlen',
reason: 'wrong tag',
code: 'ERR_OSSL_ASN1_WRONG_TAG'
hhgz9527 commented
+1,我也遇到这个问题,请问你解决了吗?
hhgz9527 commented
发现是证书问题..重新上传了下,好了
cffycls commented
我修改了官方的代码,去掉依赖就好了
…---原始邮件---
发件人: "GaoYu"<notifications@github.com>
发送时间: 2020年12月3日(周四) 下午5:30
收件人: "alipay/alipay-sdk-nodejs-all"<alipay-sdk-nodejs-all@noreply.github.com>;
抄送: "cffycls"<cffycls@foxmail.com>;"Author"<author@noreply.github.com>;
主题: Re: [alipay/alipay-sdk-nodejs-all] 证书模式签名报错 (#80)
+1,我也遇到这个问题,请问你解决了吗?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
---原始邮件---
发件人: "GaoYu"<notifications@github.com>
发送时间: 2020年12月3日(周四) 下午5:30
收件人: "alipay/alipay-sdk-nodejs-all"<alipay-sdk-nodejs-all@noreply.github.com>;
抄送: "cffycls"<cffycls@foxmail.com>;"Author"<author@noreply.github.com>;
主题: Re: [alipay/alipay-sdk-nodejs-all] 证书模式签名报错 (#80)
+1,我也遇到这个问题,请问你解决了吗?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
leohuangyi commented
新版支付宝开发平台助手中,私钥要:转PKCS1(非JAVA适用)私钥 才行
jjj201200 commented
pandafeeeder commented
服气,这么重要的说明不写在文档里