* Resource holding the key. *
* @return void */ function openssl_pkey_free ($key) {} /** * Generates a new private key * @link http://www.php.net/manual/en/function.openssl-pkey-new.php * @param configargs array[optional]* You can finetune the key generation (such as specifying the number of * bits) using configargs. See * openssl_csr_new for more information about * configargs. *
* @return resource a resource identifier for the pkey on success, or false on * error. */ function openssl_pkey_new (array $configargs = null) {} /** * Gets an exportable representation of a key into a string * @link http://www.php.net/manual/en/function.openssl-pkey-export.php * @param key mixed*
* @param out string*
* @param passphrase string[optional]* The key is optionally protected by passphrase. *
* @param configargs array[optional]* configargs can be used to fine-tune the export * process by specifying and/or overriding options for the openssl * configuration file. See openssl_csr_new for more * information about configargs. *
* @return bool Returns true on success, false on failure. */ function openssl_pkey_export ($key, &$out, $passphrase = null, array $configargs = null) {} /** * Gets an exportable representation of a key into a file * @link http://www.php.net/manual/en/function.openssl-pkey-export-to-file.php * @param key mixed*
* @param outfilename string* Path to the output file. *
* @param passphrase string[optional]* The key can be optionally protected by a * passphrase. *
* @param configargs array[optional]* configargs can be used to fine-tune the export * process by specifying and/or overriding options for the openssl * configuration file. See openssl_csr_new for more * information about configargs. *
* @return bool Returns true on success, false on failure. */ function openssl_pkey_export_to_file ($key, $outfilename, $passphrase = null, array $configargs = null) {} /** * Get a private key * @link http://www.php.net/manual/en/function.openssl-pkey-get-private.php * @param key mixed* key can be one of the following: * * a string having the format * file://path/to/file.pem. The named file must * contain a PEM encoded certificate/private key (it may contain both). * @param passphrase string[optional]
* The optional parameter passphrase must be used * if the specified key is encrypted (protected by a passphrase). *
* @return resource a positive key resource identifier on success, or false on error. */ function openssl_pkey_get_private ($key, $passphrase = null) {} /** * Extract public key from certificate and prepare it for use * @link http://www.php.net/manual/en/function.openssl-pkey-get-public.php * @param certificate mixed* certificate can be one of the following: * * an X.509 certificate resource * @return resource a positive key resource identifier on success, or false on error. */ function openssl_pkey_get_public ($certificate) {} /** * Returns an array with the key details * @link http://www.php.net/manual/en/function.openssl-pkey-get-details.php * @param key resource
* Resource holding the key. *
* @return array an array with the key details in success or false in failure. * Returned array has indexes bits (number of bits), * key (string representation of the public key) and * type (type of the key which is one of * OPENSSL_KEYTYPE_RSA, * OPENSSL_KEYTYPE_DSA, * OPENSSL_KEYTYPE_DH, * OPENSSL_KEYTYPE_EC or -1 meaning unknown). * ** Depending on the key type used, additional details may be returned. Note that * some elements may not always be available. */ function openssl_pkey_get_details ($key) {} /** * Free key resource * @link http://www.php.net/manual/en/function.openssl-free-key.php * @param key_identifier resource
*
* @return void */ function openssl_free_key ($key_identifier) {} /** * &Alias;*
* @return resource a resource identifier on success&return.falseforfailure;. */ function openssl_x509_read ($x509certdata) {} /** * Free certificate resource * @link http://www.php.net/manual/en/function.openssl-x509-free.php * @param x509cert resource*
* @return void */ function openssl_x509_free ($x509cert) {} /** * Parse an X509 certificate and return the information as an array * @link http://www.php.net/manual/en/function.openssl-x509-parse.php * @param x509cert mixed*
* @param shortnames bool[optional]* shortnames controls how the data is indexed in the * array - if shortnames is true (the default) then * fields will be indexed with the short name form, otherwise, the long name * form will be used - e.g.: CN is the shortname form of commonName. *
* @return array The structure of the returned data is (deliberately) not * yet documented, as it is still subject to change. */ function openssl_x509_parse ($x509cert, $shortnames = null) {} /** * Verifies if a certificate can be used for a particular purpose * @link http://www.php.net/manual/en/function.openssl-x509-checkpurpose.php * @param x509cert mixed* The examined certificate. *
* @param purpose int*
| Constant | *Description | *
| X509_PURPOSE_SSL_CLIENT | *Can the certificate be used for the client side of an SSL * connection? | *
| X509_PURPOSE_SSL_SERVER | *Can the certificate be used for the server side of an SSL * connection? | *
| X509_PURPOSE_NS_SSL_SERVER | *Can the cert be used for Netscape SSL server? | *
| X509_PURPOSE_SMIME_SIGN | *Can the cert be used to sign S/MIME email? | *
| X509_PURPOSE_SMIME_ENCRYPT | *Can the cert be used to encrypt S/MIME email? | *
| X509_PURPOSE_CRL_SIGN | *Can the cert be used to sign a certificate revocation list * (CRL)? | *
| X509_PURPOSE_ANY | *Can the cert be used for Any/All purposes? | *
* cainfo should be an array of trusted CA files/dirs * as described in Certificate * Verification. *
* @param untrustedfile string[optional]* If specified, this should be the name of a PEM encoded file holding * certificates that can be used to help verify the certificate, although * no trust is placed in the certificates that come from that file. *
* @return int true if the certificate can be used for the intended purpose, * false if it cannot, or -1 on error. */ function openssl_x509_checkpurpose ($x509cert, $purpose, array $cainfo = null, $untrustedfile = null) {} /** * Checks if a private key corresponds to a certificate * @link http://www.php.net/manual/en/function.openssl-x509-check-private-key.php * @param cert mixed* The certificate. *
* @param key mixed* The private key. *
* @return bool true if key is the private key that * corresponds to cert, or false otherwise. */ function openssl_x509_check_private_key ($cert, $key) {} /** * Exports a certificate as a string * @link http://www.php.net/manual/en/function.openssl-x509-export.php * @param x509 mixed * @param output string* On success, this will hold the PEM. *
* @param notext bool[optional] ¬e.openssl.param-notext; * @return bool Returns true on success, false on failure. */ function openssl_x509_export ($x509, &$output, $notext = null) {} /** * Calculates the fingerprint, or digest, of a given X.509 certificate * @link http://www.php.net/manual/en/function.openssl-x509-fingerprint.php * @param x509 mixed * @param hash_algorithm string[optional]* The hash algorithm to use, e.g. "md5" or "sha1" *
* @param raw_output bool[optional]* When set to true, outputs raw binary data. false outputs lowercase hexits. *
* @return bool a string containing the calculated certificate fingerprint as lowercase hexits unless raw_output is set to true in which case the raw binary representation of the message digest is returned. * ** Returns false on failure. */ function openssl_x509_fingerprint ($x509, $hash_algorithm = null, $raw_output = null) {} /** * Exports a certificate to file * @link http://www.php.net/manual/en/function.openssl-x509-export-to-file.php * @param x509 mixed * @param outfilename string
* Path to the output file. *
* @param notext bool[optional] ¬e.openssl.param-notext; * @return bool Returns true on success, false on failure. */ function openssl_x509_export_to_file ($x509, $outfilename, $notext = null) {} /** * Exports a PKCS#12 Compatible Certificate Store File to variable. * @link http://www.php.net/manual/en/function.openssl-pkcs12-export.php * @param x509 mixed * @param out string* On success, this will hold the PKCS#12. *
* @param priv_key mixed* Private key component of PKCS#12 file. *
* @param pass string* Encryption password for unlocking the PKCS#12 file. *
* @param args array[optional]*
* @return bool Returns true on success, false on failure. */ function openssl_pkcs12_export ($x509, &$out, $priv_key, $pass, array $args = null) {} /** * Exports a PKCS#12 Compatible Certificate Store File * @link http://www.php.net/manual/en/function.openssl-pkcs12-export-to-file.php * @param x509 mixed * @param filename string* Path to the output file. *
* @param priv_key mixed* Private key component of PKCS#12 file. *
* @param pass string* Encryption password for unlocking the PKCS#12 file. *
* @param args array[optional]*
* @return bool Returns true on success, false on failure. */ function openssl_pkcs12_export_to_file ($x509, $filename, $priv_key, $pass, array $args = null) {} /** * Parse a PKCS#12 Certificate Store into an array * @link http://www.php.net/manual/en/function.openssl-pkcs12-read.php * @param pkcs12 string*
* @param certs array* On success, this will hold the Certificate Store Data. *
* @param pass string* Encryption password for unlocking the PKCS#12 file. *
* @return bool Returns true on success, false on failure. */ function openssl_pkcs12_read ($pkcs12, array &$certs, $pass) {} /** * Generates a CSR * @link http://www.php.net/manual/en/function.openssl-csr-new.php * @param dn array* The Distinguished Name to be used in the certificate. *
* @param privkey resource* privkey should be set to a private key that was * previously generated by openssl_pkey_new (or * otherwise obtained from the other openssl_pkey family of functions). * The corresponding public portion of the key will be used to sign the * CSR. *
* @param configargs array[optional]* By default, the information in your system openssl.conf * is used to initialize the request; you can specify a configuration file * section by setting the config_section_section key of * configargs. You can also specify an alternative * openssl configuration file by setting the value of the * config key to the path of the file you want to use. * The following keys, if present in configargs * behave as their equivalents in the openssl.conf, as * listed in the table below. *
| configargs key | *type | *openssl.conf equivalent | *description | *
| digest_alg | *string | *default_md | *Selects which digest method to use | *
| x509_extensions | *string | *x509_extensions | *Selects which extensions should be used when creating an x509 * certificate | *
| req_extensions | *string | *req_extensions | *Selects which extensions should be used when creating a CSR | *
| private_key_bits | *integer | *default_bits | *Specifies how many bits should be used to generate a private * key | *
| private_key_type | *integer | *none | *Specifies the type of private key to create. This can be one * of OPENSSL_KEYTYPE_DSA, * OPENSSL_KEYTYPE_DH or * OPENSSL_KEYTYPE_RSA. * The default value is OPENSSL_KEYTYPE_RSA which * is currently the only supported key type. * | *
| encrypt_key | *boolean | *encrypt_key | *Should an exported key (with passphrase) be encrypted? | *
| encrypt_key_cipher | *integer | *none | ** One of cipher constants. * | *
* extraattribs is used to specify additional * configuration options for the CSR. Both dn and * extraattribs are associative arrays whose keys are * converted to OIDs and applied to the relevant part of the request. *
* @return mixed the CSR. */ function openssl_csr_new (array $dn, &$privkey, array $configargs = null, array $extraattribs = null) {} /** * Exports a CSR as a string * @link http://www.php.net/manual/en/function.openssl-csr-export.php * @param csr resource*
* @param out string*
* @param notext bool[optional] ¬e.openssl.param-notext; * @return bool Returns true on success, false on failure. */ function openssl_csr_export ($csr, &$out, $notext = null) {} /** * Exports a CSR to a file * @link http://www.php.net/manual/en/function.openssl-csr-export-to-file.php * @param csr resource*
* @param outfilename string* Path to the output file. *
* @param notext bool[optional] ¬e.openssl.param-notext; * @return bool Returns true on success, false on failure. */ function openssl_csr_export_to_file ($csr, $outfilename, $notext = null) {} /** * Sign a CSR with another certificate (or itself) and generate a certificate * @link http://www.php.net/manual/en/function.openssl-csr-sign.php * @param csr mixed* A CSR previously generated by openssl_csr_new. * It can also be the path to a PEM encoded CSR when specified as * file://path/to/csr or an exported string generated * by openssl_csr_export. *
* @param cacert mixed* The generated certificate will be signed by cacert. * If cacert is &null;, the generated certificate * will be a self-signed certificate. *
* @param priv_key mixed* priv_key is the private key that corresponds to * cacert. *
* @param days int* days specifies the length of time for which the * generated certificate will be valid, in days. *
* @param configargs array[optional]* You can finetune the CSR signing by configargs. * See openssl_csr_new for more information about * configargs. *
* @param serial int[optional]* An optional the serial number of issued certificate. If not specified * it will default to 0. *
* @return resource an x509 certificate resource on success, false on failure. */ function openssl_csr_sign ($csr, $cacert, $priv_key, $days, array $configargs = null, $serial = null) {} /** * Returns the subject of a CERT * @link http://www.php.net/manual/en/function.openssl-csr-get-subject.php * @param csr mixed * @param use_shortnames bool[optional] * @return array */ function openssl_csr_get_subject ($csr, $use_shortnames = null) {} /** * Returns the public key of a CERT * @link http://www.php.net/manual/en/function.openssl-csr-get-public-key.php * @param csr mixed * @param use_shortnames bool[optional] * @return resource */ function openssl_csr_get_public_key ($csr, $use_shortnames = null) {} /** * Computes a digest * @link http://www.php.net/manual/en/function.openssl-digest.php * @param data string* The data. *
* @param method string* The digest method. *
* @param raw_output bool[optional]* Setting to true will return as raw output data, otherwise the return * value is binhex encoded. *
* @return string the digested hash value on success&return.falseforfailure;. */ function openssl_digest ($data, $method, $raw_output = null) {} /** * Encrypts data * @link http://www.php.net/manual/en/function.openssl-encrypt.php * @param data string* The data. *
* @param method string* The cipher method. *
* @param password string* The password. *
* @param options int[optional]* options can be one of * OPENSSL_RAW_DATA, * OPENSSL_ZERO_PADDING. *
* @param iv string[optional]* A non-NULL Initialization Vector. *
* @return string the encrypted string on success&return.falseforfailure;. */ function openssl_encrypt ($data, $method, $password, $options = null, $iv = null) {} /** * Decrypts data * @link http://www.php.net/manual/en/function.openssl-decrypt.php * @param data string* The data. *
* @param method string* The cipher method. *
* @param password string* The password. *
* @param options int[optional]* options can be one of * OPENSSL_RAW_DATA, * OPENSSL_ZERO_PADDING. *
* @param iv string[optional]* A non-NULL Initialization Vector. *
* @return string The decrypted string on success&return.falseforfailure;. */ function openssl_decrypt ($data, $method, $password, $options = null, $iv = null) {} /** * Gets the cipher iv length * @link http://www.php.net/manual/en/function.openssl-cipher-iv-length.php * @param method string* The cipher method, see openssl_get_cipher_methods for a list of potential values. *
* @return int the cipher length on success, or false on failure. */ function openssl_cipher_iv_length ($method) {} /** * Generate signature * @link http://www.php.net/manual/en/function.openssl-sign.php * @param data string* The string of data you wish to sign *
* @param signature string* If the call was successful the signature is returned in * signature. *
* @param priv_key_id mixed* resource - a key, returned by openssl_get_privatekey *
** string - a PEM formatted key *
* @param signature_alg mixed[optional]* int - one of these Signature Algorithms. *
** string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384". *
* @return bool Returns true on success, false on failure. */ function openssl_sign ($data, &$signature, $priv_key_id, $signature_alg = null) {} /** * Verify signature * @link http://www.php.net/manual/en/function.openssl-verify.php * @param data string* The string of data used to generate the signature previously *
* @param signature string* A raw binary string, generated by openssl_sign or similar means *
* @param pub_key_id mixed* resource - a key, returned by openssl_get_publickey *
** string - a PEM formatted key, example, "-----BEGIN PUBLIC KEY----- * MIIBCgK..." *
* @param signature_alg mixed[optional]* int - one of these Signature Algorithms. *
** string - a valid string returned by openssl_get_md_methods example, "sha1WithRSAEncryption" or "sha512". *
* @return int 1 if the signature is correct, 0 if it is incorrect, and * -1 on error. */ function openssl_verify ($data, $signature, $pub_key_id, $signature_alg = null) {} /** * Seal (encrypt) data * @link http://www.php.net/manual/en/function.openssl-seal.php * @param data string*
* @param sealed_data string*
* @param env_keys array*
* @param pub_key_ids array*
* @param method string[optional] * @return int the length of the sealed data on success, or false on error. * If successful the sealed data is returned in * sealed_data, and the envelope keys in * env_keys. */ function openssl_seal ($data, &$sealed_data, array &$env_keys, array $pub_key_ids, $method = null) {} /** * Open sealed data * @link http://www.php.net/manual/en/function.openssl-open.php * @param sealed_data string*
* @param open_data string* If the call is successful the opened data is returned in this * parameter. *
* @param env_key string*
* @param priv_key_id mixed*
* @param method string[optional] * @return bool Returns true on success, false on failure. */ function openssl_open ($sealed_data, &$open_data, $env_key, $priv_key_id, $method = null) {} /** * Generates a PKCS5 v2 PBKDF2 string, defaults to SHA-1 * @link http://www.php.net/manual/en/function.openssl-pbkdf2.php * @param password string* *
* @param salt string* *
* @param key_length int* *
* @param iterations int* *
* @param digest_algorithm string[optional]* *
* @return string string&return.falseforfailure;. */ function openssl_pbkdf2 ($password, $salt, $key_length, $iterations, $digest_algorithm = null) {} /** * Verifies the signature of an S/MIME signed message * @link http://www.php.net/manual/en/function.openssl-pkcs7-verify.php * @param filename string* Path to the message. *
* @param flags int* flags can be used to affect how the signature is * verified - see PKCS7 constants * for more information. *
* @param outfilename string[optional]* If the outfilename is specified, it should be a * string holding the name of a file into which the certificates of the * persons that signed the messages will be stored in PEM format. *
* @param cainfo array[optional]* If the cainfo is specified, it should hold * information about the trusted CA certificates to use in the verification * process - see certificate * verification for more information about this parameter. *
* @param extracerts string[optional]* If the extracerts is specified, it is the filename * of a file containing a bunch of certificates to use as untrusted CAs. *
* @param content string[optional]* You can specify a filename with content that will * be filled with the verified data, but with the signature information * stripped. *
* @return mixed true if the signature is verified, false if it is not correct * (the message has been tampered with, or the signing certificate is invalid), * or -1 on error. */ function openssl_pkcs7_verify ($filename, $flags, $outfilename = null, array $cainfo = null, $extracerts = null, $content = null) {} /** * Decrypts an S/MIME encrypted message * @link http://www.php.net/manual/en/function.openssl-pkcs7-decrypt.php * @param infilename string*
* @param outfilename string* The decrypted message is written to the file specified by * outfilename. *
* @param recipcert mixed*
* @param recipkey mixed[optional]*
* @return bool Returns true on success, false on failure. */ function openssl_pkcs7_decrypt ($infilename, $outfilename, $recipcert, $recipkey = null) {} /** * Sign an S/MIME message * @link http://www.php.net/manual/en/function.openssl-pkcs7-sign.php * @param infilename string*
* @param outfilename string*
* @param signcert mixed*
* @param privkey mixed*
* @param headers array* headers is an array of headers that * will be prepended to the data after it has been signed (see * openssl_pkcs7_encrypt for more information about * the format of this parameter). *
* @param flags int[optional]* flags can be used to alter the output - see PKCS7 constants. *
* @param extracerts string[optional]* extracerts specifies the name of a file containing * a bunch of extra certificates to include in the signature which can for * example be used to help the recipient to verify the certificate that you used. *
* @return bool Returns true on success, false on failure. */ function openssl_pkcs7_sign ($infilename, $outfilename, $signcert, $privkey, array $headers, $flags = null, $extracerts = null) {} /** * Encrypt an S/MIME message * @link http://www.php.net/manual/en/function.openssl-pkcs7-encrypt.php * @param infile string*
* @param outfile string*
* @param recipcerts mixed* Either a lone X.509 certificate, or an array of X.509 certificates. *
* @param headers array* headers is an array of headers that * will be prepended to the data after it has been encrypted. *
** headers can be either an associative array * keyed by header name, or an indexed array, where each element contains * a single header line. *
* @param flags int[optional]* flags can be used to specify options that affect * the encoding process - see PKCS7 * constants. *
* @param cipherid int[optional]* One of cipher constants. *
* @return bool Returns true on success, false on failure. */ function openssl_pkcs7_encrypt ($infile, $outfile, $recipcerts, array $headers, $flags = null, $cipherid = null) {} /** * Encrypts data with private key * @link http://www.php.net/manual/en/function.openssl-private-encrypt.php * @param data string*
* @param crypted string*
* @param key mixed*
* @param padding int[optional]* padding can be one of * OPENSSL_PKCS1_PADDING, * OPENSSL_NO_PADDING. *
* @return bool Returns true on success, false on failure. */ function openssl_private_encrypt ($data, &$crypted, $key, $padding = null) {} /** * Decrypts data with private key * @link http://www.php.net/manual/en/function.openssl-private-decrypt.php * @param data string*
* @param decrypted string*
* @param key mixed* key must be the private key corresponding that * was used to encrypt the data. *
* @param padding int[optional]* padding can be one of * OPENSSL_PKCS1_PADDING, * OPENSSL_SSLV23_PADDING, * OPENSSL_PKCS1_OAEP_PADDING, * OPENSSL_NO_PADDING. *
* @return bool Returns true on success, false on failure. */ function openssl_private_decrypt ($data, &$decrypted, $key, $padding = null) {} /** * Encrypts data with public key * @link http://www.php.net/manual/en/function.openssl-public-encrypt.php * @param data string*
* @param crypted string* This will hold the result of the encryption. *
* @param key mixed* The public key. *
* @param padding int[optional]* padding can be one of * OPENSSL_PKCS1_PADDING, * OPENSSL_SSLV23_PADDING, * OPENSSL_PKCS1_OAEP_PADDING, * OPENSSL_NO_PADDING. *
* @return bool Returns true on success, false on failure. */ function openssl_public_encrypt ($data, &$crypted, $key, $padding = null) {} /** * Decrypts data with public key * @link http://www.php.net/manual/en/function.openssl-public-decrypt.php * @param data string*
* @param decrypted string*
* @param key mixed* key must be the public key corresponding that * was used to encrypt the data. *
* @param padding int[optional]* padding can be one of * OPENSSL_PKCS1_PADDING, * OPENSSL_NO_PADDING. *
* @return bool Returns true on success, false on failure. */ function openssl_public_decrypt ($data, &$decrypted, $key, $padding = null) {} /** * Gets available digest methods * @link http://www.php.net/manual/en/function.openssl-get-md-methods.php * @param aliases bool[optional]* Set to true if digest aliases should be included within the * returned array. *
* @return array An array of available digest methods. */ function openssl_get_md_methods ($aliases = null) {} /** * Gets available cipher methods * @link http://www.php.net/manual/en/function.openssl-get-cipher-methods.php * @param aliases bool[optional]* Set to true if cipher aliases should be included within the * returned array. *
* @return array An array of available cipher methods. */ function openssl_get_cipher_methods ($aliases = null) {} /** * Computes shared secret for public value of remote DH key and local DH key * @link http://www.php.net/manual/en/function.openssl-dh-compute-key.php * @param pub_key string* Public key *
* @param dh_key resource* DH key *
* @return string computed key on success&return.falseforfailure;. */ function openssl_dh_compute_key ($pub_key, $dh_key) {} /** * Generate a pseudo-random string of bytes * @link http://www.php.net/manual/en/function.openssl-random-pseudo-bytes.php * @param length int* The length of the desired string of bytes. Must be a positive integer. PHP will * try to cast this parameter to a non-null integer to use it. *
* @param crypto_strong bool[optional]* If passed into the function, this will hold a boolean value that determines * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, * passwords, etc. true if it did, otherwise false *
* @return string the generated &string; of bytes on success, &return.falseforfailure;. */ function openssl_random_pseudo_bytes ($length, &$crypto_strong = null) {} /** * Return openSSL error message * @link http://www.php.net/manual/en/function.openssl-error-string.php * @return string an error message string, or false if there are no more error * messages to return. */ function openssl_error_string () {} define ('OPENSSL_VERSION_TEXT', "OpenSSL 1.0.1e 11 Feb 2013"); define ('OPENSSL_VERSION_NUMBER', 268439647); define ('X509_PURPOSE_SSL_CLIENT', 1); define ('X509_PURPOSE_SSL_SERVER', 2); define ('X509_PURPOSE_NS_SSL_SERVER', 3); define ('X509_PURPOSE_SMIME_SIGN', 4); define ('X509_PURPOSE_SMIME_ENCRYPT', 5); define ('X509_PURPOSE_CRL_SIGN', 6); define ('X509_PURPOSE_ANY', 7); /** * Used as default algorithm by openssl_sign and * openssl_verify. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('OPENSSL_ALGO_SHA1', 1); define ('OPENSSL_ALGO_MD5', 2); define ('OPENSSL_ALGO_MD4', 3); define ('OPENSSL_ALGO_DSS1', 5); define ('OPENSSL_ALGO_SHA224', 6); define ('OPENSSL_ALGO_SHA256', 7); define ('OPENSSL_ALGO_SHA384', 8); define ('OPENSSL_ALGO_SHA512', 9); define ('OPENSSL_ALGO_RMD160', 10); /** * When signing a message, use cleartext signing with the MIME * type "multipart/signed". This is the default * if you do not specify any flags to * openssl_pkcs7_sign. * If you turn this option off, the message will be signed using * opaque signing, which is more resistant to translation by mail relays * but cannot be read by mail agents that do not support S/MIME. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_DETACHED', 64); /** * Adds text/plain content type headers to encrypted/signed * message. If decrypting or verifying, it strips those headers from * the output - if the decrypted or verified message is not of MIME type * text/plain then an error will occur. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_TEXT', 1); /** * When verifying a message, certificates (if * any) included in the message are normally searched for the * signing certificate. With this option only the * certificates specified in the extracerts * parameter of openssl_pkcs7_verify are * used. The supplied certificates can still be used as * untrusted CAs however. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_NOINTERN', 16); /** * Do not verify the signers certificate of a signed * message. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_NOVERIFY', 32); /** * Do not chain verification of signers certificates: that is * don't use the certificates in the signed message as untrusted CAs. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_NOCHAIN', 8); /** * When signing a message the signer's certificate is normally * included - with this option it is excluded. This will reduce the * size of the signed message but the verifier must have a copy of the * signers certificate available locally (passed using the * extracerts to * openssl_pkcs7_verify for example). * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_NOCERTS', 2); /** * Normally when a message is signed, a set of attributes are * included which include the signing time and the supported symmetric * algorithms. With this option they are not included. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_NOATTR', 256); /** * Normally the input message is converted to "canonical" format * which is effectively using CR and LF * as end of line: as required by the S/MIME specification. When this * option is present, no translation occurs. This is useful when * handling binary data which may not be in MIME format. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_BINARY', 128); /** * Don't try and verify the signatures on a message * @link http://www.php.net/manual/en/openssl.constants.php */ define ('PKCS7_NOSIGS', 4); define ('OPENSSL_PKCS1_PADDING', 1); define ('OPENSSL_SSLV23_PADDING', 2); define ('OPENSSL_NO_PADDING', 3); define ('OPENSSL_PKCS1_OAEP_PADDING', 4); define ('OPENSSL_DEFAULT_STREAM_CIPHERS', "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128:AES256:HIGH:!SSLv2:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!RC4:!ADH"); define ('OPENSSL_CIPHER_RC2_40', 0); define ('OPENSSL_CIPHER_RC2_128', 1); define ('OPENSSL_CIPHER_RC2_64', 2); define ('OPENSSL_CIPHER_DES', 3); define ('OPENSSL_CIPHER_3DES', 4); define ('OPENSSL_CIPHER_AES_128_CBC', 5); define ('OPENSSL_CIPHER_AES_192_CBC', 6); define ('OPENSSL_CIPHER_AES_256_CBC', 7); define ('OPENSSL_KEYTYPE_RSA', 0); define ('OPENSSL_KEYTYPE_DSA', 1); define ('OPENSSL_KEYTYPE_DH', 2); /** * This constant is only available when PHP is compiled with OpenSSL 0.9.8+. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('OPENSSL_KEYTYPE_EC', 3); define ('OPENSSL_RAW_DATA', 1); define ('OPENSSL_ZERO_PADDING', 2); /** * Whether SNI support is available or not. * @link http://www.php.net/manual/en/openssl.constants.php */ define ('OPENSSL_TLSEXT_SERVER_NAME', 1); // End of openssl v. ?>