rampart_token_builder.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003  *
00004  *   Licensed under the Apache License, Version 2.0 (the "License");
00005  *   you may not use this file except in compliance with the License.
00006  *   You may obtain a copy of the License at
00007  *
00008  *       http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *   Unless required by applicable law or agreed to in writing, software
00011  *   distributed under the License is distributed on an "AS IS" BASIS,
00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *   See the License for the specific language governing permissions and
00014  *   limitations under the License.
00015  */
00016 
00017 
00018 
00019 #include <axutil_utils_defines.h>
00020 #include <axis2_defines.h>
00021 #include <axutil_date_time.h>
00022 #include <axutil_env.h>
00023 #include <axutil_property.h>
00024 #include <axis2_msg_ctx.h>
00025 #include <rampart_authn_provider.h>
00026 #include <rampart_credentials.h>
00027 #include <rampart_callback.h>
00028 #include <oxs_x509_cert.h>
00040 #ifndef RAMPART_TOKEN_BUILDER_H
00041 #define RAMPART_TOKEN_BUILDER_H
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046 
00047     typedef enum {
00048         RTBP_UNKNOWN = 0,
00049         RTBP_EMBEDDED,
00050         RTBP_KEY_IDENTIFIER,
00051         RTBP_X509DATA_ISSUER_SERIAL,
00052         RTBP_X509DATA_X509CERTIFICATE
00053     } rampart_token_build_pattern_t;
00054 
00067     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00068     rampart_token_build_security_token_reference(const axutil_env_t *env,
00069             axiom_node_t *parent,
00070             oxs_x509_cert_t *cert,
00071             rampart_token_build_pattern_t pattern);
00072 
00086     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00087     rampart_token_build_embedded(const axutil_env_t *env,
00088                                  axiom_node_t *parent,
00089                                  oxs_x509_cert_t *cert);
00102     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00103     rampart_token_build_key_identifier(const axutil_env_t *env,
00104                                        axiom_node_t *parent,
00105                                        oxs_x509_cert_t *cert);
00106 
00123     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00124     rampart_token_build_x509_data_x509_certificate(const axutil_env_t *env,
00125             axiom_node_t *parent,
00126             oxs_x509_cert_t *cert);
00127     /*
00128      * Build an X509Certificate token with data available in the certificate.
00129      *        <SecurityTokenReference>
00130      *          <ds:X509Data>
00131      *              <ds:X509Certificate>
00132      *                  MIICzjCCAjegAwIBAgIJANyD+jwekxGuMA......
00133      *              </ds:X509Certificate>
00134      *          <ds:X509Data>
00135      *          </SecurityTokenReference>
00136      * @param env pointer to environment struct
00137      * @param parent The parent node
00138      * @param cert The X509 certificate
00139      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
00140      */
00141     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00142     rampart_token_build_x509_data_issuer_serial(const axutil_env_t *env,
00143             axiom_node_t *parent,
00144             oxs_x509_cert_t *cert);
00145     /* @} */
00146 #ifdef __cplusplus
00147 }
00148 #endif
00149 
00150 #endif    /* !RAMPART_TOKEN_BUILDER_H */
00151 
00152 

Generated on Thu May 22 15:02:56 2008 for Rampart/C by  doxygen 1.5.5