Exemplo n.º 1
0
// CheckPrivateKey verifies that the private key agrees with the corresponding
// public key in the certificate
func (c *Ctx) CheckPrivateKey() error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	if int(C.SSL_CTX_check_private_key(c.ctx)) != 1 {
		return errorFromErrorQueue()
	}
	return nil
}
Exemplo n.º 2
0
func (self *Context) CheckPrivateKey() error {
	if int(C.SSL_CTX_check_private_key(self.Ctx)) != 1 {
		return errors.New(sslerr.SSLErrorMessage())
	}
	return nil
}