In the x509 library, there is a function called CheckSignature
. I'm a bit lost as to what to pass into signed
. What is it supposed to be?
The function is
func (c *Certificate) CheckSignature(algo SignatureAlgorithm, signed, signature []byte) (err error)
https://golang.org/src/crypto/x509/x509.go?s=21660:21759#L623
Another thing I want to double is that if I signed something with the private key associated with the certificate, will that signature pass this CheckSignature
function?