AopCertEncrypt
class AopCertEncrypt
Methods
验证支付宝公钥证书是否可信
No description
No description
No description
验证证书链是否是信任证书库中证书签发的
将证书链按照完整的签发顺序进行排序,排序后证书链为:[issuerA, subjectA]-[issuerA, subjectB]-[issuerB, subjectC]-[issuerC, subjectD].
验证证书是否是自签发的
No description
向上构造证书链
向下构造证书链
Extract signature from der encoded cert.
Get signature algorithm oid from der encoded signature data.
Get signature hash from der encoded signature data.
Determine if one cert was used to sign another Note that more than one CA cert can give a positive result, some certs re-issue signing certs after having only changed the expiration dates.
Convert pem encoded certificate to DER encoding
Obtain der cert with issuer and signature sections stripped.
Details
at line 18
static bool
isTrusted(string $alipayCert, string $rootCert)
验证支付宝公钥证书是否可信
at line 31
static
verifySignature($alipayCert, $rootCert)
No description
at line 66
static
readPemCertChain($cert)
No description
at line 76
static
verifyCert($prev, $rootCerts)
No description
at line 105
static
verifyCertChain($alipayCerts, $rootCerts)
验证证书链是否是信任证书库中证书签发的
at line 140
static
sortByDn($certs)
将证书链按照完整的签发顺序进行排序,排序后证书链为:[issuerA, subjectA]-[issuerA, subjectB]-[issuerB, subjectC]-[issuerC, subjectD].
..
at line 177
static
isSelfSigned($cert)
验证证书是否是自签发的
at line 185
static
array2string($array)
No description
at line 202
static
addressingUp($subjectMap, $certChain, $current)
向上构造证书链
at line 222
static
addressingDown($issuerMap, $certChain, $current)
向下构造证书链
at line 243
static string
extractSignature(string $der = false)
Extract signature from der encoded cert.
Expects x509 der encoded certificate consisting of a section container containing 2 sections and a bitstream. The bitstream contains the original encrypted signature, encrypted by the public key of the issuing signer.
at line 302
static bool
getSignatureAlgorithmOid($der = null)
Get signature algorithm oid from der encoded signature data.
Expects decrypted signature data from a certificate in der format. This ASN1 data should contain the following structure: SEQUENCE SEQUENCE OID (signature algorithm) NULL OCTET STRING (signature hash)
at line 362
static bool
getSignatureHash($der = null)
Get signature hash from der encoded signature data.
Expects decrypted signature data from a certificate in der format. This ASN1 data should contain the following structure: SEQUENCE SEQUENCE OID (signature algorithm) NULL OCTET STRING (signature hash)
at line 411
static bool
isCertSigner($certPem = null, $caCertPem = null)
Determine if one cert was used to sign another Note that more than one CA cert can give a positive result, some certs re-issue signing certs after having only changed the expiration dates.
at line 506
static string
pemToDer($pem = null)
Convert pem encoded certificate to DER encoding
at line 524
static string
stripSignerAsn(string $der = null)
Obtain der cert with issuer and signature sections stripped.