Add application.EnableSamlC14n10

This commit is contained in:
Yang Luo
2023-10-20 22:37:23 +08:00
parent b68e291f37
commit 22b57fdd23
3 changed files with 18 additions and 2 deletions

View File

@ -324,6 +324,11 @@ func GetSamlResponse(application *Application, user *User, samlRequest string, h
}
ctx := dsig.NewDefaultSigningContext(randomKeyStore)
ctx.Hash = crypto.SHA1
if application.EnableSamlC14n10 {
ctx.Canonicalizer = dsig.MakeC14N10RecCanonicalizer()
}
//signedXML, err := ctx.SignEnvelopedLimix(samlResponse)
//if err != nil {
// return "", "", fmt.Errorf("err: %s", err.Error())