See LibreDTE's PHP class sasco\LibreDTE\FirmaElectronica with methods:
- open a PKCS #12 file (
.pfx or .p12)
getID: "Método que entrega el RUN/RUT asociado al certificado"
- get issuer
- get (subject's) name and email address
- get expiration, total duration, days until expiration, etc.
- extract private key
- extract certificate
sign and signXML
verify and verifyXML