summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/rsa/rsa.go
diff options
context:
space:
mode:
authorAdam Langley <agl@golang.org>2009-12-03 19:33:23 -0800
committerAdam Langley <agl@golang.org>2009-12-03 19:33:23 -0800
commitfccf7a9e759bef74f4600bd0899eb245d1e9ef50 (patch)
treedfafae7776ba8dd3c0d2f39829d420ef5c453679 /src/pkg/crypto/rsa/rsa.go
parent6f8da1fb7b6a85844fb0a5764788634b61f116ca (diff)
downloadgolang-fccf7a9e759bef74f4600bd0899eb245d1e9ef50.tar.gz
crypto/rsa: fix shadowing error.
Fixes bug 375. R=rsc http://codereview.appspot.com/165045
Diffstat (limited to 'src/pkg/crypto/rsa/rsa.go')
-rw-r--r--src/pkg/crypto/rsa/rsa.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/crypto/rsa/rsa.go b/src/pkg/crypto/rsa/rsa.go
index 0576bb6a7..e47b02060 100644
--- a/src/pkg/crypto/rsa/rsa.go
+++ b/src/pkg/crypto/rsa/rsa.go
@@ -159,12 +159,12 @@ func GenerateKey(rand io.Reader, bits int) (priv *PrivateKey, err os.Error) {
for {
p, err := randomSafePrime(rand, bits/2);
if err != nil {
- return
+ return nil, err
}
q, err := randomSafePrime(rand, bits/2);
if err != nil {
- return
+ return nil, err
}
if p.Cmp(q) == 0 {