MCPcopy Create free account
hub / github.com/crewjam/saml / signSimpleSign

Function signSimpleSign

simplesign_binding.go:315–326  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

313// messageParam) and relayState with signingContext for the
314// HTTP-POST-SimpleSign binding. It returns the SigAlg and Signature values.
315func 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

Callers 3

SimpleSignBindingMethod · 0.85
simpleSignFormMethod · 0.85

Calls 3

simpleSignSignedContentFunction · 0.85
signDetachedFunction · 0.85
NewMethod · 0.65

Tested by 1