gSOAP WS-Security: /Users/engelen/Projects/gsoap/plugin/mecevp.h File Reference
Main Page | Class List | File List | Class Members | File Members | Related Pages

/Users/engelen/Projects/gsoap/plugin/mecevp.h File Reference

#include "stdsoap2.h"

Include dependency graph for mecevp.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

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   (0x10)
#define SOAP_MEC_ENC   (0x20)
#define SOAP_MEC_ENV   (0x40)
#define SOAP_MEC_STORE   (0x80)
#define SOAP_MEC_ENC_DES_CBC   (SOAP_MEC_DES_CBC | SOAP_MEC_ENC)
#define SOAP_MEC_DEC_DES_CBC   (SOAP_MEC_DES_CBC)
#define SOAP_MEC_ENV_ENC_DES_CBC   (SOAP_MEC_ENC_DES_CBC | SOAP_MEC_ENV)
#define SOAP_MEC_ENV_DEC_DES_CBC   (SOAP_MEC_DEC_DES_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 (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 triple DES 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 Documentation

#define SOAP_MEC_DEC_DES_CBC   (SOAP_MEC_DES_CBC)
 

Symmetric secret key decryption

#define SOAP_MEC_DES_CBC   (0x10)
 

Cipher type (triple DES CBC)

#define SOAP_MEC_ENC   (0x20)
 

Encode or decode mode

#define SOAP_MEC_ENC_DES_CBC   (SOAP_MEC_DES_CBC | SOAP_MEC_ENC)
 

Symmetric secret key encryption

#define SOAP_MEC_ENV   (0x40)
 

Envelope mode

#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_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_NONE   (0)
 

Engine off

#define SOAP_MEC_STORE   (0x80)
 

Enable store (in buffer) instead of streaming mode


Enumeration Type Documentation

enum SOAP_MEC_STATE
 

Decryption engine states

Enumeration values:
SOAP_MEC_STATE_NONE 
SOAP_MEC_STATE_INIT 
SOAP_MEC_STATE_IV 
SOAP_MEC_STATE_DECRYPT 
SOAP_MEC_STATE_FINAL 
SOAP_MEC_STATE_FLUSH 


Function Documentation

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.

Parameters:
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
Returns:
SOAP_OK or error code

void soap_mec_cleanup struct soap *  soap,
struct soap_mec_data data
 

Clean up mecevp engine and deallocate cipher context and buffers.

Parameters:
soap context
[in,out] data mecevp engine context
Returns:
SOAP_OK or SOAP_SSL_ERROR

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.

Parameters:
soap context
[in,out] data mecevp engine context
Returns:
SOAP_OK or error code

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.

Parameters:
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
Returns:
SOAP_OK or SOAP_SSL_ERROR

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.

Parameters:
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
Returns:
SOAP_OK or SOAP_SSL_ERROR

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 triple DES key, depending on the algorithm.

Parameters:
[in] alg is the algorithm to be used
[in] pkey is a pointer to an EVP_PKEY object or NULL for symmetric keys
Returns:
size_t number of octets that is needed to hold the key.

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.

Parameters:
soap context
[in] key secret triple DES key or NULL
Returns:
SOAP_OK or error code

int soap_mec_stop struct soap *  soap  ) 
 

Stops encryption or decryption of current message. Use after soap_mec_start.

Parameters:
soap context
Returns:
SOAP_OK or error code

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.

Parameters:
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
Returns:
SOAP_OK or SOAP_SSL_ERROR


Generated on Fri Jan 14 09:45:23 2011 for gSOAP WS-Security by doxygen 1.3.8