Skip to content

Commit

Permalink
check signers
Browse files Browse the repository at this point in the history
  • Loading branch information
daveroga committed Sep 2, 2024
1 parent f414b42 commit 7c19068
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ RUN CGO_ENABLED=0 go build -o ./driver ./cmd/driver/main.go
# Build an driver image
FROM scratch

COPY ./resolvers.settings.yaml /app/resolvers.settings.yaml
COPY ./signers.settings.yaml /app/signers.settings.yaml
COPY ./*.settings.yaml /app/
COPY --from=base /build/driver /app/driver
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

Expand Down
6 changes: 6 additions & 0 deletions pkg/services/did.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,13 @@ func (d *DidDocumentServices) GetDidDocument(ctx context.Context, did string, op
)

if opts.Signature != "" {
if d.signers == nil {
return nil, errors.New("signers not initialized")
}
signer, err := d.signers.GetEIP712SignerByNetwork(string(b), string(n))
if err != nil {
return nil, fmt.Errorf("invalid signer: %v", err)
}
errResolution, err = expectedError(err)
if err != nil {
return errResolution, err
Expand Down

0 comments on commit 7c19068

Please sign in to comment.