x509.checkIssued(otherCert)


通过比较证书元数据,检查此证书是否可能由给定的 otherCert 颁发。

¥Checks whether this certificate was potentially issued by the given otherCert by comparing the certificate metadata.

这对于精简使用更基本的过滤程序(即仅基于主题和颁发者名称)选择的可能的颁发者证书列表非常有用。

¥This is useful for pruning a list of possible issuer certificates which have been selected using a more rudimentary filtering routine, i.e. just based on subject and issuer names.

最后,要验证此证书的签名是否由与 otherCert 的公钥对应的私钥生成,请使用 x509.verify(publicKey)otherCert 的公钥(表示为 KeyObject),如下所示。

¥Finally, to verify that this certificate's signature was produced by a private key corresponding to otherCert's public key use x509.verify(publicKey) with otherCert's public key represented as a KeyObject like so

if (!x509.verify(otherCert.publicKey)) {
  throw new Error('otherCert did not issue x509');
}