openssl_pkey_export_to_file
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
openssl_pkey_export_to_file — 키의 내보내기 가능한 표현을 파일로 가져옵니다.
설명
openssl_pkey_export_to_file( OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $key, string $output_filename, ?string $passphrase = null, ?array $options = null ): bool
openssl_pkey_export_to_file()은 ASCII 무장(PEM 인코딩) key
변환을 output_filename
으로 명명된 파일에 저장합니다.
참고: 이 함수가 올바르게 작동하려면 유효한 openssl.cnf가 설치되어 있어야 합니다. 자세한 내용은 설치 섹션 아래의 참고 사항을 참조하십시오.
매개변수
key
output_filename
- 출력 파일의 경로입니다.
passphrase
- 키는 선택적으로
passphrase
로 보호할 수 있습니다. options
options
을 사용하여 openssl 구성 파일에 대한 옵션을 지정 및/또는 재정의하여 내보내기 프로세스를 미세 조정할 수 있습니다.options
에 대한 자세한 내용은 openssl_csr_new()를 참조하십시오.
반환 값
성공하면 true
를, 실패하면 false
를 반환합니다.
변경 로그
버전 | 설명 |
---|---|
8.0.0 | key 는 이제 OpenSSLAsymmetricKey 또는 OpenSSLCertificate 인스턴스를 허용합니다. 이전에는 OpenSSL key |