1<?php 2 3/** @generate-function-entries */ 4 5final class OpenSSLCertificate 6{ 7} 8 9final class OpenSSLCertificateSigningRequest 10{ 11} 12 13final class OpenSSLAsymmetricKey 14{ 15} 16 17function openssl_x509_export_to_file(OpenSSLCertificate|string $certificate, string $output_filename, bool $no_text = true): bool {} 18 19/** @param string $output */ 20function openssl_x509_export(OpenSSLCertificate|string $certificate, &$output, bool $no_text = true): bool {} 21 22function openssl_x509_fingerprint(OpenSSLCertificate|string $certificate, string $digest_algo = "sha1", bool $binary = false): string|false {} 23 24/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ 25function openssl_x509_check_private_key(OpenSSLCertificate|string $certificate, $private_key): bool {} 26 27/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key */ 28function openssl_x509_verify(OpenSSLCertificate|string $certificate, $public_key): int {} 29 30function openssl_x509_parse(OpenSSLCertificate|string $certificate, bool $short_names = true): array|false {} 31 32function openssl_x509_checkpurpose(OpenSSLCertificate|string $certificate, int $purpose, array $ca_info = [], ?string $untrusted_certificates_file = null): bool|int {} 33 34function openssl_x509_read(OpenSSLCertificate|string $certificate): OpenSSLCertificate|false {} 35 36/** @deprecated */ 37function openssl_x509_free(OpenSSLCertificate $certificate): void {} 38 39/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ 40function openssl_pkcs12_export_to_file(OpenSSLCertificate|string $certificate, string $output_filename, $private_key, string $passphrase, array $options = []): bool {} 41 42/** 43 * @param string $output 44 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key 45 */ 46function openssl_pkcs12_export(OpenSSLCertificate|string $certificate, &$output, $private_key, string $passphrase, array $options = []): bool {} 47 48/** @param array $certificates */ 49function openssl_pkcs12_read(string $pkcs12, &$certificates, string $passphrase): bool {} 50 51function openssl_csr_export_to_file(OpenSSLCertificateSigningRequest|string $csr, string $output_filename, bool $no_text = true): bool {} 52 53/** @param string $output */ 54function openssl_csr_export(OpenSSLCertificateSigningRequest|string $csr, &$output, bool $no_text = true): bool {} 55 56/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ 57function openssl_csr_sign(OpenSSLCertificateSigningRequest|string $csr, OpenSSLCertificate|string|null $ca_certificate, $private_key, int $days, ?array $options = null, int $serial = 0): OpenSSLCertificate|false {} 58 59/** @param OpenSSLAsymmetricKey $private_key */ 60function openssl_csr_new(array $distinguished_names, &$private_key, ?array $options = null, ?array $extra_attributes = null): OpenSSLCertificateSigningRequest|false {} 61 62function openssl_csr_get_subject(OpenSSLCertificateSigningRequest|string $csr, bool $short_names = true): array|false {} 63 64function openssl_csr_get_public_key(OpenSSLCertificateSigningRequest|string $csr, bool $short_names = true): OpenSSLAsymmetricKey|false {} 65 66function openssl_pkey_new(?array $options = null): OpenSSLAsymmetricKey|false {} 67 68/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $key */ 69function openssl_pkey_export_to_file($key, string $output_filename, ?string $passphrase = null, ?array $options = null): bool {} 70 71/** 72 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $key 73 * @param string $output 74 */ 75function openssl_pkey_export($key, &$output, ?string $passphrase = null, ?array $options = null): bool {} 76 77/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key */ 78function openssl_pkey_get_public($public_key): OpenSSLAsymmetricKey|false {} 79 80/** 81 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key 82 * @alias openssl_pkey_get_public 83 */ 84function openssl_get_publickey($public_key): OpenSSLAsymmetricKey|false {} 85 86/** @deprecated */ 87function openssl_pkey_free(OpenSSLAsymmetricKey $key): void {} 88 89/** 90 * @alias openssl_pkey_free 91 * @deprecated 92 */ 93function openssl_free_key(OpenSSLAsymmetricKey $key): void {} 94 95/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ 96function openssl_pkey_get_private($private_key, ?string $passphrase = null): OpenSSLAsymmetricKey|false {} 97 98/** 99 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key 100 * @alias openssl_pkey_get_private 101 */ 102function openssl_get_privatekey($private_key, ?string $passphrase = null): OpenSSLAsymmetricKey|false {} 103 104function openssl_pkey_get_details(OpenSSLAsymmetricKey $key): array|false {} 105 106function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = "sha1"): string|false {} 107 108function openssl_pkcs7_verify(string $input_filename, int $flags, ?string $signers_certificates_filename = null, array $ca_info = [], ?string $untrusted_certificates_filename = null, ?string $content = null, ?string $output_filename = null): bool|int {} 109 110/** @param OpenSSLCertificate|array|string $certificate */ 111function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $cipher_algo = OPENSSL_CIPHER_RC2_40): bool {} 112 113/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ 114function openssl_pkcs7_sign(string $input_filename, string $output_filename, OpenSSLCertificate|string $certificate, $private_key, ?array $headers, int $flags = PKCS7_DETACHED, ?string $untrusted_certificates_filename = null): bool {} 115 116/** 117 * @param OpenSSLCertificate|string $certificate 118 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null $private_key 119 */ 120function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null): bool {} 121 122/** @param array $certificates */ 123function openssl_pkcs7_read(string $data, &$certificates): bool {} 124 125function openssl_cms_verify(string $input_filename, int $flags = 0, ?string $certificates = null, array $ca_info = [], ?string $untrusted_certificates_filename = null, ?string $content = null, ?string $pk7 = null, ?string $sigfile = null, int $encoding = OPENSSL_ENCODING_SMIME): bool {} 126 127/** @param OpenSSLCertificate|array|string $certificate */ 128function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algo = OPENSSL_CIPHER_RC2_40): bool {} 129 130/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key */ 131function openssl_cms_sign(string $input_filename, string $output_filename, OpenSSLCertificate|string $certificate, $private_key, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, ?string $untrusted_certificates_filename = null): bool {} 132 133/** 134 * @param OpenSSLCertificate|string $certificate 135 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null $private_key 136 */ 137function openssl_cms_decrypt(string $input_filename, string $output_filename, $certificate, $private_key = null, int $encoding = OPENSSL_ENCODING_SMIME): bool {} 138 139/** @param array $certificates */ 140function openssl_cms_read(string $input_filename, &$certificates): bool {} 141 142/** 143 * @param string $encrypted_data 144 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key 145 */ 146function openssl_private_encrypt(string $data, &$encrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING): bool {} 147 148/** 149 * @param string $decrypted_data 150 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key 151 */ 152function openssl_private_decrypt(string $data, &$decrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING): bool {} 153 154/** 155 * @param string $encrypted_data 156 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key 157 */ 158function openssl_public_encrypt(string $data, &$encrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING): bool {} 159 160/** 161 * @param string $decrypted_data 162 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key 163 */ 164function openssl_public_decrypt(string $data, &$decrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING): bool {} 165 166function openssl_error_string(): string|false {} 167 168/** 169 * @param string $signature 170 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key 171 */ 172function openssl_sign(string $data, &$signature, $private_key, string|int $algorithm = OPENSSL_ALGO_SHA1): bool {} 173 174/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key */ 175function openssl_verify(string $data, string $signature, $public_key, string|int $algorithm = OPENSSL_ALGO_SHA1): int|false {} 176 177/** 178 * @param string $sealed_data 179 * @param array $encrypted_keys 180 * @param string $iv 181 */ 182function openssl_seal(string $data, &$sealed_data, &$encrypted_keys, array $public_key, string $cipher_algo, &$iv = null): int|false {} 183 184/** 185 * @param string $output 186 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key 187 */ 188function openssl_open(string $data, &$output, string $encrypted_key, $private_key, string $cipher_algo, ?string $iv = null): bool {} 189 190function openssl_get_md_methods(bool $aliases = false): array {} 191 192function openssl_get_cipher_methods(bool $aliases = false): array {} 193 194#ifdef HAVE_EVP_PKEY_EC 195function openssl_get_curve_names(): array|false {} 196#endif 197 198function openssl_digest(string $data, string $digest_algo, bool $binary = false): string|false {} 199 200/** @param string $tag */ 201function openssl_encrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", &$tag = null, string $aad = "", int $tag_length = 16): string|false {} 202 203function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, int $options = 0, string $iv = "", string $tag = "", string $aad = ""): string|false {} 204 205function openssl_cipher_iv_length(string $cipher_algo): int|false {} 206 207function openssl_dh_compute_key(string $public_key, OpenSSLAsymmetricKey $private_key): string|false {} 208 209/** 210 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $public_key 211 * @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key 212 */ 213function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): string|false {} 214 215/** @param bool $strong_result */ 216function openssl_random_pseudo_bytes(int $length, &$strong_result = null): string {} 217 218function openssl_spki_new(OpenSSLAsymmetricKey $private_key, string $challenge, int $digest_algo = OPENSSL_ALGO_MD5): string|false {} 219 220function openssl_spki_verify(string $spki): bool {} 221 222function openssl_spki_export(string $spki): string|false {} 223 224function openssl_spki_export_challenge(string $spki): string|false {} 225 226function openssl_get_cert_locations(): array {} 227