Skip to content

Commit

Permalink
remove document nullifier endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
freigeistig committed Mar 8, 2024
1 parent 8fee128 commit 0d125a6
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 192 deletions.
13 changes: 0 additions & 13 deletions docs/spec/components/schemas/DocumentNullifier.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions docs/spec/components/schemas/DocumentNullifierKey.yaml

This file was deleted.

This file was deleted.

8 changes: 8 additions & 0 deletions internal/service/api/handlers/create_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ func validateSignedAttributes(signedAttributes, encapsulatedContent []byte, algo
return errors.Wrap(err, "failed to unmarshal ASN1 with params")
}

if len(signedAttributesASN1) < 2 {
return errors.New("signed attributes amount is less than 2")
}

digestAttr := resources.DigestAttribute{}
if _, err := asn1.Unmarshal(signedAttributesASN1[1].FullBytes, &digestAttr); err != nil {
return errors.Wrap(err, "failed to unmarshal ASN1")
Expand All @@ -296,6 +300,10 @@ func validateSignedAttributes(signedAttributes, encapsulatedContent []byte, algo
d = h.Sum(nil)
}

if len(digestAttr.Digest) == 0 {
return errors.New("signed attributes digest values amount is 0")
}

if !bytes.Equal(digestAttr.Digest[0].Bytes, d) {
return errors.New("digest signed attribute is not equal to encapsulated content hash")
}
Expand Down
64 changes: 0 additions & 64 deletions internal/service/api/handlers/get_document_nullifier.go

This file was deleted.

29 changes: 0 additions & 29 deletions internal/service/api/requests/get_document_nullifier.go

This file was deleted.

31 changes: 0 additions & 31 deletions resources/model_document_nullifier.go

This file was deleted.

9 changes: 0 additions & 9 deletions resources/model_document_nullifier_attributes.go

This file was deleted.

1 change: 0 additions & 1 deletion resources/model_resource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ type ResourceType string
// List of ResourceType
const (
CLAIMS ResourceType = "claims"
NULLIFIERS ResourceType = "nullifiers"
GIST_DATAS ResourceType = "gist_datas"
)

0 comments on commit 0d125a6

Please sign in to comment.