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

Function defaultSignatureMethod

metadata.go:325–330  ·  view source on GitHub ↗

defaultSignatureMethod returns the signature method used when none is configured: SHA-256 with ECDSA for an ECDSA key, and with RSA otherwise. SHA-1 based methods are deprecated for XML signatures.

(publicKey crypto.PublicKey)

Source from the content-addressed store, hash-verified

323// configured: SHA-256 with ECDSA for an ECDSA key, and with RSA otherwise.
324// SHA-1 based methods are deprecated for XML signatures.
325func defaultSignatureMethod(publicKey crypto.PublicKey) string {
326 if _, ok := publicKey.(*ecdsa.PublicKey); ok {
327 return dsig.ECDSASHA256SignatureMethod
328 }
329 return dsig.RSASHA256SignatureMethod
330}
331
332// Organization represents the SAML Organization object.
333//

Callers 4

signingContextMethod · 0.85
soapSignatureMethod · 0.85
SignedMetadataMethod · 0.85
SignAttributeQueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected