1
0
mirror of https://github.com/golang/go synced 2024-11-25 07:17:56 -07:00

crypto/rsa: fix shadowing error.

Fixes bug 375.

R=rsc
https://golang.org/cl/165045
This commit is contained in:
Adam Langley 2009-12-03 19:33:23 -08:00
parent cf37254b1c
commit e93132c982

View File

@ -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 {