Relyra.Testing.Signer (relyra v1.9.0)

Copy Markdown View Source

Builds signed test responses for Relyra.Testing.

This module is production-compiled so Hex adopters can use the public testing fixture helpers from their own test suites. It creates a fresh RSA key for each signed test response, returns the matching test certificate, and canonicalizes through Relyra's real verifier path (SaxyTree, PureBeam, and C14N). It is test-only fixture machinery, not an IdP, broker, or production trust source.

Summary

Types

A signed test response and the matching test certificate chain.

Functions

Builds a signed test response with real digest and signature values.

Rewrites the signed assertion NameID after signing and raises if no mutation landed.

Types

signed_response()

@type signed_response() :: %{response_xml: binary(), cert_chain: [binary()]}

A signed test response and the matching test certificate chain.

Functions

signed_response(opts \\ [])

@spec signed_response(keyword()) :: signed_response()

Builds a signed test response with real digest and signature values.

The returned XML contains no KeyInfo; callers must thread the returned cert_chain into Relyra.consume_response/3 through explicit fixture data.

tamper_name_id!(response_xml, original_name_id, replacement_name_id)

@spec tamper_name_id!(binary(), binary(), binary()) :: binary()

Rewrites the signed assertion NameID after signing and raises if no mutation landed.