I am trying to implement Certificate Verify based on the RFC
https://datatracker.ietf.org/doc/html/rfc5246#section-7.4.8
it states specifically, that I need to concatenate all the handshake messages prior to this moment then it should be hashed and signed by private key.
I am looking at SSL communication in the packet capture and peforming
const crypto = require('crypto')
const fs = require('fs')
let clientKey = fs.readFileSync(`endpointKey.pem`)
let raw = 'hexdump of all handshake_messages prior to this point'
let rawBuffer = Buffer.from(raw.match(/.{2}/g).map(value => {return parseInt(value, 16)})))
console.log(crypto.sign('RSA-SHA256', rawBuffer, clientKey))
and the result is different from what was calculated on the endpoint device (I am using the same private and public keys as endpoint).
Please advise, appreciate the help in advance.