signSimpleSign signs message (the raw XML of a protocol message sent in messageParam) and relayState with signingContext for the HTTP-POST-SimpleSign binding. It returns the SigAlg and Signature values.
(signingContext *dsig.SigningContext, messageParam string, message []byte, relayState string)
| 313 | // messageParam) and relayState with signingContext for the |
| 314 | // HTTP-POST-SimpleSign binding. It returns the SigAlg and Signature values. |
| 315 | func signSimpleSign(signingContext *dsig.SigningContext, messageParam string, message []byte, relayState string) (sigAlg, signature string, err error) { |
| 316 | sigAlg = signingContext.GetSignatureMethodIdentifier() |
| 317 | if sigAlg == "" { |
| 318 | return "", "", errors.New("cannot determine the signature algorithm") |
| 319 | } |
| 320 | content := simpleSignSignedContent(messageParam, message, relayState, relayState != "", sigAlg) |
| 321 | signature, err = signDetached(signingContext, string(content)) |
| 322 | if err != nil { |
| 323 | return "", "", err |
| 324 | } |
| 325 | return sigAlg, signature, nil |
| 326 | } |
| 327 | |
| 328 | // simpleSignSigningContext returns the signing context the service provider |
| 329 | // uses for the HTTP-POST-SimpleSign binding, which requires signing, with |