This function takes the RFC822 text of an e-mail containing an S/MIME signed message and verifies it's signature using the CA certificates in certs, which is an array of strings containing single or multiple PEM-encoded certificates.
| Mask | Name | Description |
|---|---|---|
| 0x1 | PKCS7_TEXT | strip the text/plain content type header (if present). If no such header generate an error. |
| 0x4 | PKCS7_NOSIGS | don't verify the signatures |
| 0x8 | PKCS7_NOCHAIN | don't descend into the signer's certificate chain when verifying |
| 0x10 | PKCS7_NOINTERN | return only non-internal certificates in signer_certs |
| 0x20 | PKCS7_NOVERIFY | don't verify the signer's certificates |
If the signer_certs is supplied, an array of PEM encoded certificates of the signers is returned.
| SQLState | Error Code | Error Text | Description |
|---|---|---|---|
Example (where signed.eml contains the output from smime_sign.
select smime_verify (file_to_string ('signed.eml'),
vector (file_to_string ('thwate_ca.pem')), NULL, 1)
_______________________________________________________________________________
just a test
_______________________________________________________________________________