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

    OpenSSL Library Error when Creating New Certificate

    Scheduled Pinned Locked Moved General pfSense Questions
    22 Posts 5 Posters 2.0k Views 5 Watching
    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.
    • N Offline
      nanobist
      last edited by

      Resulting in this error:
      2e33bcb4-6bb8-4d83-b0c7-072a5ac98754-image.png

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

        You didn't add the Country, State, City, Org data to the CA. The cert tries to use those by default and it's probably failing on that.

        1 Reply Last reply Reply Quote 0
        • N Offline
          nanobist
          last edited by

          If I add that information I get more errors:

              OpenSSL Library Error: error:2206D06C:X509 V3 routines:X509V3_parse_list:invalid null name
              OpenSSL Library Error: error:22097069:X509 V3 routines:do_ext_nconf:invalid extension string
              OpenSSL Library Error: error:22098080:X509 V3 routines:X509V3_EXT_nconf:error in extension
              OpenSSL Library Error: error:0909006C:PEM routines:get_name:no start line
              OpenSSL Library Error: error:2206D06C:X509 V3 routines:X509V3_parse_list:invalid null name
              OpenSSL Library Error: error:22097069:X509 V3 routines:do_ext_nconf:invalid extension string
              OpenSSL Library Error: error:22098080:X509 V3 routines:X509V3_EXT_nconf:error in extension
          
          johnpozJ 1 Reply Last reply Reply Quote 0
          • johnpozJ Online
            johnpoz LAYER 8 Global Moderator @nanobist
            last edited by johnpoz

            @nanobist ok just fired up my 2.6 vm, and duplicating your settings works just fine..

            ca.jpg

            Clearly something messed up.. Did you install any 3rd party package, packages from the package manager. Is this an upgrade from old pfsense, new clean install of 2.6?

            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 25.07 | Lab VMs 2.8, 25.07

            1 Reply Last reply Reply Quote 0
            • N Offline
              nanobist
              last edited by

              Thanks for checking. You think it is time for a reinstall? Maybe this will be my excuse to finally virtualize my pfsense box.

              johnpozJ 1 Reply Last reply Reply Quote 0
              • johnpozJ Online
                johnpoz LAYER 8 Global Moderator @nanobist
                last edited by

                @nanobist said in OpenSSL Library Error when Creating New Certificate:

                my excuse to finally virtualize my pfsense box.

                While I ran virtual for a very long time, and loved the ability to just easy rollback if anything went wrong - gave me piece of mind when playing with latest and greatest snaps of upcoming versions, etc.

                I prob wouldn't go back to running virtual - nice having hardware, allows me do other stuff with my vm host without having to worry about loosing internet..

                So it is for sure a + or - sort of thing running virtual as your main router/firewall. Now if I want to play I just run a vm as lab only, and not the actual router/firewall for my network.

                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 25.07 | Lab VMs 2.8, 25.07

                N 1 Reply Last reply Reply Quote 0
                • N Offline
                  nanobist @johnpoz
                  last edited by

                  I almost pulled the trigger on virtualizing it just now but I figure that is making things more complex than what I really need. To wrap this up I finished up the reinstall and restore and all is well now. I was able to create an internal CA and cert without issue. Thanks to both of you for the help.

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

                    @nanobist said in OpenSSL Library Error when Creating New Certificate:

                    but I figure that is making things more complex than what I really need.

                    Yeah it does add a bit of complexity - but again + and - to any sort of setup really. There are things I really like about a virtual router, but me personally prob wouldn't go back to that setup..

                    In a pinch I could run a virtual router - say my pfsense box went belly up, knock on wood I could always fire up the virtual router until my replacement hardware got here ;)

                    Maybe you want to fire up a "lab" if you will vm - then if need be a bit of changing some ports around on the switch and bam your in business again ;) That is my DR plan, again knock on wood ;)

                    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 25.07 | Lab VMs 2.8, 25.07

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      tabre
                      last edited by

                      I ran into this same problem and ended up in this thread. Having since solved the problem, I wanted to return to report my findings. I had to dig into the PHP source code for the PFSense Web Configurator as well as the C source code for OpenSSL to figure this out.

                      What I found is that these error messages indicate errors when parsing something in the config file, and since it is complaining about an empty or null name, I had some idea what to look for. In my OpenSSL configuration file, I found an empty SAN entry on line 14:

                      /etc/ssl/openssl.cnf

                      # pfSense: default SAN value if $ENV::SAN is not defined
                      #
                      SAN                     =
                      
                      

                      /etc/ssl/openssl.cnf (after change)

                      # pfSense: default SAN value if $ENV::SAN is not defined
                      #
                      SAN                     = DNS:myname
                      
                      

                      This simple change solves the issue.

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

                        Hmm, what exactly did you do to trigger that issue?

                        I've never seen a problem creating certs with the conf file as it is. I would assume either because the ENV value is set or that a SAN value is not required.

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

                          @stephenw10 yeah makes no sense to set that to something. Because if you have no san setup on the cert your doing, then the san should be blank..

                          If you put a space in for your san you get this error.

                          blank.jpg

                          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 25.07 | Lab VMs 2.8, 25.07

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