diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-13 05:11:45 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-13 05:11:45 +0000 |
commit | 86240434eb153c149dbc3d77f4fedf9cffcbfc53 (patch) | |
tree | eb5eccc07097c5fcf940967f33ab84a7d47c96fe /libgo/go/crypto/tls | |
parent | 9599f526f8b241e01ca4d54b5bff9c2e6f6dd75a (diff) | |
download | ppe42-gcc-86240434eb153c149dbc3d77f4fedf9cffcbfc53.tar.gz ppe42-gcc-86240434eb153c149dbc3d77f4fedf9cffcbfc53.zip |
libgo: Update to weekly.2011-12-22.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/crypto/tls')
-rw-r--r-- | libgo/go/crypto/tls/common.go | 4 | ||||
-rw-r--r-- | libgo/go/crypto/tls/handshake_client.go | 2 | ||||
-rw-r--r-- | libgo/go/crypto/tls/key_agreement.go | 4 | ||||
-rw-r--r-- | libgo/go/crypto/tls/root_darwin.go | 2 | ||||
-rw-r--r-- | libgo/go/crypto/tls/root_stub.go | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/libgo/go/crypto/tls/common.go b/libgo/go/crypto/tls/common.go index f57d932a98f..a461ad951b0 100644 --- a/libgo/go/crypto/tls/common.go +++ b/libgo/go/crypto/tls/common.go @@ -5,8 +5,8 @@ package tls import ( + "crypto" "crypto/rand" - "crypto/rsa" "crypto/x509" "io" "strings" @@ -255,7 +255,7 @@ func (c *Config) BuildNameToCertificate() { // A Certificate is a chain of one or more certificates, leaf first. type Certificate struct { Certificate [][]byte - PrivateKey *rsa.PrivateKey + PrivateKey crypto.PrivateKey // supported types: *rsa.PrivateKey // OCSPStaple contains an optional OCSP response which will be served // to clients that request it. OCSPStaple []byte diff --git a/libgo/go/crypto/tls/handshake_client.go b/libgo/go/crypto/tls/handshake_client.go index e39e59cd5a1..73648002bd5 100644 --- a/libgo/go/crypto/tls/handshake_client.go +++ b/libgo/go/crypto/tls/handshake_client.go @@ -234,7 +234,7 @@ func (c *Conn) clientHandshake() error { digest := make([]byte, 0, 36) digest = finishedHash.serverMD5.Sum(digest) digest = finishedHash.serverSHA1.Sum(digest) - signed, err := rsa.SignPKCS1v15(c.config.rand(), c.config.Certificates[0].PrivateKey, crypto.MD5SHA1, digest) + signed, err := rsa.SignPKCS1v15(c.config.rand(), c.config.Certificates[0].PrivateKey.(*rsa.PrivateKey), crypto.MD5SHA1, digest) if err != nil { return c.sendAlert(alertInternalError) } diff --git a/libgo/go/crypto/tls/key_agreement.go b/libgo/go/crypto/tls/key_agreement.go index b531717d840..c3c16647853 100644 --- a/libgo/go/crypto/tls/key_agreement.go +++ b/libgo/go/crypto/tls/key_agreement.go @@ -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()) } diff --git a/libgo/go/crypto/tls/root_darwin.go b/libgo/go/crypto/tls/root_darwin.go index 15122416bd1..db1b18b3c07 100644 --- a/libgo/go/crypto/tls/root_darwin.go +++ b/libgo/go/crypto/tls/root_darwin.go @@ -8,7 +8,7 @@ package tls // Note: We disable -Werror here because the code in this file uses a deprecated API to stay // compatible with both Mac OS X 10.6 and 10.7. Using a deprecated function on Darwin generates // a warning. -#cgo CFLAGS: -Wno-error +#cgo CFLAGS: -Wno-error -Wno-deprecated-declarations #cgo LDFLAGS: -framework CoreFoundation -framework Security #include <CoreFoundation/CoreFoundation.h> #include <Security/Security.h> diff --git a/libgo/go/crypto/tls/root_stub.go b/libgo/go/crypto/tls/root_stub.go index 18dcb02043a..d00493a5736 100644 --- a/libgo/go/crypto/tls/root_stub.go +++ b/libgo/go/crypto/tls/root_stub.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build plan9 +// +build plan9 darwin/nocgo package tls |