From f32c8a55e7f509097d1f2b76e2eafe19eda33ee4 Mon Sep 17 00:00:00 2001 From: Rekby Date: Mon, 11 Apr 2016 07:03:21 +0300 Subject: [PATCH] typo --- acme/jws.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/acme/jws.go b/acme/jws.go index 8435d0cf..dbb32ccf 100644 --- a/acme/jws.go +++ b/acme/jws.go @@ -10,6 +10,7 @@ import ( "net/http" "gopkg.in/square/go-jose.v1" + "errors" ) type jws struct { @@ -100,6 +101,9 @@ func (j *jws) Nonce() (string, error) { if err != nil { return nonce, err } + if len(j.nonces) == 0 { + return "", errors.New("Can't get nonce") + } } nonce, j.nonces = j.nonces[len(j.nonces)-1], j.nonces[:len(j.nonces)-1]