From 57cdb2edda8645526846ecdea84c76c3a962fe9e Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Mon, 24 Feb 2020 15:21:09 -0800 Subject: [PATCH 1/3] Orders don't have a "deactivated" status. Use "invalid" instead, and add comments linking to the spec. --- core/types.go | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/core/types.go b/core/types.go index 67634a9c..8f7e2979 100644 --- a/core/types.go +++ b/core/types.go @@ -53,22 +53,16 @@ func (o *Order) GetStatus() (string, error) { } } - // An order is invalid if **any** of its authzs are invalid - if authzStatuses[acme.StatusInvalid] > 0 { + // An order is invalid if **any** of its authzs are invalid, + // deactivated, or expired + // https://tools.ietf.org/html/rfc8555#page-32 + if authzStatuses[acme.StatusInvalid] > 0 || + authzStatuses[acme.StatusDeactivated] > 0 || + authzStatuses[acme.StatusExpired] > 0 { return acme.StatusInvalid, nil } - // An order is expired if **any** of its authzs are expired - if authzStatuses[acme.StatusExpired] > 0 { - return acme.StatusInvalid, nil - } - - // An order is deactivated if **any** of its authzs are deactivated - if authzStatuses[acme.StatusDeactivated] > 0 { - return acme.StatusDeactivated, nil - } - - // An order is pending if **any** of its authzs are pending + // Otherwise, an order is pending if **any** of its authzs are pending if authzStatuses[acme.StatusPending] > 0 { return acme.StatusPending, nil } From b95209ac6d0cfbeb6b1e50c92f9465a43404249d Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Thu, 14 Apr 2022 19:02:51 -0700 Subject: [PATCH 2/3] Update core/types.go Co-authored-by: Samantha --- core/types.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/types.go b/core/types.go index 8f7e2979..ed19f094 100644 --- a/core/types.go +++ b/core/types.go @@ -53,9 +53,8 @@ func (o *Order) GetStatus() (string, error) { } } - // An order is invalid if **any** of its authzs are invalid, - // deactivated, or expired - // https://tools.ietf.org/html/rfc8555#page-32 + // An order is invalid if ANY of its authzs are invalid, deactivated, or + // expired per: https://tools.ietf.org/html/rfc8555#page-32 if authzStatuses[acme.StatusInvalid] > 0 || authzStatuses[acme.StatusDeactivated] > 0 || authzStatuses[acme.StatusExpired] > 0 { From ae259904005385576efb0827fd8b2914affc3d7c Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Thu, 14 Apr 2022 19:03:01 -0700 Subject: [PATCH 3/3] Update core/types.go Co-authored-by: Samantha --- core/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types.go b/core/types.go index ed19f094..e91e679e 100644 --- a/core/types.go +++ b/core/types.go @@ -61,7 +61,7 @@ func (o *Order) GetStatus() (string, error) { return acme.StatusInvalid, nil } - // Otherwise, an order is pending if **any** of its authzs are pending + // Otherwise, an order is pending if ANY of its authzs are pending. if authzStatuses[acme.StatusPending] > 0 { return acme.StatusPending, nil }