~hexmode/+junk/main

« back to all changes in this revision

Viewing changes to install-files/bin/php/php5.2.5/extras/openssl/README-SSL.txt

  • Committer: Mark A. Hershberger
  • Date: 2008-01-05 19:38:56 UTC
  • Revision ID: hershberger@spawn-xp-20080105193856-6rnzgwa4nehue3qj
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
To use the CSR and key generation functions from PHP, you will need to install
 
2
an openssl.cnf file.  We have included a sample file that can be used for this
 
3
purpose in this folder alongside this readme file.
 
4
 
 
5
The default path for the openssl.cnf file is determined as follows:
 
6
 
 
7
OPENSSL_CONF environmental variable, if set, is assumed to hold the
 
8
path to the file.
 
9
 
 
10
If it is not set, SSLEAY_CONF environmental variable is checked next.
 
11
If neither are set, PHP will look in the default certificate area that was set
 
12
at the time that the SSL DLLs were compiled.  This is typically
 
13
"C:\usr\local\ssl\openssl.cnf".
 
14
 
 
15
If the default path is not suitable for your system, you can set the
 
16
OPENSSL_CONF variable; under windows 95 and 98 you can set this variable in
 
17
your autoexec.bat (or the batch file that starts your webserver/PHP).
 
18
Under NT, 2000 and XP you can set environmental variables using "My Computer"
 
19
properties.
 
20
 
 
21
If setting an environmental var is not suitable, and you don't want to install
 
22
the config file at the default location, you can override the default path
 
23
using code like this:
 
24
 
 
25
$configargs = array(
 
26
    "config" => "path/to/openssl.cnf"
 
27
    );
 
28
 
 
29
$pkey = openssl_pkey_new($config);
 
30
$csr = openssl_csr_new($dn, $pkey, $config);
 
31
 
 
32
Please consult the online manual for more information about these functions.
 
33
 
 
34
NOTE!
 
35
 
 
36
Windows Explorer gives special meaning to files with a .cnf extension.
 
37
This typically means that editing the file from the explorer (by double or
 
38
right-clicking) will be difficult or impossible depending on your setup.
 
39
It is often easier to open the file from within the editor.
 
40
You can avoid this issue by naming the file something else (you might need to
 
41
rename the file using a DOS box) and then setting up an environmental variable
 
42
as described above.