|
|
@@ -44,7 +44,7 @@ func (ka rsaKeyAgreement) processClientKeyExchange(config *Config, ckx *clientKe |
|
|
|
ciphertext = ckx.ciphertext[2:] |
|
|
|
} |
|
|
|
|
|
|
|
err = rsa.DecryptPKCS1v15SessionKey(config.rand(), config.Certificates[0].PrivateKey, ciphertext, preMasterSecret) |
|
|
|
err = rsa.DecryptPKCS1v15SessionKey(config.rand(), config.Certificates[0].PrivateKey.(*rsa.PrivateKey), ciphertext, preMasterSecret) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
@@ -147,7 +147,7 @@ Curve: |
|
|
|
copy(serverECDHParams[4:], ecdhePublic) |
|
|
|
|
|
|
|
md5sha1 := md5SHA1Hash(clientHello.random, hello.random, serverECDHParams) |
|
|
|
sig, err := rsa.SignPKCS1v15(config.rand(), config.Certificates[0].PrivateKey, crypto.MD5SHA1, md5sha1) |
|
|
|
sig, err := rsa.SignPKCS1v15(config.rand(), config.Certificates[0].PrivateKey.(*rsa.PrivateKey), crypto.MD5SHA1, md5sha1) |
|
|
|
if err != nil { |
|
|
|
return nil, errors.New("failed to sign ECDHE parameters: " + err.Error()) |
|
|
|
} |
|
|
|