It is neither the public key itself, nor the CSR that was used to request the certificate that forms the signature input. According to RFC 5280 - Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) :
The signatureValue field contains the digital signature calculated by ASN.1 DER encodes tbsCertificate. ASN.1 DER encoding tbsCertificate is used as input for the signature function.
Syntax> (tbs = for signing):
TBSCertificate ::= SEQUENCE {
version [0] EXPLICIT Version DEFAULT v1,
serialNumber CertificateSerialNumber,
signature AlgorithmIdentifier,
issuer Name,
validity Validity,
subject Name,
subjectPublicKeyInfo SubjectPublicKeyInfo,
issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
-- If present, version MUST be v2 or v3
subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
-- If present, version MUST be v2 or v3
extensions [3] EXPLICIT Extensions OPTIONAL
-- If present, version MUST be v3
}
DER coding of this structure is the data by which the signature is calculated.
source
share