diff --git a/acme/jws.go b/acme/jws.go index 8435d0cf..e000bc64 100644 --- a/acme/jws.go +++ b/acme/jws.go @@ -101,7 +101,9 @@ func (j *jws) Nonce() (string, error) { return nonce, err } } - + if len(j.nonces) == 0 { + return "", fmt.Errorf("Can't get nonce") + } nonce, j.nonces = j.nonces[len(j.nonces)-1], j.nonces[:len(j.nonces)-1] return nonce, nil }