rampart_token_builder.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 #include <axutil_utils_defines.h>
00019 #include <axis2_defines.h>
00020 #include <axutil_env.h>
00021 #include <oxs_x509_cert.h>
00033 #ifndef RAMPART_TOKEN_BUILDER_H
00034 #define RAMPART_TOKEN_BUILDER_H
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040     typedef enum {
00041         RTBP_UNKNOWN = 0,
00042         RTBP_EMBEDDED,
00043         RTBP_KEY_IDENTIFIER,
00044         RTBP_X509DATA_ISSUER_SERIAL,
00045         RTBP_X509DATA_X509CERTIFICATE,
00046         RTBP_THUMBPRINT
00047     } rampart_token_build_pattern_t;
00048 
00060     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00061     rampart_token_build_security_token_reference(
00062         const axutil_env_t *env,
00063         axiom_node_t *parent,
00064         oxs_x509_cert_t *cert,
00065         rampart_token_build_pattern_t pattern);
00066 
00079     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00080     rampart_token_build_embedded(
00081         const axutil_env_t *env,
00082         axiom_node_t *parent,
00083         oxs_x509_cert_t *cert);
00084 
00095     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00096     rampart_token_build_key_identifier(
00097         const axutil_env_t *env,
00098         axiom_node_t *parent,
00099         oxs_x509_cert_t *cert);
00100     
00101     /*
00102      * Build an X509Certificate token with data available in the certificate.
00103      *        <SecurityTokenReference>
00104      *          <ds:X509Data>
00105      *              <ds:X509Certificate>
00106      *                  MIICzjCCAjegAwIBAgIJANyD+jwekxGuMA......
00107      *              </ds:X509Certificate>
00108      *          <ds:X509Data>
00109      *        </SecurityTokenReference>
00110      * @param env pointer to environment struct
00111      * @param parent The parent node
00112      * @param cert The X509 certificate
00113      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
00114      */
00115     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00116     rampart_token_build_x509_data_x509_certificate(
00117         const axutil_env_t *env,
00118         axiom_node_t *parent,
00119         oxs_x509_cert_t *cert);
00120 
00136     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00137     rampart_token_build_x509_data_issuer_serial(
00138         const axutil_env_t *env,
00139         axiom_node_t *parent,
00140         oxs_x509_cert_t *cert);
00141 
00154     AXIS2_EXTERN axis2_status_t AXIS2_CALL
00155     rampart_token_build_thumbprint_reference(
00156         const axutil_env_t *env,
00157         axiom_node_t *parent,
00158         oxs_x509_cert_t *cert);
00159 
00160 
00161     /* @} */
00162 #ifdef __cplusplus
00163 }
00164 #endif
00165 
00166 #endif    /* !RAMPART_TOKEN_BUILDER_H */
00167 
00168 

Generated on Wed Oct 14 01:02:16 2009 for Rampart/C by  doxygen 1.5.7.1