www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
mime_body
mime_part
mime_tree
nntp_auth_get
nntp_auth_post
nntp_get
nntp_post
pem_certificates_to_...
pop3_get
smime_decrypt
smime_encrypt
smime_sign
smime_verify
smtp_send
uuvalidate
Miscellaneous
Number
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
VAD
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

smime_verify

Verifies signature of signed MIME message
varchar smime_verify (in msg_text varchar, in certs any, [out signer_certs any], [in flags integer]);
Description

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.

Parameters
msg_text – The text of the message
certs – array of strings containing CA certificates
signer_certs – for receipt of PEM encoded certificates
flags – A bitmask. See table below for valid mask values. Default is 0.
Table: 22.1. Bit values for flags
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

Return Types

If the signer_certs is supplied, an array of PEM encoded certificates of the signers is returned.

Examples
Verifying a Signed MIME Message

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
_______________________________________________________________________________
See Also

smime_sign

smime_encrypt

smime_decrypt

pem_certificates_to_array