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

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

#include "stdsoap2.h"

Include dependency graph for smdevp.h:

Include dependency graph

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

Included by dependency graph

Classes

struct  soap_smd_data
 The smdevp engine context data, which is hooked up to soap->data[0]. More...

Defines

#define SOAP_SMD_KEY_TYPE   EVP_PKEY
#define SOAP_SMD_MAX_SIZE   EVP_MAX_MD_SIZE
#define SOAP_SMD_MD5_SIZE   (16)
#define SOAP_SMD_SHA1_SIZE   (20)
#define SOAP_SMD_NONE   (0)
#define SOAP_SMD_DGST_MD5   (0x1)
#define SOAP_SMD_DGST_SHA1   (0x2)
#define SOAP_SMD_HMAC_SHA1   (0x3)
#define SOAP_SMD_SIGN_DSA_SHA1   (0x4)
#define SOAP_SMD_SIGN_RSA_SHA1   (0x5)
#define SOAP_SMD_VRFY_DSA_SHA1   (0x6)
#define SOAP_SMD_VRFY_RSA_SHA1   (0x7)
#define SOAP_SMD_PASSTHRU   (0x8)

Functions

size_t soap_smd_size (int alg, const void *key)
 Returns the number of octets needed to store the digest or signature returned by soap_smd_end.
int soap_smd_begin (struct soap *soap, int alg, const void *key, int keylen)
 Initiates a digest or signature computation.
int soap_smd_end (struct soap *soap, char *buf, int *len)
 Completes a digest or signature computation. Also deallocates temporary storage allocated by soap_smd_begin(), so MUST be called after soap_smd_begin().
int soap_smd_init (struct soap *soap, struct soap_smd_data *data, int alg, const void *key, int keylen)
 Initiates a (signed) digest computation.
int soap_smd_update (struct soap *soap, struct soap_smd_data *data, const char *buf, size_t len)
 Updates (signed) digest computation with message part.
int soap_smd_final (struct soap *soap, struct soap_smd_data *data, char *buf, int *len)
 Finalizes (signed) digest computation and returns digest or signature.

Define Documentation

#define SOAP_SMD_DGST_MD5   (0x1)
 

MD5 digest algorithm

#define SOAP_SMD_DGST_SHA1   (0x2)
 

SHA1 digest algorithm

#define SOAP_SMD_HMAC_SHA1   (0x3)
 

HMAC-SHA1 shared key signature algorithm

#define SOAP_SMD_KEY_TYPE   EVP_PKEY
 

Expose EVP_PKEY in a portable representation

#define SOAP_SMD_MAX_SIZE   EVP_MAX_MD_SIZE
 

Expose EVP_MAX_MD_SIZE in a portable representation

#define SOAP_SMD_MD5_SIZE   (16)
 

MD5 digest size in octets

#define SOAP_SMD_NONE   (0)
 

#define SOAP_SMD_PASSTHRU   (0x8)
 

Additional flag: msg sends will pass through digest/signature algorithm

#define SOAP_SMD_SHA1_SIZE   (20)
 

SHA1 digest size in octets

#define SOAP_SMD_SIGN_DSA_SHA1   (0x4)
 

DSA-SHA1 secret key signature algorithm

#define SOAP_SMD_SIGN_RSA_SHA1   (0x5)
 

RSA-SHA1 secret key signature algorithm

#define SOAP_SMD_VRFY_DSA_SHA1   (0x6)
 

DSA-SHA1 secret key signature verification algorithm

#define SOAP_SMD_VRFY_RSA_SHA1   (0x7)
 

RSA-SHA1 secret key signature verification algorithm


Function Documentation

int soap_smd_begin struct soap *  soap,
int  alg,
const void *  key,
int  keylen
 

Initiates a digest or signature computation.

Parameters:
soap context
[in] alg is the digest or signature (sign/verification) algorithm used
[in] key is a HMAC key or pointer to EVP_PKEY object or NULL for digests
[in] keylen is the length of the HMAC key or 0
Returns:
SOAP_OK, SOAP_EOM, or SOAP_SSL_ERROR

int soap_smd_end struct soap *  soap,
char *  buf,
int *  len
 

Completes a digest or signature computation. Also deallocates temporary storage allocated by soap_smd_begin(), so MUST be called after soap_smd_begin().

Parameters:
soap context
[in] buf contains signature for verification (when using a SOAP_SMD_VRFY algorithm) or NULL for cleanup
[out] buf is populated with the digest or signature with maximum length soap_smd_size(alg, key)
[in] len points to length of signature to verify (when using a SOAP_SMD_VRFY algorithm) or NULL for cleanup
[out] len points to length of stored digest or signature (when not NULL)
Returns:
SOAP_OK, SOAP_USER_ERROR, or SOAP_SSL_ERROR

int soap_smd_final struct soap *  soap,
struct soap_smd_data data,
char *  buf,
int *  len
 

Finalizes (signed) digest computation and returns digest or signature.

Parameters:
soap context
[in,out] data smdevp engine context
[in] buf contains signature for verification (SOAP_SMD_VRFY algorithms)
[out] buf is populated with the digest or signature
[in] len points to length of signature to verify (SOAP_SMD_VRFY algorithms)
[out] len points to length of stored digest or signature (pass NULL if you are not interested in this value)
Returns:
SOAP_OK or SOAP_SSL_ERROR

int soap_smd_init struct soap *  soap,
struct soap_smd_data data,
int  alg,
const void *  key,
int  keylen
 

Initiates a (signed) digest computation.

Parameters:
soap context
[in,out] data smdevp engine context
[in] alg is algorithm to use
[in] key is key to use or NULL for digests
[in] keylen is length of HMAC key (when provided)
Returns:
SOAP_OK or SOAP_SSL_ERROR

size_t soap_smd_size int  alg,
const void *  key
 

Returns the number of octets needed to store the digest or signature returned by soap_smd_end.

Parameters:
[in] alg is the digest or signature algorithm to be used
[in] key is a pointer to an EVP_PKEY object for RSA/DSA signatures or NULL for digests and HMAC
Returns:
size_t number of octets that is needed to hold digest or signature
See also:
soap_smd_end
The values returned for digests are SOAP_SMD_MD5_SIZE and SOAP_SMD_SHA1_SIZE.

int soap_smd_update struct soap *  soap,
struct soap_smd_data data,
const char *  buf,
size_t  len
 

Updates (signed) digest computation with message part.

Parameters:
soap context
[in,out] data smdevp engine context
[in] buf contains message part
[in] len of message part
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