S/MIME utilities.
More...
|
static int | Extract (const std::string &outputFile, const std::string &inputFile, Encoding encoding=Encoding::Default) |
| Extract the body from an S/MIME entity. More...
|
|
static std::string | Query (const std::string &inputFile, const std::string &query) |
| Query an S/MIME entity for selected information. More...
|
|
static int | Wrap (const std::string &outputFile, const std::string &inputFile, Encoding encoding=Encoding::Default, AdvOpts advopts=AdvOpts::Default) |
| Wrap a CMS object in an S/MIME entity. More...
|
|
◆ AdvOpts
Advanced options for S/MIME output.
Enumerator |
---|
Default | Default options.
|
Default | Default encoding.
|
AddX | Add an "x-" to the content subtype (for compatibility with legacy applications)
|
◆ Encoding
Encodings for output.
Enumerator |
---|
Default | Default encoding.
|
Base64 | Encode body in base64
|
Binary | Encode body in binary.
|
◆ Extract()
static int dipki::Smime::Extract |
( |
const std::string & |
outputFile, |
|
|
const std::string & |
inputFile, |
|
|
Encoding |
encoding = Encoding::Default |
|
) |
| |
|
static |
Extract the body from an S/MIME entity.
- Parameters
-
outputFile | Name of output file to be created |
inputFile | Name of input file containing S/MIME entity |
encoding | Output encoding (default = binary) |
- Returns
- A positive number giving the size of the output file in bytes, or a negative error code.
◆ Query()
static std::string dipki::Smime::Query |
( |
const std::string & |
inputFile, |
|
|
const std::string & |
query |
|
) |
| |
|
static |
Query an S/MIME entity for selected information.
- Parameters
-
inputFile | Name of file containing S/MIME entity |
query | Query string (case insensitive) |
- Returns
- String containing the result or an empty string if not found or error.
◆ Wrap()
static int dipki::Smime::Wrap |
( |
const std::string & |
outputFile, |
|
|
const std::string & |
inputFile, |
|
|
Encoding |
encoding = Encoding::Default , |
|
|
AdvOpts |
advopts = AdvOpts::Default |
|
) |
| |
|
static |
Wrap a CMS object in an S/MIME entity.
- Parameters
-
outputFile | Output file to be created |
inputFile | Input file containing CMS object |
encoding | Output encoding (default = binary) |
advopts | Advanced options. Use AdvOpts::AddX to add an "x-" to the content subtype, e.g. application/x-pkcs7-mime for compatibilty with legacy applications. |
- Returns
- A positive number giving the size of the output file in bytes, or a negative error code.