oxs_sign_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_SIGN_CTX_H
00019 #define OXS_SIGN_CTX_H
00020 
00021 
00032 #include <axis2_defines.h>
00033 #include <axutil_env.h>
00034 #include <axiom_node.h>
00035 #include <oxs_x509_cert.h>
00036 #include <openssl_pkey.h>
00037 
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042 
00043     /*The type of operation*/
00044     typedef enum  {
00045         OXS_SIGN_OPERATION_NONE = 0,
00046         OXS_SIGN_OPERATION_SIGN,
00047         OXS_SIGN_OPERATION_VERIFY
00048     } oxs_sign_operation_t;
00049 
00050 
00051     typedef struct oxs_sign_ctx_t oxs_sign_ctx_t;
00052 
00058     AXIS2_EXTERN oxs_sign_ctx_t *AXIS2_CALL
00059     oxs_sign_ctx_create(const axutil_env_t *env);
00060 
00068     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00069     oxs_sign_ctx_free(oxs_sign_ctx_t *ctx,
00070                       const axutil_env_t *env);
00071 
00072 
00073     /**********************Getter functions******************************************/
00080     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00081     oxs_sign_ctx_get_sign_mtd_algo(
00082         const oxs_sign_ctx_t *sign_ctx,
00083         const axutil_env_t *env);
00084 
00091     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00092     oxs_sign_ctx_get_c14n_mtd(
00093         const oxs_sign_ctx_t *sign_ctx,
00094         const axutil_env_t *env);
00095 
00102     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
00103     oxs_sign_ctx_get_sig_val(
00104         const oxs_sign_ctx_t *sign_ctx,
00105         const axutil_env_t *env);
00106 
00113     AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
00114     oxs_sign_ctx_get_sign_parts(
00115         const oxs_sign_ctx_t *sign_ctx,
00116         const axutil_env_t *env);
00117 
00124     AXIS2_EXTERN oxs_x509_cert_t *AXIS2_CALL
00125     oxs_sign_ctx_get_certificate(
00126         const oxs_sign_ctx_t *sign_ctx,
00127         const axutil_env_t *env);
00135     AXIS2_EXTERN openssl_pkey_t *AXIS2_CALL
00136     oxs_sign_ctx_get_private_key(
00137         const oxs_sign_ctx_t *sign_ctx,
00138         const axutil_env_t *env);
00139 
00146     AXIS2_EXTERN openssl_pkey_t *AXIS2_CALL
00147     oxs_sign_ctx_get_public_key(
00148         const oxs_sign_ctx_t *sign_ctx,
00149         const axutil_env_t *env);
00150 
00157     AXIS2_EXTERN oxs_sign_operation_t AXIS2_CALL
00158     oxs_sign_ctx_get_operation(
00159         const oxs_sign_ctx_t *sign_ctx,
00160         const axutil_env_t *env);
00161 
00162     /**********************Setter functions******************************************/
00170     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00171     oxs_sign_ctx_set_sign_mtd_algo(
00172         oxs_sign_ctx_t *sign_ctx,
00173         const axutil_env_t *env,
00174         axis2_char_t *sign_mtd_algo);
00175 
00183     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00184     oxs_sign_ctx_set_c14n_mtd(
00185         oxs_sign_ctx_t *sign_ctx,
00186         const axutil_env_t *env,
00187         axis2_char_t *c14n_mtd);
00188 
00196     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00197     oxs_sign_ctx_set_sig_val(
00198         oxs_sign_ctx_t *sign_ctx,
00199         const axutil_env_t *env,
00200         axis2_char_t *sig_val);
00201 
00209     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00210     oxs_sign_ctx_set_sign_parts(
00211         oxs_sign_ctx_t *sign_ctx,
00212         const axutil_env_t *env,
00213         axutil_array_list_t *sign_parts);
00214 
00222     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00223     oxs_sign_ctx_set_certificate(
00224         oxs_sign_ctx_t *sign_ctx,
00225         const axutil_env_t *env,
00226         oxs_x509_cert_t *certificate);
00227 
00235     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00236     oxs_sign_ctx_set_private_key(
00237         oxs_sign_ctx_t *sign_ctx,
00238         const axutil_env_t *env,
00239         openssl_pkey_t *prv_key);
00240 
00248     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00249     oxs_sign_ctx_set_public_key(
00250         oxs_sign_ctx_t *sign_ctx,
00251         const axutil_env_t *env,
00252         openssl_pkey_t *pub_key);
00253 
00261     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00262     oxs_sign_ctx_set_operation(
00263         oxs_sign_ctx_t *sign_ctx,
00264         const axutil_env_t *env,
00265         oxs_sign_operation_t operation);
00267 #ifdef __cplusplus
00268 }
00269 #endif
00270 
00271 #endif                          /* OXS_SIGN_CTX_H */

Generated on Thu Oct 4 17:37:07 2007 for Rampart/C by  doxygen 1.4.7