Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Missing "critical" value in Basic Constraints for RootCA generated by pfSense

    General pfSense Questions
    3
    9
    1.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mmege
      last edited by

      Hi every one,

      I am using pfSense and its user-friendly web interface to generate and manage certificates.
      It appears that the CA certificates generated by the webapp does not contain the "critical" flag in its Basic Constraints part.

      I use these authorities to sign server certificates of my network inner services, and some of the client applications don't want to validate the cert chain due to this lack.

      Is it a deliberated choice or a bug in the script?

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        What error are you actually seeing when you try to import it?

        1 Reply Last reply Reply Quote 0
        • M
          mmege
          last edited by mmege

          For example, I have a web server using a certificate signed by one of my CAs stored on pfSense web app. On another host, where the CA certificate file is installed in the trust store, a client application written in Python says, as soon as it tries to establish a TLS socket :

          certificate verify failed: Basic Constraints of CA cert not marked critical (_ssl.c:1020)
          

          Finally, I was able to establish the connection by creating, aside from the pfSense web app, with openssl command, an intermediate CA certificate by adding the "critical" flag in basic constraints:

          $ openssl x509 -text -noout -in intermediateCA-SOL-PROD-OPE.crt
          
          ...
                  X509v3 extensions:
                      X509v3 Basic Constraints: critical
                          CA:TRUE, pathlen:0
          ...
          
          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Hmm, interesting. I see that too:

            Basic Constraints
            Certificate Authority:	Yes
            Max Path Length:	Unlimited
            Critical:	No
            

            However I've never seen an issue importing it. 🤔

            1 Reply Last reply Reply Quote 0
            • M
              mmege
              last edited by mmege

              Actually, It does not really imply the import. I encounter this issue with applications or libraries, when they try to establish a TLS connection and when, under the wood, openssl try to validate the certificate chain with one of its trust store. And the trusted CA certificate is lacking this flag (i.e. Basic Constraints contains CA: TRUEbut not the criticalas it should according to the RFC 5280

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Mmm, I see. Yes, I mean I've never seen an issue using the imported CA cert which implies it's not being verified or not correctly.

                johnpozJ 1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by stephenw10

                  https://redmine.pfsense.org/issues/15818

                  1 Reply Last reply Reply Quote 1
                  • M
                    mmege
                    last edited by

                    Thank you very much @stephenw10 ! :)

                    1 Reply Last reply Reply Quote 2
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @stephenw10
                      last edited by

                      @stephenw10 yeah I have installed the CA on multiple computers, both windows and linux. iphones and android tablet and never ran into a issue.

                      But yeah if should be tagged critical, should be an easy fix.

                      @mmege Glad you found a simple work around with creating intermediate with openssl

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.