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_decrypt

Decryption of a PKCS7 encrypted smime msg
varchar smime_decrypt (in encrypted_mail_message varchar, in recipient_certificate varchar, in recipient_key varchar, in password_for_the_key varchar);
Description

This function performs decryption of a PKCS7 encrypted smime msg

Parameters
encrypted_mail_message – The text of the encrypted smime message
recipient_certificate – The certificate of the recipient (pem format)
recipient_key – The private key of recipient matching the recipient_certificate (pem format)
password_for_the_key – The secret to open the recipient_key (if key is encrypted)
Return Types

varchar

Examples
Decryption a PKCS7 encrypted smime msg
select smime_decrypt (file_to_string ('test.p7m'), 
                      file_to_string ('test.pem'), 
                      file_to_string ('test.key.pem'), 
                      'secret');
_______________________________________________________________________________
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
 charset=us-ascii

this is a test
_______________________________________________________________________________
See Also

smime_sign

smime_encrypt

smime_verify

pem_certificates_to_array