Class As2ConnectionFactory

Namespace: redb.Route.As2
Assembly: redb.Route.As2.dll

Describes an AS2 trading partner: our key material, the partner's certificate, identifiers and the
agreed profile (algorithms, MDN mode). Registered by name in the route context registry and referenced
from a URI via connectionFactory=name — so certificates never live in the URI. This mirrors the
framework-wide ConnectionFactory pattern (RabbitMQ/Telegram/...).

public sealed class As2ConnectionFactory

Inheritance

Object→As2ConnectionFactory

Properties

AllowLegacyAlgorithms

Permits the legacy algorithms sha-1 (broken collision resistance) and 3des (a 64-bit block,

public bool AllowLegacyAlgorithms { get; set; }

As2From

Our AS2 identifier (AS2-From).

public string As2From { get; set; }

As2To

Partner AS2 identifier (AS2-To).

public string As2To { get; set; }

AsyncMdnAllowedHosts

Receive side: the hosts (DNS names or IP literals, compared case-insensitively) an asynchronous MDN may be

public IList<string> AsyncMdnAllowedHosts { get; set; }

AsyncMdnUrl

URL the partner posts asynchronous MDNs to (our receiver).

public string? AsyncMdnUrl { get; set; }

Compress

Compress the payload. Default false.

public bool Compress { get; set; }

Encrypt

Encrypt outgoing messages. Default true.

public bool Encrypt { get; set; }

EncryptAlg

Encryption algorithm. Default aes-128-cbc.

public string EncryptAlg { get; set; }

MdnMode

MDN mode. Default .

public As2MdnMode MdnMode { get; set; }

OurCertificate

Our certificate incl. private key — signs outgoing messages and decrypts incoming ones.

public X509Certificate2? OurCertificate { get; set; }

PartnerCertificate

Partner's public certificate — encrypts outgoing messages and verifies their signature.

public X509Certificate2? PartnerCertificate { get; set; }

PartnerUrl

Partner endpoint URL the producer POSTs to.

public string PartnerUrl { get; set; }

RequireValidMdn

When true, a send whose MDN is negative, has a MIC mismatch, or lacks a required valid signature throws

public bool RequireValidMdn { get; set; }

Sign

Sign outgoing messages. Default true.

public bool Sign { get; set; }

SignAlg

Signature digest algorithm. Default sha-256.

public string SignAlg { get; set; }

SignedMdn

Require/produce a signed MDN. Default true.

public bool SignedMdn { get; set; }

SslCertPassword

Password for .

public string? SslCertPassword { get; set; }

SslCertPath

PFX certificate our receive server presents to the partner over TLS. Distinct from

public string? SslCertPath { get; set; }

Methods

Validate(string)

Checks the agreement; throws naming name and what is

public void Validate(string name)