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:
parent
cf37254b1c
commit
e93132c982
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user