mirror of
https://gitee.com/yansongda/pay.git
synced 2024-11-29 18:58:38 +08:00
完善证书解析错误提示
This commit is contained in:
parent
4cb2661658
commit
b5d93d8219
@ -125,7 +125,13 @@ class PreparePlugin implements PluginInterface
|
||||
continue;
|
||||
}
|
||||
|
||||
$detail = $this->formatCert(openssl_x509_parse($cert.'-----END CERTIFICATE-----'));
|
||||
$ssl = openssl_x509_parse($cert . '-----END CERTIFICATE-----');
|
||||
|
||||
if (false === $ssl) {
|
||||
throw new InvalidConfigException(InvalidConfigException::ALIPAY_CONFIG_ERROR, 'Invalid alipay_root_cert');
|
||||
}
|
||||
|
||||
$detail = $this->formatCert($ssl);
|
||||
|
||||
if ('sha1WithRSAEncryption' == $detail['signatureTypeLN'] || 'sha256WithRSAEncryption' == $detail['signatureTypeLN']) {
|
||||
$sn .= $this->getCertSn($detail['issuer'], $detail['serialNumber']).'_';
|
||||
|
Loading…
Reference in New Issue
Block a user