Skip to content

Commit

Permalink
Default curve to avoid breaking old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmaguire committed Dec 5, 2024
1 parent dd31b67 commit 5e0456d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dnapitest/dnapitest.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ func (s *Server) handlerEnroll(w http.ResponseWriter, r *http.Request) {
w.Write(res.response(req))
}

func (s *Server) SetCurve(curve message.NetworkCurve) {
s.curve = curve
}

func (s *Server) SetEdPubkey(edPubkeyPEM []byte) error {
// hard failure, return
edPubkey, rest, err := keys.UnmarshalEd25519HostPublicKey(edPubkeyPEM)
Expand Down Expand Up @@ -351,6 +355,7 @@ func NewServer(expectedUserAgent string) *Server {
errors: []error{},
expectedRequests: []requestResponse{},
expectedUserAgent: expectedUserAgent,
curve: message.NetworkCurve25519, // default for legacy tests
}
ts := httptest.NewServer(http.HandlerFunc(s.handler))
s.Server = ts
Expand Down

0 comments on commit 5e0456d

Please sign in to comment.