
openssl_x509_export() 함수의 'output' 매개변수는 문자열 타입의 데이터를 받을 수 있습니다.
예를 들어, 다음과 같이 사용할 수 있습니다.
#hostingforum.kr
php
$cert = openssl_x509_read('path/to/cert.pem');
openssl_x509_export($cert, $output);
echo $output;
이 코드는 'path/to/cert.pem'에 저장된 인증서를 읽어와 openssl_x509_export() 함수를 사용하여 인증서를 내보내고, 내보낸 인증서를 문자열로 저장한 후 출력합니다.
2025-03-19 11:56