Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Sep 12, 2024
1 parent 4e565ec commit 5aa15e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 3 additions & 7 deletions revocation/result/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type ServerResult struct {
Error error

// RevocationMethod is the method used to check the revocation status of the
// certificate, including Unknonw(0), MethodOCSP(1), MethodCRL(2)
// certificate, including Unknown(0), MethodOCSP(1), MethodCRL(2)
RevocationMethod int
}

Expand All @@ -91,11 +91,7 @@ func NewServerResult(result Result, server string, err error) *ServerResult {
// chain as well as the results from individual servers associated with this
// certificate
type CertRevocationResult struct {
// Result of revocation for a specific cert in the chain
//
// If there are multiple ServerResults, this is because no responses were
// able to be retrieved, leaving each ServerResult with a Result of Unknown.
// Thus, in the case of more than one ServerResult, this will be ResultUnknown
// Result of revocation for a specific certificate in the chain.
Result Result

// ServerResults is an array of results for each server associated with the
Expand All @@ -119,7 +115,7 @@ type CertRevocationResult struct {
ServerResults []*ServerResult

// RevocationMethod is the method used to check the revocation status of the
// certificate, including Unknonw(0), MethodOCSP(1), MethodCRL(2) and
// certificate, including Unknown(0), MethodOCSP(1), MethodCRL(2) and
// OCSPFallbackCRL(3)
RevocationMethod int
}
8 changes: 6 additions & 2 deletions revocation/revocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ func (r *revocation) ValidateContext(ctx context.Context, validateContextOpts Va
certResults[i] = &result.CertRevocationResult{
Result: result.ResultNonRevokable,
ServerResults: []*result.ServerResult{{
Result: result.ResultNonRevokable,
Result: result.ResultNonRevokable,
RevocationMethod: MethodUnknown,
}},
RevocationMethod: MethodUnknown,
}
}
}
Expand All @@ -239,8 +241,10 @@ func (r *revocation) ValidateContext(ctx context.Context, validateContextOpts Va
certResults[len(certChain)-1] = &result.CertRevocationResult{
Result: result.ResultNonRevokable,
ServerResults: []*result.ServerResult{{
Result: result.ResultNonRevokable,
Result: result.ResultNonRevokable,
RevocationMethod: MethodUnknown,
}},
RevocationMethod: MethodUnknown,
}
wg.Wait()

Expand Down

0 comments on commit 5aa15e0

Please sign in to comment.