00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef OXS_ASYM_CTX_H
00019 #define OXS_ASYM_CTX_H
00020
00021
00027 #include <axis2_defines.h>
00028 #include <axutil_env.h>
00029 #include <axiom_node.h>
00030 #include <oxs_x509_cert.h>
00031 #include <openssl_pkey.h>
00032
00033 #ifdef __cplusplus
00034 extern "C"
00035 {
00036 #endif
00037
00043 typedef enum {
00044 OXS_ASYM_CTX_FORMAT_UNKNOWN=0,
00045 OXS_ASYM_CTX_FORMAT_PEM,
00046 OXS_ASYM_CTX_FORMAT_PKCS12
00047 }oxs_asym_ctx_format_t;
00048
00049 typedef enum {
00050 OXS_ASYM_CTX_OPERATION_PUB_ENCRYPT=0,
00051 OXS_ASYM_CTX_OPERATION_PRV_DECRYPT,
00052 OXS_ASYM_CTX_OPERATION_PUB_DECRYPT,
00053 OXS_ASYM_CTX_OPERATION_PRV_ENCRYPT
00054 }oxs_asym_ctx_operation_t;
00055
00056 typedef struct oxs_asym_ctx_t oxs_asym_ctx_t;
00057
00058
00059 AXIS2_EXTERN oxs_asym_ctx_t *AXIS2_CALL
00060 oxs_asym_ctx_create(const axutil_env_t *env);
00061
00062
00063 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00064 oxs_asym_ctx_free(oxs_asym_ctx_t *ctx,
00065 const axutil_env_t *env);
00066
00067
00068
00069
00076 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00077 oxs_asym_ctx_free(oxs_asym_ctx_t *ctx,
00078 const axutil_env_t *env);
00079
00086 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
00087 oxs_asym_ctx_get_algorithm(const oxs_asym_ctx_t *ctx,
00088 const axutil_env_t *env);
00089
00096 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
00097 oxs_asym_ctx_get_st_ref_pattern(const oxs_asym_ctx_t *ctx,
00098 const axutil_env_t *env);
00099
00106 AXIS2_EXTERN oxs_asym_ctx_operation_t AXIS2_CALL
00107 oxs_asym_ctx_get_operation(const oxs_asym_ctx_t *ctx,
00108 const axutil_env_t *env);
00109
00116 AXIS2_EXTERN openssl_pkey_t* AXIS2_CALL
00117 oxs_asym_ctx_get_private_key(const oxs_asym_ctx_t *ctx,
00118 const axutil_env_t *env);
00119
00126 AXIS2_EXTERN oxs_x509_cert_t* AXIS2_CALL
00127 oxs_asym_ctx_get_certificate(const oxs_asym_ctx_t *ctx,
00128 const axutil_env_t *env);
00129
00137 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00138 oxs_asym_ctx_set_algorithm(oxs_asym_ctx_t *ctx,
00139 const axutil_env_t *env,
00140 axis2_char_t *algorithm);
00148 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00149 oxs_asym_ctx_set_st_ref_pattern(oxs_asym_ctx_t *ctx,
00150 const axutil_env_t *env,
00151 axis2_char_t *st_ref_pattern);
00159 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00160 oxs_asym_ctx_set_operation(oxs_asym_ctx_t *ctx,
00161 const axutil_env_t *env,
00162 oxs_asym_ctx_operation_t operation);
00170 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00171 oxs_asym_ctx_set_certificate(oxs_asym_ctx_t *ctx,
00172 const axutil_env_t *env,
00173 oxs_x509_cert_t *certificate);
00181 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00182 oxs_asym_ctx_set_private_key(oxs_asym_ctx_t *asym_ctx,
00183 const axutil_env_t *env,
00184 openssl_pkey_t *private_key);
00186 #ifdef __cplusplus
00187 }
00188 #endif
00189
00190 #endif