Portál AbcLinuxu, 12. května 2025 05:22

Dotaz: APACHE a SSL

15.10.2004 17:03 makak | skóre: 16
APACHE a SSL
Přečteno: 399×
Odpovědět | Admin
Ahoj..

Mam nainstalovany APACHE so ssl modulom, vygenerovane server.key a server.crt a vsetko krasne funguje...

Da sa nejako nastavit apache tak, aby som mal na dany sajt pristup len s certifikatom resp. s nejakym klucom, ktory poslem ja z browsera ? Nieco na sposob ako ked mate nastavene SSH tak, ze musite mat kluc v domovskom adresari v /home/blbecek/.ssh na klientskej masine + passphrase..

proste tak nastavene, ze ked nemate v prehliadaci ten certifikat alebo co, tak sa vam stranka ani nezobrazi... a zobrazi sa lem mne... (administrativne rozhranie webu)
Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

15.10.2004 18:40 jm
Rozbalit Rozbalit vše Re: APACHE a SSL
Odpovědět | | Sbalit | Link | Blokovat | Admin
http://www.apache-ssl.org/docs.html#SSLVerifyClient
16.10.2004 10:23 makak | skóre: 16
Rozbalit Rozbalit vše Re: APACHE a SSL
hej... ale nechapem, ako mam dostat resp vygenerovat nejaky kluc do prehliadaca... na strane prehliadaca neviem ako postupovat.. skapinam z toho
16.10.2004 10:36 jm
Rozbalit Rozbalit vše Re: APACHE a SSL
Co si takhle konecne precist tu dokumentaci?

http://www.apache-ssl.org/#FAQ
16.10.2004 14:50 makak | skóre: 16
Rozbalit Rozbalit vše Re: APACHE a SSL
JA som asi blby.. ale furt nechapem, ako si mam vytvorit request na klientsky certifikat... skusal som to vytvorit tak isto ako na server.crt (tak ze som si urobil server.key a ziadost server.csr... potom som urobil certifikacnu autoritu ca.key a ca.crt .. potom som podpisal server.csr a dostal som server.crt)

httpd.conf <\\virtualhost//>
bla bla..

SSLengine on
SSLCertificateFile server.crt
SSLCertificateKeyFile server.key
SSLCACertificate ca.crt
SSLveifyclient require

No.. a teraz co mam dat ako klientsky certifikat ? Urobim si dalsi client.key a client.csr, podpisem ho s CA a dostanem clent.crt .. A tem mam importovat v prehliadaci ??? tam odomna pyta nejake heslo.. skusal som tam dat to, co som dal ako challenge password, ale to neslo...
NEma sa v tom httpd.conf nieco pisat ako chainfile...??? ja uz fakt z toho magorim ...
16.10.2004 14:59 jm
Rozbalit Rozbalit vše Re: APACHE a SSL
http://www.garex.net/apache/

Priste mozna nejdriv zkusit Google.
16.10.2004 18:12 makak | skóre: 16
Rozbalit Rozbalit vše Re: APACHE a SSL
Prepac.. ospravedlnujem sa ..
ale ked ja som taky sprosty.. ten link mi nefunguje.. prosim Ta.. keby si bol taky dobry napisal mi v kratkosti postup.. Budem Ti vemi vdacny.. uz sa s tym trapim stvrty den a nemozem sa cez to prehryznut..Skusal som googlovat, ale nemal som stastie.. ja som totalny smoliar.. pliiz help..


Zn. zlomeny v kolenach
16.10.2004 18:39 jm
Rozbalit Rozbalit vše Re: APACHE a SSL
Uz me to prestava bavit. Ten link normalne funguje! :-(
BE CAREFUL, THERE'S A TRAP:

Most common webbrowsers like Mozilla or Netscape can't cope with this certificate type. In the former sections we created certificates in PEM format. But those browsers need the certificate to be in another type, like PKCS#12. Therefore we do a conversion: d) Convert user certificate and import it in your browser

# openssl pkcs12 -export -clcerts -in garex.CRT -inkey garex.KEY -out garex.P12

During the conversion dialog you will be asked for an export password; enter anything you can remember, but don't let it be empty. What you get now is a file which not only keeps the certificate, but also your private Key. Copy this file to your workstation (Windows/Linux/Mac OS X), start Mozilla and go through the browsers menu structure like

Preferences -> Privacy & Security -> Manage Certificates -> Your Certificates -> Import -> Choose file

Now enter your formerly chosen export password, then the passphrase of your previously generated private key, which is contained in the P12 file. Finished! But still there's a catch: the browser does not know anything about the CA which created and signed your new user certificate. To complete this task we have to import the root CA certificate as well. This is very easy, although it took me 2h to find out how to do with Mozilla :). Just put the garexCA.CRT on a public http port 80 webserver, enter the URL in your browser and click on the garexCA.CRT.

http://www.garex.net/garexCA.CRT

and - what a surprise - the browser recognizes this certifiacte as a new root CA certificate and offers you to import this certificate to your root CA chain. :)) Internet Explorer, the thing from a different world

Once again Microsoft's Internet Explorer has its own standards: it only accepts certificates of the type DER. Therefore we have to convert our user certificate and the root CA certificate:

# openssl x509 -inform PEM -in garex.CRT -outform DER -out garex.CRT.der # openssl x509 -inform PEM -in garexCA.CRT -outform DER -out garexCA.CRT.der

Import these two certificates via IE and you are finished.
16.10.2004 19:10 makak | skóre: 16
Rozbalit Rozbalit vše Re: APACHE a SSL
DIKIIII mOOOOC.. si super clovek.. diki este raz.. chce to pivooo !!! jedno posielam:

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.