oxs_asym_ctx.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef OXS_ASYM_CTX_H
00019 #define OXS_ASYM_CTX_H
00020 
00021 
00027 #include <axis2_defines.h>
00028 #include <axis2_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     /*Create function*/
00059     AXIS2_EXTERN oxs_asym_ctx_t *AXIS2_CALL
00060     oxs_asym_ctx_create(const axis2_env_t *env);
00061 
00062     /*Free*/
00063     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00064     oxs_asym_ctx_free(oxs_asym_ctx_t *ctx,
00065         const axis2_env_t *env);
00066 
00067 
00068 /**********************Getter functions******************************************/
00069 
00076 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00077 oxs_asym_ctx_free(oxs_asym_ctx_t *ctx,
00078                     const axis2_env_t *env);
00079                                         
00086 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
00087 oxs_asym_ctx_get_file_name(const oxs_asym_ctx_t *ctx,
00088                     const axis2_env_t *env);
00089 
00097 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
00098 oxs_asym_ctx_get_password(const oxs_asym_ctx_t *ctx,
00099                     const axis2_env_t *env);
00100 
00107 AXIS2_EXTERN oxs_asym_ctx_format_t AXIS2_CALL
00108 oxs_asym_ctx_get_format(const oxs_asym_ctx_t *ctx,
00109                     const axis2_env_t *env);
00110 
00117 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
00118 oxs_asym_ctx_get_algorithm(const oxs_asym_ctx_t *ctx,
00119                     const axis2_env_t *env);
00120 
00127 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
00128 oxs_asym_ctx_get_st_ref_pattern(const oxs_asym_ctx_t *ctx,
00129                     const axis2_env_t *env);
00130 
00137 AXIS2_EXTERN oxs_asym_ctx_operation_t AXIS2_CALL
00138 oxs_asym_ctx_get_operation(const oxs_asym_ctx_t *ctx,
00139                     const axis2_env_t *env);
00140 
00147 AXIS2_EXTERN openssl_pkey_t* AXIS2_CALL
00148 oxs_asym_ctx_get_private_key(const oxs_asym_ctx_t *ctx,
00149                     const axis2_env_t *env);
00150 
00157 AXIS2_EXTERN oxs_x509_cert_t* AXIS2_CALL
00158 oxs_asym_ctx_get_certificate(const oxs_asym_ctx_t *ctx,
00159                     const axis2_env_t *env);
00160 
00167 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00168 oxs_asym_ctx_set_file_name(oxs_asym_ctx_t *ctx,
00169                     const axis2_env_t *env,
00170                     axis2_char_t *file_name);
00179 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00180 oxs_asym_ctx_set_password(oxs_asym_ctx_t *ctx,
00181                     const axis2_env_t *env,
00182                     axis2_char_t *password);
00190 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00191 oxs_asym_ctx_set_format(oxs_asym_ctx_t *ctx,
00192                     const axis2_env_t *env,
00193                     oxs_asym_ctx_format_t format);
00201 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00202 oxs_asym_ctx_set_algorithm(oxs_asym_ctx_t *ctx,
00203                     const axis2_env_t *env,
00204                     axis2_char_t *algorithm);
00212 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00213 oxs_asym_ctx_set_st_ref_pattern(oxs_asym_ctx_t *ctx,
00214                     const axis2_env_t *env,
00215                     axis2_char_t *st_ref_pattern);
00223 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00224 oxs_asym_ctx_set_operation(oxs_asym_ctx_t *ctx,
00225                     const axis2_env_t *env,
00226                     oxs_asym_ctx_operation_t operation);
00234 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00235 oxs_asym_ctx_set_certificate(oxs_asym_ctx_t *ctx,
00236                     const axis2_env_t *env,
00237                     oxs_x509_cert_t *certificate);
00245 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00246 oxs_asym_ctx_set_private_key(oxs_asym_ctx_t *asym_ctx,
00247                     const axis2_env_t *env,
00248                     openssl_pkey_t *private_key);
00250 #ifdef __cplusplus
00251 }
00252 #endif
00253 
00254 #endif                          /* OXS_ASYM_CTX_H */

Generated on Wed Dec 20 20:14:10 2006 for Axis2/C by  doxygen 1.5.1