生成数字证书并设置密码
# generate new .crt file, it's contained certificate & private key
openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout filename.crt -out filename.crt
# convert .crt to binar .p12 file
openssl pkcs12 -export -in tcpdf.crt -out filename.p12
# get private key from .p12 file, it will ask for passphrase/password, so the generated private key will be encrypted
openssl pkcs12 -in filename.p12 -nocerts -out filename.key
# get certificate from .p12 file
openssl pkcs12 -in filename.p12 -clcerts -nokeys -out filename.crt
利用TCPDF 签名
<?php
/** @var TCPDF $pdf */
$pdf->setSignature('file://PATH-TO-CRT-FILE', 'file://PATH-TO-PRIVATE-KEY-FILE', 'PRIVATE-KEY-FILE-PASSPHRASE', '', 2, $info);
github地址https://github.com/harryosmar/php-pdf-digital-signature
网友回复
有没有哪个ai人工智能动态生成鲜活带表情肢体动作逼真数字人与人类交流视频聊天?
threejs如何将iframe与video作为立方体模型一面的材质可点击交互?
UEFI与Legacy启动有啥不同?
可在u盘启动的开源匿名操作系统有哪些?
Pyloid与Pywebview打包生成桌面应用区别?
win10的iso镜像如何通过u盘来安装?
如何解决输入sora2邀请码报错:Sora is not available in The Netherlands yet
在哪可免费白嫖使用sora2生成视频?
php如何结合openai兼容的embedding向量化api实现语义化模糊关键词搜索匹配?
python如何结合qwen embedding向量化api实现语义化模糊关键词搜索匹配?