# oxs_x509_cert.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_X509_CERT
    00019 #define OXS_X509_CERT
    00020
    00021
    00027 #include <axis2_defines.h>
    00028 #include <axutil_env.h>
    00029 #include <axiom_node.h>
    00030 #include <openssl_pkey.h>
    00031
    00032 #ifdef __cplusplus
    00033 extern "C"
    00034 {
    00035 #endif
    00036
    00044     typedef struct oxs_x509_cert_t oxs_x509_cert_t;
    00045
    00051     AXIS2_EXTERN oxs_x509_cert_t *AXIS2_CALL
    00052     oxs_x509_cert_create( const axutil_env_t *env);
    00053
    00060     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00061     oxs_x509_cert_free(oxs_x509_cert_t *x509_cert,
    00062                        const axutil_env_t *env);
    00063
    00064     /*Getters*/
    00071     AXIS2_EXTERN int AXIS2_CALL
    00072     oxs_x509_cert_get_serial_number(oxs_x509_cert_t *x509_cert,
    00073                                     const axutil_env_t *env);
    00074
    00081     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00082     oxs_x509_cert_get_subject(oxs_x509_cert_t *x509_cert,
    00083                               const axutil_env_t *env);
    00084
    00091     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00092     oxs_x509_cert_get_issuer(oxs_x509_cert_t *x509_cert,
    00093                              const axutil_env_t *env);
    00094
    00101     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00102     oxs_x509_cert_get_key_identifier(oxs_x509_cert_t *x509_cert,
    00103                                      const axutil_env_t *env);
    00104
    00111     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00112     oxs_x509_cert_get_fingerprint(oxs_x509_cert_t *x509_cert,
    00113                                   const axutil_env_t *env);
    00114
    00121     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00122     oxs_x509_cert_get_date(oxs_x509_cert_t *x509_cert,
    00123                            const axutil_env_t *env);
    00124
    00131     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00132     oxs_x509_cert_get_hash(oxs_x509_cert_t *x509_cert,
    00133                            const axutil_env_t *env);
    00134
    00142     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00143     oxs_x509_cert_get_data(oxs_x509_cert_t *x509_cert,
    00144                            const axutil_env_t *env);
    00145
    00152     AXIS2_EXTERN openssl_pkey_t *AXIS2_CALL
    00153     oxs_x509_cert_get_public_key(oxs_x509_cert_t *x509_cert,
    00154                                  const axutil_env_t *env);
    00155
    00156     /*Setters*/
    00164     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00165     oxs_x509_cert_set_serial_number(oxs_x509_cert_t *x509_cert,
    00166                                     const axutil_env_t *env,
    00167                                     int value);
    00168
    00176     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00177     oxs_x509_cert_set_issuer(oxs_x509_cert_t *x509_cert,
    00178                              const axutil_env_t *env,
    00179                              axis2_char_t *value);
    00180
    00188     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00189     oxs_x509_cert_set_key_identifier(oxs_x509_cert_t *x509_cert,
    00190                                      const axutil_env_t *env,
    00191                                      axis2_char_t *value);
    00192
    00200     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00201     oxs_x509_cert_set_subject(oxs_x509_cert_t *x509_cert,
    00202                               const axutil_env_t *env,
    00203                               axis2_char_t *value);
    00204
    00212     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00213     oxs_x509_cert_set_fingerprint(oxs_x509_cert_t *x509_cert,
    00214                                   const axutil_env_t *env,
    00215                                   axis2_char_t *value);
    00216
    00224     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00225     oxs_x509_cert_set_date(oxs_x509_cert_t *x509_cert,
    00226                            const axutil_env_t *env,
    00227                            axis2_char_t *value);
    00228
    00236     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00237     oxs_x509_cert_set_hash(oxs_x509_cert_t *x509_cert,
    00238                            const axutil_env_t *env,
    00239                            axis2_char_t *value);
    00240
    00249     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00250     oxs_x509_cert_set_data(oxs_x509_cert_t *x509_cert,
    00251                            const axutil_env_t *env,
    00252                            axis2_char_t *value);
    00253
    00261     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00262     oxs_x509_cert_set_public_key(oxs_x509_cert_t *x509_cert,
    00263                                  const axutil_env_t *env,
    00264                                  openssl_pkey_t *public_key);
    00272     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00273     oxs_x509_cert_copy_to(oxs_x509_cert_t *x509_cert,
    00274                           const axutil_env_t *env,
    00275                           oxs_x509_cert_t *to);
    00276
    00277         AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00278     oxs_x509_cert_get_common_name(oxs_x509_cert_t *x509_cert,
    00279                                           const axutil_env_t *env);
    00280
    00281     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00282     oxs_x509_cert_set_common_name(oxs_x509_cert_t *x509_cert,
    00283                 const axutil_env_t *env,
    00284                 axis2_char_t *common_name);
    00286 #ifdef __cplusplus
    00287 }
    00288 #endif
    00289
    00290 #endif                          /* OXS_X509_CERT */