LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-10-2012, 03:21 AM   #1
goral09
LQ Newbie
 
Registered: May 2012
Posts: 4

Rep: Reputation: Disabled
Fedora 16 Apache SSL Certificates: Problem with properly setting up server


Hi all!
I know that this subject has been brought up many times, but I have been struggling with this for few days know and my mind is complete mess after reading so many different solutions.


So maybe from the beginning, I have created key and certificate with openssl library and began to modify proper files. I am not touching httpd.conf only ssl.conf so here it goes:

Quote:
#
<VirtualHost *:443>

ErrorLog /var/www/goralCA/logs/ssl_error_log
TransferLog /var/www/goralCA/logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite RC4-SHA:AES128-SHA:ALL:!ADH:!EXP:!LOW:!MD5:!SSLV2:!NULL
SSLCertificateFile /etc/httpd/ssl/goralCA.pem
SSLCertificateKeyFile /etc/httpd/ssl/goralCA.key
SSLVerifyClient require
SSLVerifyDepth 5
<Location />
SSLRequire ( %{SSL_CLIENT_S_CN_OU} in {"Mateusz Gorski"})
</Location>
SSLOptions +ExportCertData +StdEnvVars
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars +ExportCertData
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars +ExportCertData
</Directory>
</VirtualHost>

Of course it's not the whole file, but most important part I think.

Now I am typing 'https://localhost' in browser and after accepting certificate I get this message:
Quote:
SSL peer was unable to negotiate an acceptable set of security parameters.

(Error code: ssl_error_handshake_failure_alert)

Can you help me? I am really getting really pissed off beacuse of it
Thanks in advance
 
Old 05-10-2012, 05:14 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
May I ask for clarification: are you trying to get https to work or do you have that working and are you trying to get certificate authentication to work?

"SSLVerifyClient require" means require a client certificate which has to be directly # signed by our CA certificate. Unless you have installed such a certicate in your client browser, you will get that error message.
 
Old 05-10-2012, 12:52 PM   #3
goral09
LQ Newbie
 
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
yes, certificate is addded to the browser.


and about 1st thing, I am not quiet sure if https is working properly, i assumed so sine it's asking for the certificate and prompt that it's all personal

Last edited by goral09; 05-10-2012 at 12:54 PM.
 
Old 05-10-2012, 01:30 PM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

I would give you some examples to go through the setup procedure, see if anything you did is missing/wrong:
- Setting up an SSL secured Webserver with CentOS
- SSL with Apache 2
- RedHat Apache HTTP Secure Server Configuration

good luck
 
Old 05-11-2012, 04:03 AM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Here is another how to document that I routinely use when I need a command reference on creating client certificates: http://www.vanemery.com/Linux/Apache/apache-SSL.html

I suggest you start by turning off the client authentication verification and start by seeing if you can access the page via https: and then pull up the certificate information from the browser. This will isolate whether the problem is in your https configuration or a problem with the client authentication.

I also noticed that you set the SSLVerifyDepth to 5, whereas I normally see this set to 1. Please see the following: http://www.modssl.org/docs/2.6/ssl_reference.html (scroll down to SSLRequierDepth). Doubt that it is causing your problem, but it is non standard.

Edit: Make sure that your client certificate has been signed by the CA you used to sign the server certificate too! You also need to be really careful of the CN (common name) parameter. See the how to I linked above.
 
Old 05-13-2012, 06:31 PM   #6
goral09
LQ Newbie
 
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
@Noway2,
thank mate! It works, it seems that I had problem with this pkcs#12 format. Man, you made my day. I can proceed with project now, thanks again!
 
Old 05-14-2012, 11:12 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
@goral09: your new question was moved to a new thread: Fedora 16 Apache SSL Certificates: authorization based on name of client or email address.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Setting Up Company CA SSL Certificates for JBoss, etc... LXer Syndicated Linux News 0 05-18-2009 02:50 AM
Apache won't start - missing SSL certificates, howto recreate them? GoBillsBN Linux - Networking 3 01-31-2007 06:22 PM
Apache 1.3 / SSL Certificates uid0sd Debian 0 08-23-2006 03:50 PM
Apache 2 and SSL Certificates aq_mishu Linux - Security 3 02-07-2006 11:09 AM
Apache, SSL, autentication and third party client certificates bezoomny Linux - Security 1 10-13-2005 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration