Jump to content

PHP openssl


synking

Recommended Posts

can anyone help me I am running windows.

 

i have openssl installed and i followed the install instructions on  http://us3.php.net/openssl

 

 

Note: Note to Win32 Users  In order for this extension to work, there are DLL files that must be available to the Windows system PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying DLL files from the PHP folder into the Windows system directory also works (because the system directory is by default in the systems PATH), it is not recommended. This extension requires the following files to be in the PATH: libeay32.dll

Additionally, if you are planning to use the key generation and certificate signing functions, you will need to install a valid openssl.cnf on your system. As of PHP 4.3.0, we include a sample configuration file in the openssl folder of our win32 binary distribution. If you are using PHP 4.2.0 or later and are missing the file, you can obtain it from » the OpenSSL home page or by downloading the PHP 4.3.0 release and using the configuration file from there. PHP will search for the openssl.cnf using the following logic:

 

    * the OPENSSL_CONF environmental variable, if set, will be used as the path (including filename) of the configuration file.

    * the SSLEAY_CONF environmental variable, if set, will be used as the path (including filename) of the configuration file.

    * The file openssl.cnf will be assumed to be found in the default certificate area, as configured at the time that the openssl DLL was compiled. This is usually means that the default filename is c:\usr\local\ssl\openssl.cnf.

 

 

In your installation, you need to decide whether to install the configuration file at c:\usr\local\ssl\openssl.cnf or whether to install it someplace else and use environmental variables (possibly on a per-virtual-host basis) to locate the configuration file. Note that it is possible to override the default path from the script using the configargs of the functions that require a configuration file.

 

but it is still not working.  an i am not sure that i did this completely correct.

Link to comment
Share on other sites

this is an Excellent tutorial for easy SSL installation for Apache 2x: http://www.neilstuff.com/apache/apache2-ssl-windows.htm

 

two files you will need:

 

SSL Configuration File:

http://tud.at/programm/openssl.cnf

 

OpenSSL Binary Distribution:

http://www.stunnel.org/download/stunnel/win32/openssl-0.9.7e-zlib/openssl.zip

------------

 

Open openssl.zip and place the .dll files into your c:/windows/system32 folder,

 

Copy openssl.exe to C:\

 

to make sure openssl is working go to start->run and type "cmd" hit enter, type "C:\openssl version"

 

copy the openssl.cnf file to C:\

 

Choose a name, any name i will choose "test" for the purpose of this example;

 

in the console window where you got the version of openssl type:

openssl req -config openssl.cnf -new -out test.csr -keyout test.pem

 

openssl will ask you lots of questions, only 2 of them need answering (other ones just enter through them)

 

1. PEM pass phrase - just choose a password you will remember, "test" or "password" will suffice, i will choose "password" for this exercise;

2. Common Name - The Domain Name you are using this ssl certificate on, if the domain name does not match you will get extra browser warnings about an insecure certificate. - eg: localhost or www.localserver.com (will not match localserver.com)

 

In the Console type:

openssl rsa -in test.pem -out test.key

 

then enter the password you entered earlier (PEM Pass Phrase)

 

Before we go on, delete the .rnd file that was created.

 

in the console type:

openssl x509 -in test.csr -out test.cert -req -signkey test.key -days 365

 

Hang on to KEY and CERT Files.

 

i wil post the rest later just about to watch film, good luck

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.