mirror of
https://github.com/go-acme/lego.git
synced 2025-04-21 15:35:19 +02:00
Fix out of range
This commit is contained in:
parent
232fbbef08
commit
ec18c6e42f
@ -101,8 +101,10 @@ func (j *jws) Nonce() (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nonce, err
|
return nonce, err
|
||||||
}
|
}
|
||||||
|
if len(j.nonces) == 0 {
|
||||||
return "", errors.New("Can't get nonce")
|
return "", errors.New("Can't get nonce")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
nonce, j.nonces = j.nonces[len(j.nonces)-1], j.nonces[:len(j.nonces)-1]
|
nonce, j.nonces = j.nonces[len(j.nonces)-1], j.nonces[:len(j.nonces)-1]
|
||||||
return nonce, nil
|
return nonce, nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user