xref: /PHP-5.6/ext/openssl/php_openssl.h (revision 49493a2d)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 5                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997-2016 The PHP Group                                |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 3.01 of the PHP license,      |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.php.net/license/3_01.txt                                  |
11    | If you did not receive a copy of the PHP license and are unable to   |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@php.net so we can mail you a copy immediately.               |
14    +----------------------------------------------------------------------+
15    | Authors: Stig Venaas <venaas@php.net>                                |
16    |          Wez Furlong <wez@thebrainroom.com                           |
17    +----------------------------------------------------------------------+
18  */
19 
20 /* $Id$ */
21 
22 #ifndef PHP_OPENSSL_H
23 #define PHP_OPENSSL_H
24 /* HAVE_OPENSSL would include SSL MySQL stuff */
25 #ifdef HAVE_OPENSSL_EXT
26 extern zend_module_entry openssl_module_entry;
27 #define phpext_openssl_ptr &openssl_module_entry
28 
29 #define OPENSSL_RAW_DATA 1
30 #define OPENSSL_ZERO_PADDING 2
31 
32 #define OPENSSL_ERROR_X509_PRIVATE_KEY_VALUES_MISMATCH 0x0B080074
33 
34 /* Used for client-initiated handshake renegotiation DoS protection*/
35 #define OPENSSL_DEFAULT_RENEG_LIMIT 2
36 #define OPENSSL_DEFAULT_RENEG_WINDOW 300
37 #define OPENSSL_DEFAULT_STREAM_VERIFY_DEPTH 9
38 #define OPENSSL_DEFAULT_STREAM_CIPHERS "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:" \
39 	"ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:" \
40 	"DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:" \
41 	"ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:" \
42 	"ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:" \
43 	"DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:" \
44 	"AES256-GCM-SHA384:AES128:AES256:HIGH:!SSLv2:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!RC4:!ADH"
45 
46 php_stream_transport_factory_func php_openssl_ssl_socket_factory;
47 
48 PHP_MINIT_FUNCTION(openssl);
49 PHP_MSHUTDOWN_FUNCTION(openssl);
50 PHP_MINFO_FUNCTION(openssl);
51 
52 PHP_FUNCTION(openssl_pkey_get_private);
53 PHP_FUNCTION(openssl_pkey_get_public);
54 PHP_FUNCTION(openssl_pkey_free);
55 PHP_FUNCTION(openssl_pkey_new);
56 PHP_FUNCTION(openssl_pkey_export);
57 PHP_FUNCTION(openssl_pkey_export_to_file);
58 PHP_FUNCTION(openssl_pkey_get_details);
59 
60 PHP_FUNCTION(openssl_sign);
61 PHP_FUNCTION(openssl_verify);
62 PHP_FUNCTION(openssl_seal);
63 PHP_FUNCTION(openssl_open);
64 PHP_FUNCTION(openssl_private_encrypt);
65 PHP_FUNCTION(openssl_private_decrypt);
66 PHP_FUNCTION(openssl_public_encrypt);
67 PHP_FUNCTION(openssl_public_decrypt);
68 
69 PHP_FUNCTION(openssl_pbkdf2);
70 
71 PHP_FUNCTION(openssl_pkcs7_verify);
72 PHP_FUNCTION(openssl_pkcs7_decrypt);
73 PHP_FUNCTION(openssl_pkcs7_sign);
74 PHP_FUNCTION(openssl_pkcs7_encrypt);
75 
76 PHP_FUNCTION(openssl_error_string);
77 
78 PHP_FUNCTION(openssl_x509_read);
79 PHP_FUNCTION(openssl_x509_free);
80 PHP_FUNCTION(openssl_x509_parse);
81 PHP_FUNCTION(openssl_x509_checkpurpose);
82 PHP_FUNCTION(openssl_x509_export);
83 PHP_FUNCTION(openssl_x509_fingerprint);
84 PHP_FUNCTION(openssl_x509_export_to_file);
85 PHP_FUNCTION(openssl_x509_check_private_key);
86 
87 PHP_FUNCTION(openssl_pkcs12_export);
88 PHP_FUNCTION(openssl_pkcs12_export_to_file);
89 PHP_FUNCTION(openssl_pkcs12_read);
90 
91 PHP_FUNCTION(openssl_csr_new);
92 PHP_FUNCTION(openssl_csr_export);
93 PHP_FUNCTION(openssl_csr_export_to_file);
94 PHP_FUNCTION(openssl_csr_sign);
95 PHP_FUNCTION(openssl_csr_get_subject);
96 PHP_FUNCTION(openssl_csr_get_public_key);
97 
98 PHP_FUNCTION(openssl_spki_new);
99 PHP_FUNCTION(openssl_spki_verify);
100 PHP_FUNCTION(openssl_spki_export);
101 PHP_FUNCTION(openssl_spki_export_challenge);
102 
103 PHP_FUNCTION(openssl_get_cert_locations);
104 #else
105 
106 #define phpext_openssl_ptr NULL
107 
108 #endif
109 
110 #endif
111 
112 /*
113  * Local variables:
114  * tab-width: 4
115  * c-basic-offset: 4
116  * End:
117  */
118