Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
wistefan committed Jan 10, 2025
1 parent 9ade7a0 commit 7d913f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jades/jades_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ func (v *ExternalJAdESValidator) ValidateSignature(signature string) (success bo
SignedDocument: SignedDocument{Bytes: signature, Name: DOCUMENT_NAME},
TokenExtractionStrategy: TOKEN_EXTRACTION_STRATEGY,
}

logging.Log().Warnf("The signature %s", signature)
requestBody, err := json.Marshal(validationRequest)
if err != nil {
logging.Log().Warnf("Was not able to marshal the validation request. Error: %v", err)
return success, err
}

logging.Log().Warnf("The body %s", string(requestBody))
validationHttpRequest, err := http.NewRequest("POST", v.ValidationAddress, bytes.NewBuffer(requestBody))
if err != nil {
logging.Log().Warnf("Was not able to create validation request. Err: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion verifier/elsi_proof_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (epc ElsiProofChecker) checkElsiProof(headers jose.Headers, expectedProofIs
encodedMessage, _ := decodeBase64BytesToString(msg)
encodedSignature := base64.RawURLEncoding.EncodeToString(signature)
originalJwt := encodedMessage + "." + encodedSignature
base64Jwt := base64.RawStdEncoding.EncodeToString([]byte(originalJwt))
base64Jwt := base64.RawURLEncoding.EncodeToString([]byte(originalJwt))
isValid, err := epc.jAdESValidator.ValidateSignature(base64Jwt)
if err != nil {
logging.Log().Warnf("Was not able to validate JAdES signature. Err: %v", err)
Expand Down

0 comments on commit 7d913f4

Please sign in to comment.