How to make Apache trust a client certificate using an unknown CA, without validating the CAHow can I make apache request a client SSL certificate without needing to verify it against a known CA?Validating SSL clients using a list of authorised certificates instead of a Certificate AuthorityApache Client Certificate AuthenticationSetup client certificate verification in an Apache webserver via SSLVerifyCilent on a Centos 6.5+ serverAH01896: Unable to determine list of acceptable CA certificates for client authentication in Apache v2.4 SSLCACertificatePath directiveDebugging client certificate problemsHow to make Apache trust a client certificate using an unknown CA, without validating the CAEnforcing client verification in Apache just for a specific client certificatePuzzled by SSLCACertificateFile parameterHow to make it work Certificate pinning (HPKP) and self signed certificate in a local network?Apache reverse proxy can get but can not put/post (403 response)

Python password manager

Can Ghost kill White Walkers or Wights?

What is a "listed natural gas appliance"?

Identifying my late father's D&D stuff found in the attic

Help to understand a simple example of clist in expl3

Identifying a transmission to myself

What are the differences between credential stuffing and password spraying?

Manager is threatning to grade me poorly if I don't complete the project

Moving the subject of the sentence into a dangling participle

What is the most remote airport from the center of the city it supposedly serves?

In a Latex Table, how can I automatically resize cell heights to account for superscripts?

Alias to source .bashrc after it's been edited?

What happens to the Time Stone

Can't remove one character of space in my environment

Why wasn't the Night King naked in S08E03?

Am I getting DDOS from crawlers?

Is induction neccessary for proving that every injective mapping of a finite set into itself is a mapping onto itself?

What happens if I start too many background jobs?

Was Unix ever a single-user OS?

Why do we use caret (^) as the symbol for ctrl/control?

Is Cola "probably the best-known" Latin word in the world? If not, which might it be?

Junior developer struggles: how to communicate with management?

Should one double the thirds or the fifth in chords?

How to reply this mail from potential PhD professor?



How to make Apache trust a client certificate using an unknown CA, without validating the CA


How can I make apache request a client SSL certificate without needing to verify it against a known CA?Validating SSL clients using a list of authorised certificates instead of a Certificate AuthorityApache Client Certificate AuthenticationSetup client certificate verification in an Apache webserver via SSLVerifyCilent on a Centos 6.5+ serverAH01896: Unable to determine list of acceptable CA certificates for client authentication in Apache v2.4 SSLCACertificatePath directiveDebugging client certificate problemsHow to make Apache trust a client certificate using an unknown CA, without validating the CAEnforcing client verification in Apache just for a specific client certificatePuzzled by SSLCACertificateFile parameterHow to make it work Certificate pinning (HPKP) and self signed certificate in a local network?Apache reverse proxy can get but can not put/post (403 response)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








4















I am in the following situation. I need to set up a 2-way integration with an external system. The admin of the external system required me to send two CSRs, one to be used to generate a client certificate, the other to generate a server certificate.
They sent me the corresponding certificates. I set up the channel me->they with success (i.e.: I can invoke their service supplying my client certificate), but I can't set up the inverse channel correctly (i.e.: I can't make my Apache accept their client certificate without complaining).



Together with my server certificate (let's call it my-server.pem) they also sent me their own client certificate (let's call it their-client.pem). This certificate (their-client.pem) is emitted by a "self-signed" CA, that is a CA that is not among those well-known CAs already available in my Linux system. I don't have this certificate and I was not yet able to get it from the external system admins (they are reluctant... let's put aside any comment on this please... >-|)



This is how I set up my VirtualHost in Apache:



SSLEngine on
SSLCertificateFile /path/to/my-server.pem
SSLCertificateKeyFile /path/to/my-server-secret-key.key
SSLVerifyClient require
SSLCACertificateFile /path/to/their-client.pem
SSLVerifyDepth 0


Since I don't have the CA certificate and since it's perfectly fine for me to say "just trust that client certificate, nobody else!", I put the client certificate itself as the SSLCACertificateFile, as suggested in the answer to:
https://security.stackexchange.com/questions/36069/use-client-certificate-using-self-signed-ca-while-using-web-certificate-of-a-pub



However, this doesn't seem to work. The error they see on their side is:



javax.net.ssl.SSLException: Received fatal alert: unknown_ca


After enabling the SSL log and setting it to debug, what I see on my side is:



[ssl:debug] [pid 3396] ssl_engine_kernel.c(1381): [client <their-ip>:41474] AH02275: Certificate Verification, depth 1, CRL checking mode: none [subject: CN=Test CA,OU=Foo,O=Bar,C=it / issuer: CN=Test CA,OU=Foo,O=Bar,C=it / serial: 1BFE / notbefore: Dec 6 15:22:45 2010 GMT / notafter: Dec 6 15:21:52 2020 GMT]
[ssl:info] [pid 3396] [client <their-IP>:41474] AH02276: Certificate Verification: Error (19): self signed certificate in certificate chain [subject: CN=Test CA,OU=Foo,O=Bar,C=it / issuer: CN=Test CA,OU=Foo,O=Bar,C=it / serial: 1BFE / notbefore: Dec 6 15:22:45 2010 GMT / notafter: Dec 6 15:21:52 2020 GMT]
[ssl:info] [pid 3396] [client <their-IP>:41474] AH02008: SSL library error 1 in handshake (server my-server.com:443)
[ssl:info] [pid 3396] SSL Library Error: error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned
[ssl:info] [pid 3396] [client <their-IP>:41474] AH01998: Connection closed to child 54 with abortive shutdown (server my-server.com:443)


In other words, it's still trying to validate the dummy CA of the client certificate. I also tried to change SSLVerifyDepth to 1, with no luck (same error).
If I disable the client certificate request (by changing the SSLVerifyClient value), the invocation goes fine, but I don't think it's the correct way to go.



A very similar question is:
How can I make apache request a client SSL certificate without needing to verify it against a known CA?



However I'm not sure I understand the accepted solution. First of all, the client certificate I must validate is not self-signed (it's issued by an unknown CA).



Secondly, from what I understand from Apache/mod_ssl documentation, SSLVerifyCLient optional_no_ca actually disables strong client certificate authentication, because it makes it optional.



Third, the possibility to create a fake certificate with the same DN of the missing root CA certificate sounds like a workaround for forcing the client to send its client certificate, but in my case I don't think my problem is the client not sending me the certificate, but rather the Apache inability to fully validate it correctly.



Any suggestion on this topic would be very helpful.










share|improve this question






























    4















    I am in the following situation. I need to set up a 2-way integration with an external system. The admin of the external system required me to send two CSRs, one to be used to generate a client certificate, the other to generate a server certificate.
    They sent me the corresponding certificates. I set up the channel me->they with success (i.e.: I can invoke their service supplying my client certificate), but I can't set up the inverse channel correctly (i.e.: I can't make my Apache accept their client certificate without complaining).



    Together with my server certificate (let's call it my-server.pem) they also sent me their own client certificate (let's call it their-client.pem). This certificate (their-client.pem) is emitted by a "self-signed" CA, that is a CA that is not among those well-known CAs already available in my Linux system. I don't have this certificate and I was not yet able to get it from the external system admins (they are reluctant... let's put aside any comment on this please... >-|)



    This is how I set up my VirtualHost in Apache:



    SSLEngine on
    SSLCertificateFile /path/to/my-server.pem
    SSLCertificateKeyFile /path/to/my-server-secret-key.key
    SSLVerifyClient require
    SSLCACertificateFile /path/to/their-client.pem
    SSLVerifyDepth 0


    Since I don't have the CA certificate and since it's perfectly fine for me to say "just trust that client certificate, nobody else!", I put the client certificate itself as the SSLCACertificateFile, as suggested in the answer to:
    https://security.stackexchange.com/questions/36069/use-client-certificate-using-self-signed-ca-while-using-web-certificate-of-a-pub



    However, this doesn't seem to work. The error they see on their side is:



    javax.net.ssl.SSLException: Received fatal alert: unknown_ca


    After enabling the SSL log and setting it to debug, what I see on my side is:



    [ssl:debug] [pid 3396] ssl_engine_kernel.c(1381): [client <their-ip>:41474] AH02275: Certificate Verification, depth 1, CRL checking mode: none [subject: CN=Test CA,OU=Foo,O=Bar,C=it / issuer: CN=Test CA,OU=Foo,O=Bar,C=it / serial: 1BFE / notbefore: Dec 6 15:22:45 2010 GMT / notafter: Dec 6 15:21:52 2020 GMT]
    [ssl:info] [pid 3396] [client <their-IP>:41474] AH02276: Certificate Verification: Error (19): self signed certificate in certificate chain [subject: CN=Test CA,OU=Foo,O=Bar,C=it / issuer: CN=Test CA,OU=Foo,O=Bar,C=it / serial: 1BFE / notbefore: Dec 6 15:22:45 2010 GMT / notafter: Dec 6 15:21:52 2020 GMT]
    [ssl:info] [pid 3396] [client <their-IP>:41474] AH02008: SSL library error 1 in handshake (server my-server.com:443)
    [ssl:info] [pid 3396] SSL Library Error: error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned
    [ssl:info] [pid 3396] [client <their-IP>:41474] AH01998: Connection closed to child 54 with abortive shutdown (server my-server.com:443)


    In other words, it's still trying to validate the dummy CA of the client certificate. I also tried to change SSLVerifyDepth to 1, with no luck (same error).
    If I disable the client certificate request (by changing the SSLVerifyClient value), the invocation goes fine, but I don't think it's the correct way to go.



    A very similar question is:
    How can I make apache request a client SSL certificate without needing to verify it against a known CA?



    However I'm not sure I understand the accepted solution. First of all, the client certificate I must validate is not self-signed (it's issued by an unknown CA).



    Secondly, from what I understand from Apache/mod_ssl documentation, SSLVerifyCLient optional_no_ca actually disables strong client certificate authentication, because it makes it optional.



    Third, the possibility to create a fake certificate with the same DN of the missing root CA certificate sounds like a workaround for forcing the client to send its client certificate, but in my case I don't think my problem is the client not sending me the certificate, but rather the Apache inability to fully validate it correctly.



    Any suggestion on this topic would be very helpful.










    share|improve this question


























      4












      4








      4


      1






      I am in the following situation. I need to set up a 2-way integration with an external system. The admin of the external system required me to send two CSRs, one to be used to generate a client certificate, the other to generate a server certificate.
      They sent me the corresponding certificates. I set up the channel me->they with success (i.e.: I can invoke their service supplying my client certificate), but I can't set up the inverse channel correctly (i.e.: I can't make my Apache accept their client certificate without complaining).



      Together with my server certificate (let's call it my-server.pem) they also sent me their own client certificate (let's call it their-client.pem). This certificate (their-client.pem) is emitted by a "self-signed" CA, that is a CA that is not among those well-known CAs already available in my Linux system. I don't have this certificate and I was not yet able to get it from the external system admins (they are reluctant... let's put aside any comment on this please... >-|)



      This is how I set up my VirtualHost in Apache:



      SSLEngine on
      SSLCertificateFile /path/to/my-server.pem
      SSLCertificateKeyFile /path/to/my-server-secret-key.key
      SSLVerifyClient require
      SSLCACertificateFile /path/to/their-client.pem
      SSLVerifyDepth 0


      Since I don't have the CA certificate and since it's perfectly fine for me to say "just trust that client certificate, nobody else!", I put the client certificate itself as the SSLCACertificateFile, as suggested in the answer to:
      https://security.stackexchange.com/questions/36069/use-client-certificate-using-self-signed-ca-while-using-web-certificate-of-a-pub



      However, this doesn't seem to work. The error they see on their side is:



      javax.net.ssl.SSLException: Received fatal alert: unknown_ca


      After enabling the SSL log and setting it to debug, what I see on my side is:



      [ssl:debug] [pid 3396] ssl_engine_kernel.c(1381): [client <their-ip>:41474] AH02275: Certificate Verification, depth 1, CRL checking mode: none [subject: CN=Test CA,OU=Foo,O=Bar,C=it / issuer: CN=Test CA,OU=Foo,O=Bar,C=it / serial: 1BFE / notbefore: Dec 6 15:22:45 2010 GMT / notafter: Dec 6 15:21:52 2020 GMT]
      [ssl:info] [pid 3396] [client <their-IP>:41474] AH02276: Certificate Verification: Error (19): self signed certificate in certificate chain [subject: CN=Test CA,OU=Foo,O=Bar,C=it / issuer: CN=Test CA,OU=Foo,O=Bar,C=it / serial: 1BFE / notbefore: Dec 6 15:22:45 2010 GMT / notafter: Dec 6 15:21:52 2020 GMT]
      [ssl:info] [pid 3396] [client <their-IP>:41474] AH02008: SSL library error 1 in handshake (server my-server.com:443)
      [ssl:info] [pid 3396] SSL Library Error: error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned
      [ssl:info] [pid 3396] [client <their-IP>:41474] AH01998: Connection closed to child 54 with abortive shutdown (server my-server.com:443)


      In other words, it's still trying to validate the dummy CA of the client certificate. I also tried to change SSLVerifyDepth to 1, with no luck (same error).
      If I disable the client certificate request (by changing the SSLVerifyClient value), the invocation goes fine, but I don't think it's the correct way to go.



      A very similar question is:
      How can I make apache request a client SSL certificate without needing to verify it against a known CA?



      However I'm not sure I understand the accepted solution. First of all, the client certificate I must validate is not self-signed (it's issued by an unknown CA).



      Secondly, from what I understand from Apache/mod_ssl documentation, SSLVerifyCLient optional_no_ca actually disables strong client certificate authentication, because it makes it optional.



      Third, the possibility to create a fake certificate with the same DN of the missing root CA certificate sounds like a workaround for forcing the client to send its client certificate, but in my case I don't think my problem is the client not sending me the certificate, but rather the Apache inability to fully validate it correctly.



      Any suggestion on this topic would be very helpful.










      share|improve this question
















      I am in the following situation. I need to set up a 2-way integration with an external system. The admin of the external system required me to send two CSRs, one to be used to generate a client certificate, the other to generate a server certificate.
      They sent me the corresponding certificates. I set up the channel me->they with success (i.e.: I can invoke their service supplying my client certificate), but I can't set up the inverse channel correctly (i.e.: I can't make my Apache accept their client certificate without complaining).



      Together with my server certificate (let's call it my-server.pem) they also sent me their own client certificate (let's call it their-client.pem). This certificate (their-client.pem) is emitted by a "self-signed" CA, that is a CA that is not among those well-known CAs already available in my Linux system. I don't have this certificate and I was not yet able to get it from the external system admins (they are reluctant... let's put aside any comment on this please... >-|)



      This is how I set up my VirtualHost in Apache:



      SSLEngine on
      SSLCertificateFile /path/to/my-server.pem
      SSLCertificateKeyFile /path/to/my-server-secret-key.key
      SSLVerifyClient require
      SSLCACertificateFile /path/to/their-client.pem
      SSLVerifyDepth 0


      Since I don't have the CA certificate and since it's perfectly fine for me to say "just trust that client certificate, nobody else!", I put the client certificate itself as the SSLCACertificateFile, as suggested in the answer to:
      https://security.stackexchange.com/questions/36069/use-client-certificate-using-self-signed-ca-while-using-web-certificate-of-a-pub



      However, this doesn't seem to work. The error they see on their side is:



      javax.net.ssl.SSLException: Received fatal alert: unknown_ca


      After enabling the SSL log and setting it to debug, what I see on my side is:



      [ssl:debug] [pid 3396] ssl_engine_kernel.c(1381): [client <their-ip>:41474] AH02275: Certificate Verification, depth 1, CRL checking mode: none [subject: CN=Test CA,OU=Foo,O=Bar,C=it / issuer: CN=Test CA,OU=Foo,O=Bar,C=it / serial: 1BFE / notbefore: Dec 6 15:22:45 2010 GMT / notafter: Dec 6 15:21:52 2020 GMT]
      [ssl:info] [pid 3396] [client <their-IP>:41474] AH02276: Certificate Verification: Error (19): self signed certificate in certificate chain [subject: CN=Test CA,OU=Foo,O=Bar,C=it / issuer: CN=Test CA,OU=Foo,O=Bar,C=it / serial: 1BFE / notbefore: Dec 6 15:22:45 2010 GMT / notafter: Dec 6 15:21:52 2020 GMT]
      [ssl:info] [pid 3396] [client <their-IP>:41474] AH02008: SSL library error 1 in handshake (server my-server.com:443)
      [ssl:info] [pid 3396] SSL Library Error: error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned
      [ssl:info] [pid 3396] [client <their-IP>:41474] AH01998: Connection closed to child 54 with abortive shutdown (server my-server.com:443)


      In other words, it's still trying to validate the dummy CA of the client certificate. I also tried to change SSLVerifyDepth to 1, with no luck (same error).
      If I disable the client certificate request (by changing the SSLVerifyClient value), the invocation goes fine, but I don't think it's the correct way to go.



      A very similar question is:
      How can I make apache request a client SSL certificate without needing to verify it against a known CA?



      However I'm not sure I understand the accepted solution. First of all, the client certificate I must validate is not self-signed (it's issued by an unknown CA).



      Secondly, from what I understand from Apache/mod_ssl documentation, SSLVerifyCLient optional_no_ca actually disables strong client certificate authentication, because it makes it optional.



      Third, the possibility to create a fake certificate with the same DN of the missing root CA certificate sounds like a workaround for forcing the client to send its client certificate, but in my case I don't think my problem is the client not sending me the certificate, but rather the Apache inability to fully validate it correctly.



      Any suggestion on this topic would be very helpful.







      ssl ssl-certificate apache-2.4 certificate certificate-authority






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 13 '17 at 12:14









      Community

      1




      1










      asked Sep 10 '15 at 16:33









      Mauro MolinariMauro Molinari

      146127




      146127




















          4 Answers
          4






          active

          oldest

          votes


















          1














          Your error message clearly shows the cause right here: "depth 1". You've set SSLVerifyDepth 0 which per manual means that:




          self-signed client certificates are accepted only




          To check if client cert is as expected, and without the chain validation, try something like this:



          SSLVerify none
          SSLRequire ( %SSL_CLIENT_S_DN_O eq "Snake Oil, Ltd." and %REMOTE_ADDR =~ m/^192.76.162.[0-9]+$/ )





          share|improve this answer

























          • Interesting, you mean that SSLRequire directive is honoured even if SSLVerify is none? However, this just makes a requirement on the organization and remote address of the client, not on the actual whole certificate. This may be enough in many contexts, but it is not what I wanted. At that time I saw there's also a SSLRequire directive to match the whole certificate, but I read many people had trouble with it.

            – Mauro Molinari
            Jan 5 '17 at 8:05






          • 1





            Yes SSLRequire can be customized, this is just a quick example. Don't want "trouble"? Maybe don't ask questions about discouraged troublesome configs :)

            – kubanczyk
            Jan 5 '17 at 10:57


















          1














          I really hate responses that suggest alternatives that don't actually answer the question but... if you don't want to (or can't because they won't provide it) accept their CA for their cert, then you should issue them the cert from your own CA. This would fix the problem of not only them not providing signer cert, but would also prevent you from having to trust a strange CA.






          share|improve this answer






























            0














            This is for Apache 2.4.



            # Unchanged:
            SSLEngine on
            SSLCertificateFile /path/to/my-server.pem
            SSLCertificateKeyFile /path/to/my-server-secret-key.key
            SSLCACertificateFile /path/to/their-client.pem
            SSLVerifyDepth 0

            # Changed:
            SSLVerifyClient optional_no_ca
            Require expr "%SSL_CLIENT_I_DN_CN -eq 'www.example.com'"



            Also answered in How can I make apache request a client SSL certificate without needing to verify it against a known CA?






            share|improve this answer






























              -1














              I'm not an expert on Apache but from the certificate point of view if they don't want to supply you with the public key of their root CA simply ask them to get their client certificat from a well know CA instead of their own CA. For example, StartSSL offer free 1 year certificate. You're building a nightmare because the partner doesn't understand how it work. Another way is to install your own CA (Linux) https://jamielinux.com/docs/openssl-certificate-authority/ (Windows) http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/ and ask them to provide you with a CSR to replace (their-client.pem)






              share|improve this answer























              • After some pressure and solicits, they finally sent me the root CAs certificates and I was able to make the client certificate authentication work correctly. Unfortunately, this "partner" is actually a big company that manages a government system, so it's quite hard (impossible?) to request a customised configuration (like the change of CAs...). I leave the question open, though, because it's hard to believe there's no way to bypass the whole chain verification in Apache (even if it's not the best way to go).

                – Mauro Molinari
                Sep 19 '15 at 19:22











              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "2"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f721521%2fhow-to-make-apache-trust-a-client-certificate-using-an-unknown-ca-without-valid%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              4 Answers
              4






              active

              oldest

              votes








              4 Answers
              4






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Your error message clearly shows the cause right here: "depth 1". You've set SSLVerifyDepth 0 which per manual means that:




              self-signed client certificates are accepted only




              To check if client cert is as expected, and without the chain validation, try something like this:



              SSLVerify none
              SSLRequire ( %SSL_CLIENT_S_DN_O eq "Snake Oil, Ltd." and %REMOTE_ADDR =~ m/^192.76.162.[0-9]+$/ )





              share|improve this answer

























              • Interesting, you mean that SSLRequire directive is honoured even if SSLVerify is none? However, this just makes a requirement on the organization and remote address of the client, not on the actual whole certificate. This may be enough in many contexts, but it is not what I wanted. At that time I saw there's also a SSLRequire directive to match the whole certificate, but I read many people had trouble with it.

                – Mauro Molinari
                Jan 5 '17 at 8:05






              • 1





                Yes SSLRequire can be customized, this is just a quick example. Don't want "trouble"? Maybe don't ask questions about discouraged troublesome configs :)

                – kubanczyk
                Jan 5 '17 at 10:57















              1














              Your error message clearly shows the cause right here: "depth 1". You've set SSLVerifyDepth 0 which per manual means that:




              self-signed client certificates are accepted only




              To check if client cert is as expected, and without the chain validation, try something like this:



              SSLVerify none
              SSLRequire ( %SSL_CLIENT_S_DN_O eq "Snake Oil, Ltd." and %REMOTE_ADDR =~ m/^192.76.162.[0-9]+$/ )





              share|improve this answer

























              • Interesting, you mean that SSLRequire directive is honoured even if SSLVerify is none? However, this just makes a requirement on the organization and remote address of the client, not on the actual whole certificate. This may be enough in many contexts, but it is not what I wanted. At that time I saw there's also a SSLRequire directive to match the whole certificate, but I read many people had trouble with it.

                – Mauro Molinari
                Jan 5 '17 at 8:05






              • 1





                Yes SSLRequire can be customized, this is just a quick example. Don't want "trouble"? Maybe don't ask questions about discouraged troublesome configs :)

                – kubanczyk
                Jan 5 '17 at 10:57













              1












              1








              1







              Your error message clearly shows the cause right here: "depth 1". You've set SSLVerifyDepth 0 which per manual means that:




              self-signed client certificates are accepted only




              To check if client cert is as expected, and without the chain validation, try something like this:



              SSLVerify none
              SSLRequire ( %SSL_CLIENT_S_DN_O eq "Snake Oil, Ltd." and %REMOTE_ADDR =~ m/^192.76.162.[0-9]+$/ )





              share|improve this answer















              Your error message clearly shows the cause right here: "depth 1". You've set SSLVerifyDepth 0 which per manual means that:




              self-signed client certificates are accepted only




              To check if client cert is as expected, and without the chain validation, try something like this:



              SSLVerify none
              SSLRequire ( %SSL_CLIENT_S_DN_O eq "Snake Oil, Ltd." and %REMOTE_ADDR =~ m/^192.76.162.[0-9]+$/ )






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jan 4 '17 at 18:20

























              answered Jan 4 '17 at 18:14









              kubanczykkubanczyk

              10.7k32946




              10.7k32946












              • Interesting, you mean that SSLRequire directive is honoured even if SSLVerify is none? However, this just makes a requirement on the organization and remote address of the client, not on the actual whole certificate. This may be enough in many contexts, but it is not what I wanted. At that time I saw there's also a SSLRequire directive to match the whole certificate, but I read many people had trouble with it.

                – Mauro Molinari
                Jan 5 '17 at 8:05






              • 1





                Yes SSLRequire can be customized, this is just a quick example. Don't want "trouble"? Maybe don't ask questions about discouraged troublesome configs :)

                – kubanczyk
                Jan 5 '17 at 10:57

















              • Interesting, you mean that SSLRequire directive is honoured even if SSLVerify is none? However, this just makes a requirement on the organization and remote address of the client, not on the actual whole certificate. This may be enough in many contexts, but it is not what I wanted. At that time I saw there's also a SSLRequire directive to match the whole certificate, but I read many people had trouble with it.

                – Mauro Molinari
                Jan 5 '17 at 8:05






              • 1





                Yes SSLRequire can be customized, this is just a quick example. Don't want "trouble"? Maybe don't ask questions about discouraged troublesome configs :)

                – kubanczyk
                Jan 5 '17 at 10:57
















              Interesting, you mean that SSLRequire directive is honoured even if SSLVerify is none? However, this just makes a requirement on the organization and remote address of the client, not on the actual whole certificate. This may be enough in many contexts, but it is not what I wanted. At that time I saw there's also a SSLRequire directive to match the whole certificate, but I read many people had trouble with it.

              – Mauro Molinari
              Jan 5 '17 at 8:05





              Interesting, you mean that SSLRequire directive is honoured even if SSLVerify is none? However, this just makes a requirement on the organization and remote address of the client, not on the actual whole certificate. This may be enough in many contexts, but it is not what I wanted. At that time I saw there's also a SSLRequire directive to match the whole certificate, but I read many people had trouble with it.

              – Mauro Molinari
              Jan 5 '17 at 8:05




              1




              1





              Yes SSLRequire can be customized, this is just a quick example. Don't want "trouble"? Maybe don't ask questions about discouraged troublesome configs :)

              – kubanczyk
              Jan 5 '17 at 10:57





              Yes SSLRequire can be customized, this is just a quick example. Don't want "trouble"? Maybe don't ask questions about discouraged troublesome configs :)

              – kubanczyk
              Jan 5 '17 at 10:57













              1














              I really hate responses that suggest alternatives that don't actually answer the question but... if you don't want to (or can't because they won't provide it) accept their CA for their cert, then you should issue them the cert from your own CA. This would fix the problem of not only them not providing signer cert, but would also prevent you from having to trust a strange CA.






              share|improve this answer



























                1














                I really hate responses that suggest alternatives that don't actually answer the question but... if you don't want to (or can't because they won't provide it) accept their CA for their cert, then you should issue them the cert from your own CA. This would fix the problem of not only them not providing signer cert, but would also prevent you from having to trust a strange CA.






                share|improve this answer

























                  1












                  1








                  1







                  I really hate responses that suggest alternatives that don't actually answer the question but... if you don't want to (or can't because they won't provide it) accept their CA for their cert, then you should issue them the cert from your own CA. This would fix the problem of not only them not providing signer cert, but would also prevent you from having to trust a strange CA.






                  share|improve this answer













                  I really hate responses that suggest alternatives that don't actually answer the question but... if you don't want to (or can't because they won't provide it) accept their CA for their cert, then you should issue them the cert from your own CA. This would fix the problem of not only them not providing signer cert, but would also prevent you from having to trust a strange CA.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Oct 21 '17 at 17:11









                  apocalysqueapocalysque

                  38927




                  38927





















                      0














                      This is for Apache 2.4.



                      # Unchanged:
                      SSLEngine on
                      SSLCertificateFile /path/to/my-server.pem
                      SSLCertificateKeyFile /path/to/my-server-secret-key.key
                      SSLCACertificateFile /path/to/their-client.pem
                      SSLVerifyDepth 0

                      # Changed:
                      SSLVerifyClient optional_no_ca
                      Require expr "%SSL_CLIENT_I_DN_CN -eq 'www.example.com'"



                      Also answered in How can I make apache request a client SSL certificate without needing to verify it against a known CA?






                      share|improve this answer



























                        0














                        This is for Apache 2.4.



                        # Unchanged:
                        SSLEngine on
                        SSLCertificateFile /path/to/my-server.pem
                        SSLCertificateKeyFile /path/to/my-server-secret-key.key
                        SSLCACertificateFile /path/to/their-client.pem
                        SSLVerifyDepth 0

                        # Changed:
                        SSLVerifyClient optional_no_ca
                        Require expr "%SSL_CLIENT_I_DN_CN -eq 'www.example.com'"



                        Also answered in How can I make apache request a client SSL certificate without needing to verify it against a known CA?






                        share|improve this answer

























                          0












                          0








                          0







                          This is for Apache 2.4.



                          # Unchanged:
                          SSLEngine on
                          SSLCertificateFile /path/to/my-server.pem
                          SSLCertificateKeyFile /path/to/my-server-secret-key.key
                          SSLCACertificateFile /path/to/their-client.pem
                          SSLVerifyDepth 0

                          # Changed:
                          SSLVerifyClient optional_no_ca
                          Require expr "%SSL_CLIENT_I_DN_CN -eq 'www.example.com'"



                          Also answered in How can I make apache request a client SSL certificate without needing to verify it against a known CA?






                          share|improve this answer













                          This is for Apache 2.4.



                          # Unchanged:
                          SSLEngine on
                          SSLCertificateFile /path/to/my-server.pem
                          SSLCertificateKeyFile /path/to/my-server-secret-key.key
                          SSLCACertificateFile /path/to/their-client.pem
                          SSLVerifyDepth 0

                          # Changed:
                          SSLVerifyClient optional_no_ca
                          Require expr "%SSL_CLIENT_I_DN_CN -eq 'www.example.com'"



                          Also answered in How can I make apache request a client SSL certificate without needing to verify it against a known CA?







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 23 at 12:35









                          Jari TurkiaJari Turkia

                          1212




                          1212





















                              -1














                              I'm not an expert on Apache but from the certificate point of view if they don't want to supply you with the public key of their root CA simply ask them to get their client certificat from a well know CA instead of their own CA. For example, StartSSL offer free 1 year certificate. You're building a nightmare because the partner doesn't understand how it work. Another way is to install your own CA (Linux) https://jamielinux.com/docs/openssl-certificate-authority/ (Windows) http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/ and ask them to provide you with a CSR to replace (their-client.pem)






                              share|improve this answer























                              • After some pressure and solicits, they finally sent me the root CAs certificates and I was able to make the client certificate authentication work correctly. Unfortunately, this "partner" is actually a big company that manages a government system, so it's quite hard (impossible?) to request a customised configuration (like the change of CAs...). I leave the question open, though, because it's hard to believe there's no way to bypass the whole chain verification in Apache (even if it's not the best way to go).

                                – Mauro Molinari
                                Sep 19 '15 at 19:22















                              -1














                              I'm not an expert on Apache but from the certificate point of view if they don't want to supply you with the public key of their root CA simply ask them to get their client certificat from a well know CA instead of their own CA. For example, StartSSL offer free 1 year certificate. You're building a nightmare because the partner doesn't understand how it work. Another way is to install your own CA (Linux) https://jamielinux.com/docs/openssl-certificate-authority/ (Windows) http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/ and ask them to provide you with a CSR to replace (their-client.pem)






                              share|improve this answer























                              • After some pressure and solicits, they finally sent me the root CAs certificates and I was able to make the client certificate authentication work correctly. Unfortunately, this "partner" is actually a big company that manages a government system, so it's quite hard (impossible?) to request a customised configuration (like the change of CAs...). I leave the question open, though, because it's hard to believe there's no way to bypass the whole chain verification in Apache (even if it's not the best way to go).

                                – Mauro Molinari
                                Sep 19 '15 at 19:22













                              -1












                              -1








                              -1







                              I'm not an expert on Apache but from the certificate point of view if they don't want to supply you with the public key of their root CA simply ask them to get their client certificat from a well know CA instead of their own CA. For example, StartSSL offer free 1 year certificate. You're building a nightmare because the partner doesn't understand how it work. Another way is to install your own CA (Linux) https://jamielinux.com/docs/openssl-certificate-authority/ (Windows) http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/ and ask them to provide you with a CSR to replace (their-client.pem)






                              share|improve this answer













                              I'm not an expert on Apache but from the certificate point of view if they don't want to supply you with the public key of their root CA simply ask them to get their client certificat from a well know CA instead of their own CA. For example, StartSSL offer free 1 year certificate. You're building a nightmare because the partner doesn't understand how it work. Another way is to install your own CA (Linux) https://jamielinux.com/docs/openssl-certificate-authority/ (Windows) http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/ and ask them to provide you with a CSR to replace (their-client.pem)







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Sep 18 '15 at 15:40









                              CividanCividan

                              39310




                              39310












                              • After some pressure and solicits, they finally sent me the root CAs certificates and I was able to make the client certificate authentication work correctly. Unfortunately, this "partner" is actually a big company that manages a government system, so it's quite hard (impossible?) to request a customised configuration (like the change of CAs...). I leave the question open, though, because it's hard to believe there's no way to bypass the whole chain verification in Apache (even if it's not the best way to go).

                                – Mauro Molinari
                                Sep 19 '15 at 19:22

















                              • After some pressure and solicits, they finally sent me the root CAs certificates and I was able to make the client certificate authentication work correctly. Unfortunately, this "partner" is actually a big company that manages a government system, so it's quite hard (impossible?) to request a customised configuration (like the change of CAs...). I leave the question open, though, because it's hard to believe there's no way to bypass the whole chain verification in Apache (even if it's not the best way to go).

                                – Mauro Molinari
                                Sep 19 '15 at 19:22
















                              After some pressure and solicits, they finally sent me the root CAs certificates and I was able to make the client certificate authentication work correctly. Unfortunately, this "partner" is actually a big company that manages a government system, so it's quite hard (impossible?) to request a customised configuration (like the change of CAs...). I leave the question open, though, because it's hard to believe there's no way to bypass the whole chain verification in Apache (even if it's not the best way to go).

                              – Mauro Molinari
                              Sep 19 '15 at 19:22





                              After some pressure and solicits, they finally sent me the root CAs certificates and I was able to make the client certificate authentication work correctly. Unfortunately, this "partner" is actually a big company that manages a government system, so it's quite hard (impossible?) to request a customised configuration (like the change of CAs...). I leave the question open, though, because it's hard to believe there's no way to bypass the whole chain verification in Apache (even if it's not the best way to go).

                              – Mauro Molinari
                              Sep 19 '15 at 19:22

















                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Server Fault!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f721521%2fhow-to-make-apache-trust-a-client-certificate-using-an-unknown-ca-without-valid%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                              Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                              Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020