Skip to content

fix(v2): name SSL.com product codes on sync, accept requests with no CN, and log the plugin version - #53

Merged
spbsoluble merged 6 commits into
feat/v2-consolidatedfrom
fix/v2-sslcom-product-type-ids
Nov 18, 2026
Merged

spbsoluble merged 6 commits into
feat/v2-consolidatedfrom
fix/v2-sslcom-product-type-ids

Conversation

@spbsoluble

@spbsoluble spbsoluble commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Three changes:

  • Sync: certificates synced from accounts that issue through SSL.com now get a Command template.
  • Enrollment: V2 SSL/TLS requests with no CN (the names only in the SANs) are accepted instead of being rejected.
  • Logging: the plugin logs its version whenever the gateway initializes it.

Sync turns a CERTInext product code into a product name (for example DV SSL) by looking up the code's productTypeID in the account's catalog. SSL.com products (codes 1011-1020) use type IDs 47-56, which the plugin didn't know. Those certificates kept the raw code, and the gateway assigned them no template.

A V2 SSL/TLS request whose subject has no CN failed with "Cannot determine primary domain" before any call to CERTInext. The V2 spec requires certificate.domain but doesn't require a CN in the CSR, so the plugin now takes the domain from the SANs.

Features

  • feat(logging): Initialize logs CERTInext CA plugin version <InformationalVersion>. DcvSupport=<bool>, TargetFramework=<tfm>. The version is the one the build stamps, and the line is written before the config is validated, so it appears even when initialization fails.

Fixes

  • fix(sync): Map SSL.com product type IDs 47-56 to the plugin's product names. A new Constants.Products.SslComProductTypeIdsV2 table holds them, and sync's name lookup now reads it alongside the existing emSign table (ProductTypeIdsV2, types 13-22). Enrollment is unchanged: it still detects UCC products by product name through ProductTypeIdsV2.
  • fix(v2): When an SSL/TLS request has no CN, the order's domain is the first DNS SAN that isn't a wildcard, or else the first wildcard one (PrimaryDomainFromSans). It reads the same SAN source as additionalDomains: Command's SAN list, or the CSR's SANs when Command sends none.
    • SANs *.example.com alone: a wildcard order.
    • SANs *.example.com + example.com: example.com is the domain and the wildcard goes in additionalDomains, so the certificate gets both names.
    • The CSR is sent unchanged; CERTInext sets the issued certificate's CN to the domain.
    • A request with a CN is unchanged. Private PKI still requires a CN.

Chores

  • docs: configuration.md covers SSL.com codes in "Templates for synced certificates" and says that a code the account's catalog no longer lists is passed on unchanged. The DomainName row describes the SAN fallback.
  • CHANGELOG: entries under 2.0.0 for all three changes.

Testing

  • make test passes (unit tests): 1,422 tests in Release
  • make integration-test passes (requires ~/.env_certinext)
  • make coverage shows no coverage regression
  • Tested only docs/config — no runtime changes

Release builds of both variants (DcvSupport true and false) have 0 warnings.

New and updated tests:

  • CERTInext.Tests/SyncProductIdTests.cs:
    • ProductNameForTypeId_MapsPluginProductTypes: cases for each of the 10 SSL.com type IDs (47-56).
    • EveryAdvertisedProductHasATypeId_AndMapsBackToItself: every product name also has an SSL.com type ID that maps back to it.
    • V2Sync_SslComCatalog_NamesSslComProductCodes: a V2 sync against an SSL.com catalog names 1011, 1012, 1013 and 1020, keeps a Private PKI code unchanged, and reports ProductNames: Resolved=4, Unresolved=1.
  • CERTInext.Tests/V2NoCnEnrollmentTests.cs:
    • A wildcard-only SAN orders the wildcard.
    • Wildcard + apex orders the apex, with the wildcard in additionalDomains.
    • No DNS SAN still throws before any CA call.
    • Private PKI without a CN still throws.
    • PrimaryDomainFromSans cases.
  • CERTInext.Tests/PluginVersionLoggingTests.cs:
    • PluginVersion equals the assembly's informational version.
    • The version line is logged even when Initialize rejects the config.

…mplate

Accounts that issue through SSL.com list catalog codes 1011-1020 with
productTypeIDs 47-56. Sync named a code only through the emSign type IDs
(13-22), so SSL.com records kept the raw code and the gateway assigned no
template. SslComProductTypeIdsV2 maps the same product names to the SSL.com
types, and the sync name lookup reads both maps. Enrollment is unchanged.
…ework at Initialize

The plugin logged nothing that identifies the running build, and the gateway logs only
its own version, so a customer log couldn't say which release produced it. Initialize
now logs the assembly's informational version (as CI stamps it), whether the build
includes DCV support, and the target framework. The line is written before the
configuration is validated, so it is present even when Initialize throws.
…o CN

A V2 SSL/TLS request with an empty subject (names only in the SANs) failed with
"Cannot determine primary domain" before any CA call. The V2 spec requires
certificate.domain but not a CSR CN, and CERTInext issues an empty-subject CSR with
CN = certificate.domain. When there is no CN, the domain is now the first DNS SAN
that isn't a wildcard, else the first wildcard one, from the same SAN source as
additionalDomains. A plain name comes first so that *.example.com + example.com is a
UCC order and keeps both names. Private PKI still requires a CN.
…hout one; document the SAN fallback for DomainName
@spbsoluble spbsoluble changed the title fix(sync): name SSL.com product codes so synced certificates get a template fix(v2): name SSL.com product codes on sync, accept requests with no CN, and log the plugin version Nov 18, 2026
@spbsoluble
spbsoluble merged commit 78ceb69 into feat/v2-consolidated Nov 18, 2026
@spbsoluble
spbsoluble deleted the fix/v2-sslcom-product-type-ids branch November 18, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant