|
gSOAP WS-Security 2.8 Stable
|
#include "stdsoap2.h"

Classes | |
| struct | soap_mec_data |
| The mecevp engine context data. More... | |
Defines | |
| #define | SOAP_MEC_KEY_TYPE EVP_PKEY |
| #define | SOAP_MEC_NONE (0) |
| #define | SOAP_MEC_DES_CBC (0x0010) |
| #define | SOAP_MEC_AES128_CBC (0x0020) |
| #define | SOAP_MEC_AES192_CBC (0x0040) |
| #define | SOAP_MEC_AES256_CBC (0x0080) |
| #define | SOAP_MEC_AES512_CBC (0x0100) |
| #define | SOAP_MEC_ENC (0x1000) |
| #define | SOAP_MEC_ENV (0x2000) |
| #define | SOAP_MEC_MASK (0xFFFF) |
| #define | SOAP_MEC_STORE (0x010000) |
| #define | SOAP_MEC_OAEP (0x020000) |
| #define | SOAP_MEC_ENC_DES_CBC (SOAP_MEC_DES_CBC | SOAP_MEC_ENC) |
| #define | SOAP_MEC_ENC_AES128_CBC (SOAP_MEC_AES128_CBC | SOAP_MEC_ENC) |
| #define | SOAP_MEC_ENC_AES192_CBC (SOAP_MEC_AES192_CBC | SOAP_MEC_ENC) |
| #define | SOAP_MEC_ENC_AES256_CBC (SOAP_MEC_AES256_CBC | SOAP_MEC_ENC) |
| #define | SOAP_MEC_ENC_AES512_CBC (SOAP_MEC_AES512_CBC | SOAP_MEC_ENC) |
| #define | SOAP_MEC_DEC_DES_CBC (SOAP_MEC_DES_CBC) |
| #define | SOAP_MEC_DEC_AES128_CBC (SOAP_MEC_AES128_CBC) |
| #define | SOAP_MEC_DEC_AES192_CBC (SOAP_MEC_AES192_CBC) |
| #define | SOAP_MEC_DEC_AES256_CBC (SOAP_MEC_AES256_CBC) |
| #define | SOAP_MEC_DEC_AES512_CBC (SOAP_MEC_AES512_CBC) |
| #define | SOAP_MEC_ENV_ENC_DES_CBC (SOAP_MEC_ENC_DES_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_ENC_AES128_CBC (SOAP_MEC_ENC_AES128_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_ENC_AES192_CBC (SOAP_MEC_ENC_AES192_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_ENC_AES256_CBC (SOAP_MEC_ENC_AES256_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_ENC_AES512_CBC (SOAP_MEC_ENC_AES512_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_DEC_DES_CBC (SOAP_MEC_DEC_DES_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_DEC_AES128_CBC (SOAP_MEC_DEC_AES128_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_DEC_AES192_CBC (SOAP_MEC_DEC_AES192_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_DEC_AES256_CBC (SOAP_MEC_DEC_AES256_CBC | SOAP_MEC_ENV) |
| #define | SOAP_MEC_ENV_DEC_AES512_CBC (SOAP_MEC_DEC_AES512_CBC | SOAP_MEC_ENV) |
Enumerations | |
| enum | SOAP_MEC_STATE { SOAP_MEC_STATE_NONE, SOAP_MEC_STATE_INIT, SOAP_MEC_STATE_IV, SOAP_MEC_STATE_DECRYPT, SOAP_MEC_STATE_FINAL, SOAP_MEC_STATE_FLUSH } |
Functions | |
| int | soap_mec_begin (struct soap *soap, struct soap_mec_data *data, int alg, SOAP_MEC_KEY_TYPE *pkey, unsigned char *key, int *keylen) |
| Initialize the mecevp engine data and begin encryption or decryption message sequence using a private/public key or symmetric secret key. | |
| int | soap_mec_start_alg (struct soap *soap, int alg, const unsigned char *key) |
| Start encryption or decryption of current message. If key is non-NULL, use the symmetric triple DES key. Use soap_mec_start only after soap_mec_begin. The soap_mec_start should be followed by a soap_mec_stop call. | |
| int | soap_mec_start (struct soap *soap, const unsigned char *key) |
| Start encryption or decryption of current message. If key is non-NULL, use the symmetric triple DES key. Use soap_mec_start only after soap_mec_begin. The soap_mec_start should be followed by a soap_mec_stop call. | |
| int | soap_mec_stop (struct soap *soap) |
| Stops encryption or decryption of current message. Use after soap_mec_start. | |
| int | soap_mec_end (struct soap *soap, struct soap_mec_data *data) |
| Ends encryption or decryption of a sequence of message parts that began with soap_mec_begin. | |
| size_t | soap_mec_size (int alg, SOAP_MEC_KEY_TYPE *pkey) |
| Returns the number of octets needed to store the public/private key or the symmetric key, depending on the algorithm. | |
| int | soap_mec_init (struct soap *soap, struct soap_mec_data *data, int alg, SOAP_MEC_KEY_TYPE *pkey, unsigned char *key, int *keylen) |
| Initialize mecevp engine state and create context for encryption/decryption algorithm using a private/public key or symmetric secret key. | |
| int | soap_mec_update (struct soap *soap, struct soap_mec_data *data, const char **s, size_t *n) |
| Update mecevp engine state: encrypts plain text (or raw data) or decrypts cipher data in base64 format. | |
| int | soap_mec_final (struct soap *soap, struct soap_mec_data *data, const char **s, size_t *n) |
| Ends mecevp engine state: encrypt/decrypt remainder from buffers. | |
| void | soap_mec_cleanup (struct soap *soap, struct soap_mec_data *data) |
| Clean up mecevp engine and deallocate cipher context and buffers. | |
| #define SOAP_MEC_AES128_CBC (0x0020) |
Cipher type (AES128 CBC)
| #define SOAP_MEC_AES192_CBC (0x0040) |
Cipher type (AES192 CBC)
| #define SOAP_MEC_AES256_CBC (0x0080) |
Cipher type (AES256 CBC)
| #define SOAP_MEC_AES512_CBC (0x0100) |
Cipher type (AES512 CBC)
| #define SOAP_MEC_DEC_AES128_CBC (SOAP_MEC_AES128_CBC) |
| #define SOAP_MEC_DEC_AES192_CBC (SOAP_MEC_AES192_CBC) |
| #define SOAP_MEC_DEC_AES256_CBC (SOAP_MEC_AES256_CBC) |
| #define SOAP_MEC_DEC_AES512_CBC (SOAP_MEC_AES512_CBC) |
| #define SOAP_MEC_DEC_DES_CBC (SOAP_MEC_DES_CBC) |
Symmetric secret key decryption
| #define SOAP_MEC_DES_CBC (0x0010) |
Cipher type (triple DES CBC)
| #define SOAP_MEC_ENC (0x1000) |
Encode mode
| #define SOAP_MEC_ENC_AES128_CBC (SOAP_MEC_AES128_CBC | SOAP_MEC_ENC) |
| #define SOAP_MEC_ENC_AES192_CBC (SOAP_MEC_AES192_CBC | SOAP_MEC_ENC) |
| #define SOAP_MEC_ENC_AES256_CBC (SOAP_MEC_AES256_CBC | SOAP_MEC_ENC) |
| #define SOAP_MEC_ENC_AES512_CBC (SOAP_MEC_AES512_CBC | SOAP_MEC_ENC) |
| #define SOAP_MEC_ENC_DES_CBC (SOAP_MEC_DES_CBC | SOAP_MEC_ENC) |
Symmetric secret key encryption
| #define SOAP_MEC_ENV (0x2000) |
Envelope mode
| #define SOAP_MEC_ENV_DEC_AES128_CBC (SOAP_MEC_DEC_AES128_CBC | SOAP_MEC_ENV) |
| #define SOAP_MEC_ENV_DEC_AES192_CBC (SOAP_MEC_DEC_AES192_CBC | SOAP_MEC_ENV) |
| #define SOAP_MEC_ENV_DEC_AES256_CBC (SOAP_MEC_DEC_AES256_CBC | SOAP_MEC_ENV) |
| #define SOAP_MEC_ENV_DEC_AES512_CBC (SOAP_MEC_DEC_AES512_CBC | SOAP_MEC_ENV) |
| #define SOAP_MEC_ENV_DEC_DES_CBC (SOAP_MEC_DEC_DES_CBC | SOAP_MEC_ENV) |
Envelope (using RSA private key) decryption
| #define SOAP_MEC_ENV_ENC_AES128_CBC (SOAP_MEC_ENC_AES128_CBC | SOAP_MEC_ENV) |
| #define SOAP_MEC_ENV_ENC_AES192_CBC (SOAP_MEC_ENC_AES192_CBC | SOAP_MEC_ENV) |
| #define SOAP_MEC_ENV_ENC_AES256_CBC (SOAP_MEC_ENC_AES256_CBC | SOAP_MEC_ENV) |
| #define SOAP_MEC_ENV_ENC_AES512_CBC (SOAP_MEC_ENC_AES512_CBC | SOAP_MEC_ENV) |
| #define SOAP_MEC_ENV_ENC_DES_CBC (SOAP_MEC_ENC_DES_CBC | SOAP_MEC_ENV) |
Envelope (using RSA public key) encryption
| #define SOAP_MEC_KEY_TYPE EVP_PKEY |
Expose EVP_PKEY in a portable representation
| #define SOAP_MEC_MASK (0xFFFF) |
Mask
| #define SOAP_MEC_NONE (0) |
Engine off
| #define SOAP_MEC_OAEP (0x020000) |
RSA-OAEP padding
| #define SOAP_MEC_STORE (0x010000) |
Enable store (in buffer) instead of streaming mode
| enum SOAP_MEC_STATE |
| int soap_mec_begin | ( | struct soap * | soap, |
| struct soap_mec_data * | data, | ||
| int | alg, | ||
| SOAP_MEC_KEY_TYPE * | pkey, | ||
| unsigned char * | key, | ||
| int * | keylen | ||
| ) |
Initialize the mecevp engine data and begin encryption or decryption message sequence using a private/public key or symmetric secret key.
| soap | context | |
| [in,out] | data | mecevp engine context |
| [in] | alg | encryption/decryption algorithm |
| [in] | pkey | public/private key or NULL |
| [in,out] | key | secret key or encrypted ephemeral secret key set with envelope encryption, or NULL |
| [in,out] | keylen | secret key length |
| void soap_mec_cleanup | ( | struct soap * | soap, |
| struct soap_mec_data * | data | ||
| ) |
Clean up mecevp engine and deallocate cipher context and buffers.
| soap | context | |
| [in,out] | data | mecevp engine context |
| int soap_mec_end | ( | struct soap * | soap, |
| struct soap_mec_data * | data | ||
| ) |
Ends encryption or decryption of a sequence of message parts that began with soap_mec_begin.
| soap | context | |
| [in,out] | data | mecevp engine context |
| int soap_mec_final | ( | struct soap * | soap, |
| struct soap_mec_data * | data, | ||
| const char ** | s, | ||
| size_t * | n | ||
| ) |
Ends mecevp engine state: encrypt/decrypt remainder from buffers.
| soap | context | |
| [in,out] | data | mecevp engine context |
| [out] | s | afterwards points to converted remaining data in streaming mode, or entire converted data in buffer mode (SOAP_MEC_STORE option) |
| [out] | n | afterwards size of remaining data |
| int soap_mec_init | ( | struct soap * | soap, |
| struct soap_mec_data * | data, | ||
| int | alg, | ||
| SOAP_MEC_KEY_TYPE * | pkey, | ||
| unsigned char * | key, | ||
| int * | keylen | ||
| ) |
Initialize mecevp engine state and create context for encryption/decryption algorithm using a private/public key or symmetric secret key.
| soap | context | |
| [in,out] | data | mecevp engine context |
| [in] | alg | encryption/decryption algorithm |
| [in] | pkey | public/private key or NULL |
| [in,out] | key | secret key or encrypted ephemeral secret key set with envelope encryption, or NULL |
| [in,out] | keylen | secret key length |
| size_t soap_mec_size | ( | int | alg, |
| SOAP_MEC_KEY_TYPE * | pkey | ||
| ) |
Returns the number of octets needed to store the public/private key or the symmetric key, depending on the algorithm.
| [in] | alg | is the algorithm to be used |
| [in] | pkey | is a pointer to an EVP_PKEY object or NULL for symmetric keys |
| int soap_mec_start | ( | struct soap * | soap, |
| const unsigned char * | key | ||
| ) |
Start encryption or decryption of current message. If key is non-NULL, use the symmetric triple DES key. Use soap_mec_start only after soap_mec_begin. The soap_mec_start should be followed by a soap_mec_stop call.
| soap | context | |
| [in] | key | secret triple DES key or NULL |
| int soap_mec_start_alg | ( | struct soap * | soap, |
| int | alg, | ||
| const unsigned char * | key | ||
| ) |
Start encryption or decryption of current message. If key is non-NULL, use the symmetric triple DES key. Use soap_mec_start only after soap_mec_begin. The soap_mec_start should be followed by a soap_mec_stop call.
| soap | context | |
| [in] | alg | algorithm |
| [in] | key | secret triple DES key or NULL |
| int soap_mec_stop | ( | struct soap * | soap | ) |
Stops encryption or decryption of current message. Use after soap_mec_start.
| soap | context |
| int soap_mec_update | ( | struct soap * | soap, |
| struct soap_mec_data * | data, | ||
| const char ** | s, | ||
| size_t * | n | ||
| ) |
Update mecevp engine state: encrypts plain text (or raw data) or decrypts cipher data in base64 format.
| soap | context | |
| [in,out] | data | mecevp engine context |
| [in,out] | s | input data to convert, afterwards points to converted data (original content is unchanged) |
| [in,out] | n | size of input, afterwards size of output |
1.7.4