Skip to content

Commit

Permalink
Update wfe tests to handle signature checking
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongable committed Feb 6, 2021
1 parent aea6a50 commit db9ecd6
Show file tree
Hide file tree
Showing 3 changed files with 313 additions and 174 deletions.
13 changes: 0 additions & 13 deletions mocks/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ import (
"errors"
"fmt"
"io/ioutil"
"math/big"
"net"
"strings"
"testing"
"time"

"github.com/jmhodges/clock"
"github.com/letsencrypt/boulder/test"
jose "gopkg.in/square/go-jose.v2"

"github.com/letsencrypt/boulder/core"
Expand Down Expand Up @@ -302,16 +299,6 @@ func (sa *StorageAuthority) GetCertificate(_ context.Context, serial string) (co
DER: certBlock.Bytes,
Issued: sa.clk.Now().Add(-1 * time.Hour),
}, nil
} else if serial == "0000000000000000000000000000000000b3" {
certPEM, _ := ioutil.ReadFile("test/178.crt")
block, _ := pem.Decode(certPEM)
issuer, _ := x509.ParseCertificate(block.Bytes)
_, cert := test.ThrowAwayCertWithSerial(&testing.T{}, 1, big.NewInt(0xb3), issuer)
return core.Certificate{
RegistrationID: 1,
DER: cert.Raw,
Issued: sa.clk.Now(),
}, nil
} else if serial == "000000000000000000000000000000626164" {
return core.Certificate{}, errors.New("bad")
} else {
Expand Down
1 change: 0 additions & 1 deletion wfe2/wfe.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ func (wfe *WebFrontEndImpl) processRevocation(
return probs.ServerInternal(
"unable to verify provided certificate, empty issuerCertificates")
}

// Try to validate the signature on the provided cert using its corresponding
// issuer certificate.
issuerNameID := issuance.GetIssuerNameID(providedCert)
Expand Down

0 comments on commit db9ecd6

Please sign in to comment.