Unable to import Trust Authorities after upgrade to v26.7.8

Started by chandrayandeepak, October 31, 2026, 07:17:15 AM

Previous topic - Next topic
After upgrade to v26.7.8, unable to import Private CA in trust authorities, throwing error "Only a single private key is allowed (found 0 sections)". Same works fine in earlier versions.

How does the private key start and end with? The "----" parts I mean.


Cheers,
Franco

Importing RootCA and Intermediate, not using Private key, just the certificate.

Please take note of:

https://github.com/opnsense/changelog/blob/16a1fae3e4c0e4a2faccccf100e8c4045caec966/community/26.7/26.7.8#L18-L22

If it's just public certs please attach them here and describe exactly how you are trying to add them so we can reproduce as well.


Thanks,
Franco

They are Private authority certificates, already using in earlier versions of OPNsense CE. We follow:

System -> Trust -> Authorities -> Add -> Import an existing Certificate Authority and paste. Screenshots attached.

BTW, we were able to import leaf certificate successfully.

-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----




You have to import the root and the intermediate sepatately now.

one cert per import.
Hardware:
DEC740

I think I've hit the same issue. I'm trying to migrate from using os-acme-client to injecting certs from outside using the API. I can import a new leaf cert, but I cannot add any of the Let's Encrypt intermediate CAs. As a result, the web server serves only the leaf cert without any intermediates, and non-browser clients (e.g. curl) can't validate it.

Repro instructions from the UI:
1. Navigate to System: Trust: Authorities
2. Click Add
3. Choose "Import an existing Certificate Authority"
4. Enter a description, paste the single cert below into the Certificate data field, and leave the private key data blank
5. Click Save

This results in the error: "Only a single private key is allowed (found 0 sections)"

Needless to say, I don't have the key for this cert.

-----BEGIN CERTIFICATE-----
MIIEcDCCAligAwIBAgIQbI8dxyfHEX97r4U6yYD5zTANBgkqhkiG9w0BAQsFADBP
MQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFy
Y2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBYMTAeFw0yNjA1MTMwMDAwMDBa
Fw0zMjA5MDIyMzU5NTlaME8xCzAJBgNVBAYTAlVTMSkwJwYDVQQKEyBJbnRlcm5l
dCBTZWN1cml0eSBSZ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EJytXNTnHqaAcrNwZlV
pcJL1KBnMrMjP7eanvUwL3FYj3cF17jtboLt7gLoi4+2rWZFvn+w54jmd/FIuhhZ
cEaU/wvU6BUNMtcVquVGHp7itQeDth5j+XL3j4WJ2SABwzUl6OeYdgpIt/ITZa+p
TT0mQ/r5XyA4MEAiabn7XJjvCERlF2dcn2wqJw+CreTkkQ2R
-----END CERTIFICATE-----


Likely a regression in https://github.com/opnsense/core/commit/b64be86839271b108e0c140fb53349303ddb6d5c

@Monviech (Cedrik) : Yes, we tried single certificate at once, but unable to.

@ab : Your replication is exactly like ours. Without issuing PrivateCA in Trust, leaf aren't trusted.

Even after hacking around the private key check, I can find no way to import a full Let's Encrypt cert bundle with its intermediate CAs so that they get picked up by the web server. All the prior CA imports have the multiple certs in one entry, which is what is now explicitly blocked.

I've filed https://github.com/opnsense/core/issues/11130

Even not permitting one by one import.
BTW, there is no other certificate visible in Authorities!