diff options
Diffstat (limited to 'libextra')
-rw-r--r-- | libextra/ext_inner_application.c | 58 | ||||
-rw-r--r-- | libextra/ext_inner_application.h | 4 | ||||
-rw-r--r-- | libextra/gnutls_extra.c | 8 | ||||
-rw-r--r-- | libextra/gnutls_ia.c | 226 | ||||
-rw-r--r-- | libextra/gnutls_openssl.c | 82 | ||||
-rw-r--r-- | libextra/includes/gnutls/extra.h | 36 | ||||
-rw-r--r-- | libextra/includes/gnutls/openssl.h | 12 | ||||
-rw-r--r-- | libextra/openssl_compat.c | 184 | ||||
-rw-r--r-- | libextra/openssl_compat.h | 40 |
9 files changed, 325 insertions, 325 deletions
diff --git a/libextra/ext_inner_application.c b/libextra/ext_inner_application.c index a72d87bb23..329e4ec9a7 100644 --- a/libextra/ext_inner_application.c +++ b/libextra/ext_inner_application.c @@ -32,10 +32,10 @@ #define YES 1 static int _gnutls_inner_application_recv_params (gnutls_session_t session, - const opaque * data, - size_t data_size); + const opaque * data, + size_t data_size); static int _gnutls_inner_application_send_params (gnutls_session_t session, - opaque * data, size_t); + opaque * data, size_t); static int ia_unpack (gnutls_buffer_st * ps, extension_priv_data_t * _priv); static int ia_pack (extension_priv_data_t _priv, gnutls_buffer_st * ps); static void ia_deinit_data (extension_priv_data_t priv); @@ -54,7 +54,7 @@ extension_entry_st ext_mod_ia = { static int _gnutls_inner_application_recv_params (gnutls_session_t session, - const opaque * data, size_t data_size) + const opaque * data, size_t data_size) { extension_priv_data_t epriv; ia_ext_st *priv; @@ -68,20 +68,20 @@ _gnutls_inner_application_recv_params (gnutls_session_t session, ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - &epriv); + &epriv); if (ret < 0) { priv = gnutls_calloc (1, sizeof (*priv)); if (priv == NULL) - { - gnutls_assert (); - return GNUTLS_E_MEMORY_ERROR; - } + { + gnutls_assert (); + return GNUTLS_E_MEMORY_ERROR; + } epriv.ptr = priv; _gnutls_ext_set_session_data (session, - GNUTLS_EXTENSION_INNER_APPLICATION, - epriv); + GNUTLS_EXTENSION_INNER_APPLICATION, + epriv); } else priv = epriv.ptr; @@ -91,7 +91,7 @@ _gnutls_inner_application_recv_params (gnutls_session_t session, switch ((unsigned char) *data) { - case NO: /* Peer's ia_on_resume == no */ + case NO: /* Peer's ia_on_resume == no */ priv->flags |= IA_PEER_ALLOW_SKIP; break; @@ -111,7 +111,7 @@ _gnutls_inner_application_recv_params (gnutls_session_t session, */ static int _gnutls_inner_application_send_params (gnutls_session_t session, - opaque * data, size_t data_size) + opaque * data, size_t data_size) { extension_priv_data_t epriv; ia_ext_st *priv = NULL; @@ -119,20 +119,20 @@ _gnutls_inner_application_send_params (gnutls_session_t session, ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - &epriv); + &epriv); if (ret < 0) { priv = gnutls_calloc (1, sizeof (*priv)); if (priv == NULL) - { - gnutls_assert (); - return GNUTLS_E_MEMORY_ERROR; - } + { + gnutls_assert (); + return GNUTLS_E_MEMORY_ERROR; + } epriv.ptr = priv; _gnutls_ext_set_session_data (session, - GNUTLS_EXTENSION_INNER_APPLICATION, - epriv); + GNUTLS_EXTENSION_INNER_APPLICATION, + epriv); } else priv = epriv.ptr; @@ -143,20 +143,20 @@ _gnutls_inner_application_send_params (gnutls_session_t session, if (session->security_parameters.entity == GNUTLS_CLIENT) { gnutls_ia_client_credentials_t cred = (gnutls_ia_client_credentials_t) - _gnutls_get_cred (session->key, GNUTLS_CRD_IA, NULL); + _gnutls_get_cred (session->key, GNUTLS_CRD_IA, NULL); if (cred) - priv->flags |= IA_ENABLE; + priv->flags |= IA_ENABLE; } - else /* SERVER */ + else /* SERVER */ { gnutls_ia_server_credentials_t cred; cred = (gnutls_ia_server_credentials_t) - _gnutls_get_cred (session->key, GNUTLS_CRD_IA, NULL); + _gnutls_get_cred (session->key, GNUTLS_CRD_IA, NULL); if (cred) - priv->flags |= IA_PEER_ENABLE; + priv->flags |= IA_PEER_ENABLE; } /* If we don't want gnutls_ia locally, or we are a server and the @@ -188,7 +188,7 @@ _gnutls_inner_application_send_params (gnutls_session_t session, /* Client: value follows local setting */ if (priv->flags & IA_ALLOW_SKIP) - *data = NO; + *data = NO; } else { @@ -206,9 +206,9 @@ _gnutls_inner_application_send_params (gnutls_session_t session, * to record the peer's support for IA at all. Simon? */ if ((priv->flags & IA_ALLOW_SKIP) && - (priv->flags & IA_PEER_ALLOW_SKIP) && - session->internals.resumed == RESUME_TRUE) - *data = NO; + (priv->flags & IA_PEER_ALLOW_SKIP) && + session->internals.resumed == RESUME_TRUE) + *data = NO; } return 1; diff --git a/libextra/ext_inner_application.h b/libextra/ext_inner_application.h index 8590841e14..a137c08c2d 100644 --- a/libextra/ext_inner_application.h +++ b/libextra/ext_inner_application.h @@ -49,7 +49,7 @@ _gnutls_ia_derive_inner_secret (gnutls_session_t session) ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - &epriv); + &epriv); if (ret < 0) { return; @@ -57,7 +57,7 @@ _gnutls_ia_derive_inner_secret (gnutls_session_t session) priv = epriv.ptr; memcpy (priv->inner_secret, - session->security_parameters.master_secret, GNUTLS_MASTER_SIZE); + session->security_parameters.master_secret, GNUTLS_MASTER_SIZE); } diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c index b5772d592f..e890fbf43f 100644 --- a/libextra/gnutls_extra.c +++ b/libextra/gnutls_extra.c @@ -65,7 +65,7 @@ _gnutls_add_lzo_comp (void) for (i = 0; i < _gnutls_comp_algorithms_size; i++) { if (_gnutls_compression_algorithms[i].name == NULL) - break; + break; } if (_gnutls_compression_algorithms[i].name == NULL @@ -81,7 +81,7 @@ _gnutls_add_lzo_comp (void) _gnutls_lzo1x_decompress_safe = lzo1x_decompress_safe; _gnutls_lzo1x_1_compress = lzo1x_1_compress; - return 0; /* ok */ + return 0; /* ok */ } @@ -157,8 +157,8 @@ gnutls_global_init_extra (void) { ret = gnutls_register_md5_handler (); if (ret) - fprintf (stderr, "gnutls_register_md5_handler: %s\n", - gnutls_strerror (ret)); + fprintf (stderr, "gnutls_register_md5_handler: %s\n", + gnutls_strerror (ret)); } #endif #endif diff --git a/libextra/gnutls_ia.c b/libextra/gnutls_ia.c index 65d75a8d8c..e692bde43f 100644 --- a/libextra/gnutls_ia.c +++ b/libextra/gnutls_ia.c @@ -75,8 +75,8 @@ static const char challenge_label[] = "inner application challenge"; with data==NULL&&sizeofdata=0NULL until it returns successfully. */ static ssize_t _gnutls_send_inner_application (gnutls_session_t session, - gnutls_ia_apptype_t msg_type, - const char *data, size_t sizeofdata) + gnutls_ia_apptype_t msg_type, + const char *data, size_t sizeofdata) { opaque *p = NULL; size_t plen = 0; @@ -87,10 +87,10 @@ _gnutls_send_inner_application (gnutls_session_t session, plen = sizeofdata + 4; p = gnutls_malloc (plen); if (!p) - { - gnutls_assert (); - return GNUTLS_E_MEMORY_ERROR; - } + { + gnutls_assert (); + return GNUTLS_E_MEMORY_ERROR; + } *(unsigned char *) p = (unsigned char) (msg_type & 0xFF); _gnutls_write_uint24 (sizeofdata, p + 1); @@ -99,7 +99,7 @@ _gnutls_send_inner_application (gnutls_session_t session, len = _gnutls_send_int (session, GNUTLS_INNER_APPLICATION, -1, - EPOCH_WRITE_CURRENT, p, plen, MBUFFER_FLUSH); + EPOCH_WRITE_CURRENT, p, plen, MBUFFER_FLUSH); if (p) gnutls_free (p); @@ -112,8 +112,8 @@ _gnutls_send_inner_application (gnutls_session_t session, number of bytes read, or an error code. */ static ssize_t _gnutls_recv_inner_application (gnutls_session_t session, - gnutls_ia_apptype_t * msg_type, - opaque * data, size_t sizeofdata) + gnutls_ia_apptype_t * msg_type, + opaque * data, size_t sizeofdata) { ssize_t len; uint32_t len24; @@ -147,13 +147,13 @@ _gnutls_recv_inner_application (gnutls_session_t session, uint32_t tmplen = len24; len24 = _gnutls_recv_int (session, GNUTLS_INNER_APPLICATION, -1, - data, tmplen); + data, tmplen); if (len24 != tmplen) - { - gnutls_assert (); - /* XXX Correct? */ - return GNUTLS_E_UNEXPECTED_PACKET_LENGTH; - } + { + gnutls_assert (); + /* XXX Correct? */ + return GNUTLS_E_UNEXPECTED_PACKET_LENGTH; + } } return len24; @@ -166,10 +166,10 @@ _gnutls_recv_inner_application (gnutls_session_t session, result is placed in pre-allocated OUT of OUTSIZE length. */ static int _gnutls_ia_prf (gnutls_session_t session, - size_t label_size, - const char *label, - size_t extra_size, - const char *extra, size_t outsize, opaque * out) + size_t label_size, + const char *label, + size_t extra_size, + const char *extra, size_t outsize, opaque * out) { int ret; opaque *seed; @@ -179,7 +179,7 @@ _gnutls_ia_prf (gnutls_session_t session, ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - &epriv); + &epriv); if (ret < 0) { gnutls_assert (); @@ -195,14 +195,14 @@ _gnutls_ia_prf (gnutls_session_t session, } memcpy (seed, session->security_parameters.server_random, - GNUTLS_RANDOM_SIZE); + GNUTLS_RANDOM_SIZE); memcpy (seed + GNUTLS_RANDOM_SIZE, - session->security_parameters.client_random, GNUTLS_RANDOM_SIZE); + session->security_parameters.client_random, GNUTLS_RANDOM_SIZE); memcpy (seed + 2 * GNUTLS_RANDOM_SIZE, extra, extra_size); ret = _gnutls_PRF (session, priv->inner_secret, - GNUTLS_MASTER_SIZE, - label, label_size, seed, seedsize, outsize, out); + GNUTLS_MASTER_SIZE, + label, label_size, seed, seedsize, outsize, out); gnutls_free (seed); @@ -225,8 +225,8 @@ _gnutls_ia_prf (gnutls_session_t session, **/ int gnutls_ia_permute_inner_secret (gnutls_session_t session, - size_t session_keys_size, - const char *session_keys) + size_t session_keys_size, + const char *session_keys) { extension_priv_data_t epriv; ia_ext_st *priv; @@ -234,7 +234,7 @@ gnutls_ia_permute_inner_secret (gnutls_session_t session, ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - &epriv); + &epriv); if (ret < 0) { gnutls_assert (); @@ -243,11 +243,11 @@ gnutls_ia_permute_inner_secret (gnutls_session_t session, priv = epriv.ptr; return _gnutls_ia_prf (session, - sizeof (inner_permutation_label) - 1, - inner_permutation_label, - session_keys_size, - session_keys, - GNUTLS_RANDOM_SIZE, priv->inner_secret); + sizeof (inner_permutation_label) - 1, + inner_permutation_label, + session_keys_size, + session_keys, + GNUTLS_RANDOM_SIZE, priv->inner_secret); } /** @@ -263,11 +263,11 @@ gnutls_ia_permute_inner_secret (gnutls_session_t session, **/ int gnutls_ia_generate_challenge (gnutls_session_t session, - size_t buffer_size, char *buffer) + size_t buffer_size, char *buffer) { return _gnutls_ia_prf (session, - sizeof (challenge_label) - 1, - challenge_label, 0, NULL, buffer_size, buffer); + sizeof (challenge_label) - 1, + challenge_label, 0, NULL, buffer_size, buffer); } /** @@ -295,7 +295,7 @@ gnutls_ia_extract_inner_secret (gnutls_session_t session, char *buffer) ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - &epriv); + &epriv); if (ret < 0) { gnutls_assert (); @@ -336,7 +336,7 @@ gnutls_ia_endphase_send (gnutls_session_t session, int final_p) ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - &epriv); + &epriv); if (ret < 0) { gnutls_assert (); @@ -345,9 +345,9 @@ gnutls_ia_endphase_send (gnutls_session_t session, int final_p) priv = epriv.ptr; ret = _gnutls_PRF (session, priv->inner_secret, - GNUTLS_MASTER_SIZE, label, size_of_label - 1, - /* XXX specification unclear on seed. */ - "", 0, CHECKSUM_SIZE, local_checksum); + GNUTLS_MASTER_SIZE, label, size_of_label - 1, + /* XXX specification unclear on seed. */ + "", 0, CHECKSUM_SIZE, local_checksum); if (ret < 0) return ret; @@ -401,7 +401,7 @@ gnutls_ia_verify_endphase (gnutls_session_t session, const char *checksum) ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - &epriv); + &epriv); if (ret < 0) { gnutls_assert (); @@ -410,9 +410,9 @@ gnutls_ia_verify_endphase (gnutls_session_t session, const char *checksum) priv = epriv.ptr; ret = _gnutls_PRF (session, priv->inner_secret, - GNUTLS_MASTER_SIZE, - label, size_of_label - 1, - "", 0, CHECKSUM_SIZE, local_checksum); + GNUTLS_MASTER_SIZE, + label, size_of_label - 1, + "", 0, CHECKSUM_SIZE, local_checksum); if (ret < 0) { gnutls_assert (); @@ -422,12 +422,12 @@ gnutls_ia_verify_endphase (gnutls_session_t session, const char *checksum) if (memcmp (local_checksum, checksum, CHECKSUM_SIZE) != 0) { ret = gnutls_alert_send (session, GNUTLS_AL_FATAL, - GNUTLS_A_INNER_APPLICATION_VERIFICATION); + GNUTLS_A_INNER_APPLICATION_VERIFICATION); if (ret < 0) - { - gnutls_assert (); - return ret; - } + { + gnutls_assert (); + return ret; + } return GNUTLS_E_IA_VERIFY_FAILED; } @@ -468,8 +468,8 @@ gnutls_ia_send (gnutls_session_t session, const char *data, size_t sizeofdata) ssize_t len; len = _gnutls_send_inner_application (session, - GNUTLS_IA_APPLICATION_PAYLOAD, - data, sizeofdata); + GNUTLS_IA_APPLICATION_PAYLOAD, + data, sizeofdata); return len; } @@ -527,7 +527,7 @@ _gnutls_ia_client_handshake (gnutls_session_t session) { char *buf = NULL; size_t buflen = 0; - char tmp[1024]; /* XXX */ + char tmp[1024]; /* XXX */ ssize_t len; int ret; const struct gnutls_ia_client_credentials_st *cred = @@ -542,47 +542,47 @@ _gnutls_ia_client_handshake (gnutls_session_t session) size_t avplen; ret = cred->avp_func (session, cred->avp_ptr, - buf, buflen, &avp, &avplen); + buf, buflen, &avp, &avplen); if (ret) - { - int tmpret; - tmpret = gnutls_alert_send (session, GNUTLS_AL_FATAL, - GNUTLS_A_INNER_APPLICATION_FAILURE); - if (tmpret < 0) - gnutls_assert (); - return ret; - } + { + int tmpret; + tmpret = gnutls_alert_send (session, GNUTLS_AL_FATAL, + GNUTLS_A_INNER_APPLICATION_FAILURE); + if (tmpret < 0) + gnutls_assert (); + return ret; + } len = gnutls_ia_send (session, avp, avplen); gnutls_free (avp); if (len < 0) - return len; + return len; len = gnutls_ia_recv (session, tmp, sizeof (tmp)); if (len == GNUTLS_E_WARNING_IA_IPHF_RECEIVED || - len == GNUTLS_E_WARNING_IA_FPHF_RECEIVED) - { - ret = gnutls_ia_verify_endphase (session, tmp); - if (ret < 0) - return ret; - - ret = gnutls_ia_endphase_send - (session, len == GNUTLS_E_WARNING_IA_FPHF_RECEIVED); - if (ret < 0) - return ret; - } + len == GNUTLS_E_WARNING_IA_FPHF_RECEIVED) + { + ret = gnutls_ia_verify_endphase (session, tmp); + if (ret < 0) + return ret; + + ret = gnutls_ia_endphase_send + (session, len == GNUTLS_E_WARNING_IA_FPHF_RECEIVED); + if (ret < 0) + return ret; + } if (len == GNUTLS_E_WARNING_IA_IPHF_RECEIVED) - { - buf = NULL; - buflen = 0; - continue; - } + { + buf = NULL; + buflen = 0; + continue; + } else if (len == GNUTLS_E_WARNING_IA_FPHF_RECEIVED) - break; + break; if (len < 0) - return len; + return len; buflen = len; buf = tmp; @@ -611,51 +611,51 @@ _gnutls_ia_server_handshake (gnutls_session_t session) len = gnutls_ia_recv (session, buf, sizeof (buf)); if (len == GNUTLS_E_WARNING_IA_IPHF_RECEIVED || - len == GNUTLS_E_WARNING_IA_FPHF_RECEIVED) - { - ret = gnutls_ia_verify_endphase (session, buf); - if (ret < 0) - return ret; - } + len == GNUTLS_E_WARNING_IA_FPHF_RECEIVED) + { + ret = gnutls_ia_verify_endphase (session, buf); + if (ret < 0) + return ret; + } if (len == GNUTLS_E_WARNING_IA_IPHF_RECEIVED) - continue; + continue; else if (len == GNUTLS_E_WARNING_IA_FPHF_RECEIVED) - break; + break; if (len < 0) - return len; + return len; avp = NULL; avplen = 0; ret = cred->avp_func (session, cred->avp_ptr, buf, len, &avp, &avplen); if (ret < 0) - { - int tmpret; - tmpret = gnutls_alert_send (session, GNUTLS_AL_FATAL, - GNUTLS_A_INNER_APPLICATION_FAILURE); - if (tmpret < 0) - gnutls_assert (); - return ret; - } + { + int tmpret; + tmpret = gnutls_alert_send (session, GNUTLS_AL_FATAL, + GNUTLS_A_INNER_APPLICATION_FAILURE); + if (tmpret < 0) + gnutls_assert (); + return ret; + } msg_type = ret; if (msg_type != GNUTLS_IA_APPLICATION_PAYLOAD) - { - ret = gnutls_ia_endphase_send (session, msg_type == - GNUTLS_IA_FINAL_PHASE_FINISHED); - if (ret < 0) - return ret; - } + { + ret = gnutls_ia_endphase_send (session, msg_type == + GNUTLS_IA_FINAL_PHASE_FINISHED); + if (ret < 0) + return ret; + } else - { - len = gnutls_ia_send (session, avp, avplen); - gnutls_free (avp); - if (len < 0) - return len; - } + { + len = gnutls_ia_send (session, avp, avplen); + gnutls_free (avp); + if (len < 0) + return len; + } } while (1); @@ -681,7 +681,7 @@ gnutls_ia_handshake_p (gnutls_session_t session) ret = _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_SERVER_NAME, - &epriv); + &epriv); if (ret < 0) { gnutls_assert (); @@ -804,7 +804,7 @@ gnutls_ia_free_client_credentials (gnutls_ia_client_credentials_t sc) **/ void gnutls_ia_set_client_avp_function (gnutls_ia_client_credentials_t cred, - gnutls_ia_avp_func avp_func) + gnutls_ia_avp_func avp_func) { cred->avp_func = avp_func; } @@ -920,7 +920,7 @@ gnutls_ia_free_server_credentials (gnutls_ia_server_credentials_t sc) **/ void gnutls_ia_set_server_avp_function (gnutls_ia_server_credentials_t cred, - gnutls_ia_avp_func avp_func) + gnutls_ia_avp_func avp_func) { cred->avp_func = avp_func; } @@ -999,6 +999,6 @@ gnutls_ia_enable (gnutls_session_t session, int allow_skip_on_resume) priv->flags |= IA_ALLOW_SKIP; _gnutls_ext_set_session_data (session, GNUTLS_EXTENSION_INNER_APPLICATION, - epriv); + epriv); } diff --git a/libextra/gnutls_openssl.c b/libextra/gnutls_openssl.c index 6d33c8f01d..74feafb9bb 100644 --- a/libextra/gnutls_openssl.c +++ b/libextra/gnutls_openssl.c @@ -114,7 +114,7 @@ SSL_CTX_use_PrivateKey_file (SSL_CTX * ctx, const char *keyfile, int type) void SSL_CTX_set_verify (SSL_CTX * ctx, int verify_mode, - int (*verify_callback) (int, X509_STORE_CTX *)) + int (*verify_callback) (int, X509_STORE_CTX *)) { ctx->verify_mode = verify_mode; ctx->verify_callback = verify_callback; @@ -232,24 +232,24 @@ SSL_new (SSL_CTX * ctx) gnutls_init (&ssl->gnutls_state, ctx->method->connend); gnutls_protocol_set_priority (ssl->gnutls_state, - ctx->method->protocol_priority); + ctx->method->protocol_priority); gnutls_cipher_set_priority (ssl->gnutls_state, - ctx->method->cipher_priority); + ctx->method->cipher_priority); gnutls_compression_set_priority (ssl->gnutls_state, - ctx->method->comp_priority); + ctx->method->comp_priority); gnutls_kx_set_priority (ssl->gnutls_state, ctx->method->kx_priority); gnutls_mac_set_priority (ssl->gnutls_state, ctx->method->mac_priority); gnutls_credentials_set (ssl->gnutls_state, GNUTLS_CRD_CERTIFICATE, - ssl->gnutls_cred); + ssl->gnutls_cred); if (ctx->certfile) gnutls_certificate_set_x509_trust_file (ssl->gnutls_cred, - ctx->certfile, - ctx->certfile_type); + ctx->certfile, + ctx->certfile_type); if (ctx->keyfile) gnutls_certificate_set_x509_key_file (ssl->gnutls_cred, - ctx->certfile, ctx->keyfile, - ctx->keyfile_type); + ctx->certfile, ctx->keyfile, + ctx->keyfile_type); ssl->ctx = ctx; ssl->verify_mode = ctx->verify_mode; ssl->verify_callback = ctx->verify_callback; @@ -333,7 +333,7 @@ SSL_pending (SSL * ssl) void SSL_set_verify (SSL * ssl, int verify_mode, - int (*verify_callback) (int, X509_STORE_CTX *)) + int (*verify_callback) (int, X509_STORE_CTX *)) { ssl->verify_mode = verify_mode; ssl->verify_callback = verify_callback; @@ -346,7 +346,7 @@ SSL_get_peer_certificate (SSL * ssl) int cert_list_size = 0; cert_list = gnutls_certificate_get_peers (ssl->gnutls_state, - &cert_list_size); + &cert_list_size); return cert_list; } @@ -367,17 +367,17 @@ SSL_connect (SSL * ssl) if (ssl->options & SSL_OP_NO_TLSv1) { for (i = 0, j = 0; - i < GNUTLS_MAX_ALGORITHM_NUM && x_priority[i] != 0; i++, j++) - { - if (ssl->ctx->method->protocol_priority[j] == GNUTLS_TLS1) - j++; - else - x_priority[i] = ssl->ctx->method->protocol_priority[j]; - } + i < GNUTLS_MAX_ALGORITHM_NUM && x_priority[i] != 0; i++, j++) + { + if (ssl->ctx->method->protocol_priority[j] == GNUTLS_TLS1) + j++; + else + x_priority[i] = ssl->ctx->method->protocol_priority[j]; + } if (i < GNUTLS_MAX_ALGORITHM_NUM) - x_priority[i] = 0; + x_priority[i] = 0; gnutls_protocol_set_priority (ssl->gnutls_state, - ssl->ctx->method->protocol_priority); + ssl->ctx->method->protocol_priority); } err = gnutls_handshake (ssl->gnutls_state); @@ -392,7 +392,7 @@ SSL_connect (SSL * ssl) store = (X509_STORE_CTX *) calloc (1, sizeof (X509_STORE_CTX)); store->ssl = ssl; store->cert_list = gnutls_certificate_get_peers (ssl->gnutls_state, - &cert_list_size); + &cert_list_size); if (ssl->verify_callback) { @@ -422,17 +422,17 @@ SSL_accept (SSL * ssl) if (ssl->options & SSL_OP_NO_TLSv1) { for (i = 0, j = 0; - i < GNUTLS_MAX_ALGORITHM_NUM && x_priority[i] != 0; i++, j++) - { - if (ssl->ctx->method->protocol_priority[j] == GNUTLS_TLS1) - j++; - else - x_priority[i] = ssl->ctx->method->protocol_priority[j]; - } + i < GNUTLS_MAX_ALGORITHM_NUM && x_priority[i] != 0; i++, j++) + { + if (ssl->ctx->method->protocol_priority[j] == GNUTLS_TLS1) + j++; + else + x_priority[i] = ssl->ctx->method->protocol_priority[j]; + } if (i < GNUTLS_MAX_ALGORITHM_NUM) - x_priority[i] = 0; + x_priority[i] = 0; gnutls_protocol_set_priority (ssl->gnutls_state, - ssl->ctx->method->protocol_priority); + ssl->ctx->method->protocol_priority); } /* FIXME: dh params, do we want client cert? */ @@ -449,7 +449,7 @@ SSL_accept (SSL * ssl) store = (X509_STORE_CTX *) calloc (1, sizeof (X509_STORE_CTX)); store->ssl = ssl; store->cert_list = gnutls_certificate_get_peers (ssl->gnutls_state, - &cert_list_size); + &cert_list_size); if (ssl->verify_callback) { @@ -788,7 +788,7 @@ SSL_CIPHER_get_name (SSL_CIPHER * cipher) return ("NONE"); return gnutls_cipher_suite_get_name (cipher->kx, - cipher->cipher, cipher->mac); + cipher->cipher, cipher->mac); } int @@ -843,13 +843,13 @@ SSL_CIPHER_description (SSL_CIPHER * cipher, char *buf, int size) } if (snprintf (tmpbuf, tmpsize, "%s %s %s %s", - gnutls_protocol_get_name (cipher->version), - gnutls_kx_get_name (cipher->kx), - gnutls_cipher_get_name (cipher->cipher), - gnutls_mac_get_name (cipher->mac)) == -1) + gnutls_protocol_get_name (cipher->version), + gnutls_kx_get_name (cipher->kx), + gnutls_cipher_get_name (cipher->cipher), + gnutls_mac_get_name (cipher->mac)) == -1) { if (local_alloc) - free (tmpbuf); + free (tmpbuf); return (char *) "Buffer too small"; } @@ -894,10 +894,10 @@ X509_NAME_oneline (gnutls_x509_dn * name, char *buf, int len) memset (buf, 0, len); snprintf (buf, len - 1, - "C=%s, ST=%s, L=%s, O=%s, OU=%s, CN=%s/Email=%s", - name->country, name->state_or_province_name, - name->locality_name, name->organization, - name->organizational_unit_name, name->common_name, name->email); + "C=%s, ST=%s, L=%s, O=%s, OU=%s, CN=%s/Email=%s", + name->country, name->state_or_province_name, + name->locality_name, name->organization, + name->organizational_unit_name, name->common_name, name->email); return buf; } diff --git a/libextra/includes/gnutls/extra.h b/libextra/includes/gnutls/extra.h index 4e93aaea1a..1218fc1344 100644 --- a/libextra/includes/gnutls/extra.h +++ b/libextra/includes/gnutls/extra.h @@ -61,8 +61,8 @@ extern "C" */ typedef int (*gnutls_ia_avp_func) (gnutls_session_t session, void *ptr, - const char *last, size_t lastlen, - char **next, size_t * nextlen); + const char *last, size_t lastlen, + char **next, size_t * nextlen); typedef struct gnutls_ia_server_credentials_st *gnutls_ia_server_credentials_t; @@ -74,33 +74,33 @@ extern "C" gnutls_ia_free_client_credentials (gnutls_ia_client_credentials_t sc); extern int gnutls_ia_allocate_client_credentials (gnutls_ia_client_credentials_t * - sc); + sc); extern void gnutls_ia_free_server_credentials (gnutls_ia_server_credentials_t sc); extern int gnutls_ia_allocate_server_credentials (gnutls_ia_server_credentials_t * - sc); + sc); /* Client TLS/IA credential functions. */ extern void gnutls_ia_set_client_avp_function (gnutls_ia_client_credentials_t cred, - gnutls_ia_avp_func avp_func); + gnutls_ia_avp_func avp_func); extern void gnutls_ia_set_client_avp_ptr (gnutls_ia_client_credentials_t cred, - void *ptr); + void *ptr); extern void *gnutls_ia_get_client_avp_ptr (gnutls_ia_client_credentials_t - cred); + cred); /* Server TLS/IA credential functions. */ extern void gnutls_ia_set_server_avp_function (gnutls_ia_server_credentials_t cred, - gnutls_ia_avp_func avp_func); + gnutls_ia_avp_func avp_func); extern void gnutls_ia_set_server_avp_ptr (gnutls_ia_server_credentials_t cred, - void *ptr); + void *ptr); extern void *gnutls_ia_get_server_avp_ptr (gnutls_ia_server_credentials_t - cred); + cred); /* TLS/IA handshake. */ extern int gnutls_ia_handshake_p (gnutls_session_t session); @@ -110,27 +110,27 @@ extern "C" /* TLS/IA low level interface. */ extern int gnutls_ia_permute_inner_secret (gnutls_session_t session, - size_t session_keys_size, - const char *session_keys); + size_t session_keys_size, + const char *session_keys); extern int gnutls_ia_endphase_send (gnutls_session_t session, int final_p); extern int gnutls_ia_verify_endphase (gnutls_session_t session, - const char *checksum); + const char *checksum); extern ssize_t gnutls_ia_send (gnutls_session_t session, - const char *data, size_t sizeofdata); + const char *data, size_t sizeofdata); extern ssize_t gnutls_ia_recv (gnutls_session_t session, - char *data, size_t sizeofdata); + char *data, size_t sizeofdata); /* Utility stuff. */ extern int gnutls_ia_generate_challenge (gnutls_session_t session, - size_t buffer_size, char *buffer); + size_t buffer_size, char *buffer); extern void gnutls_ia_extract_inner_secret (gnutls_session_t session, - char *buffer); + char *buffer); /* Define whether inner phases are wanted. */ extern void gnutls_ia_enable (gnutls_session_t session, - int allow_skip_on_resume); + int allow_skip_on_resume); int gnutls_global_init_extra (void); diff --git a/libextra/includes/gnutls/openssl.h b/libextra/includes/gnutls/openssl.h index be326f0c14..6397fd4c93 100644 --- a/libextra/includes/gnutls/openssl.h +++ b/libextra/includes/gnutls/openssl.h @@ -202,11 +202,11 @@ extern "C" void SSL_CTX_free (SSL_CTX * ctx); int SSL_CTX_set_default_verify_paths (SSL_CTX * ctx); int SSL_CTX_use_certificate_file (SSL_CTX * ctx, const char *certfile, - int type); + int type); int SSL_CTX_use_PrivateKey_file (SSL_CTX * ctx, const char *keyfile, - int type); + int type); void SSL_CTX_set_verify (SSL_CTX * ctx, int verify_mode, - int (*verify_callback) (int, X509_STORE_CTX *)); + int (*verify_callback) (int, X509_STORE_CTX *)); unsigned long SSL_CTX_set_options (SSL_CTX * ctx, unsigned long options); long SSL_CTX_set_mode (SSL_CTX * ctx, long mode); int SSL_CTX_set_cipher_list (SSL_CTX * ctx, const char *list); @@ -239,7 +239,7 @@ extern "C" void SSL_set_connect_state (SSL * ssl); int SSL_pending (SSL * ssl); void SSL_set_verify (SSL * ssl, int verify_mode, - int (*verify_callback) (int, X509_STORE_CTX *)); + int (*verify_callback) (int, X509_STORE_CTX *)); const X509 *SSL_get_peer_certificate (SSL * ssl); /* SSL connection open/close/read/write functions */ @@ -322,13 +322,13 @@ extern "C" void MD5_Update (MD5_CTX * ctx, const void *buf, int len); void MD5_Final (unsigned char *md, MD5_CTX * ctx); unsigned char *MD5 (const unsigned char *buf, unsigned long len, - unsigned char *md); + unsigned char *md); void RIPEMD160_Init (RIPEMD160_CTX * ctx); void RIPEMD160_Update (RIPEMD160_CTX * ctx, const void *buf, int len); void RIPEMD160_Final (unsigned char *md, RIPEMD160_CTX * ctx); unsigned char *RIPEMD160 (const unsigned char *buf, unsigned long len, - unsigned char *md); + unsigned char *md); #ifdef __cplusplus } diff --git a/libextra/openssl_compat.c b/libextra/openssl_compat.c index 5c5ae02f4a..83b8a1670c 100644 --- a/libextra/openssl_compat.c +++ b/libextra/openssl_compat.c @@ -29,7 +29,7 @@ #include <gnutls_global.h> #include <gnutls_errors.h> -#include <string.h> /* memset */ +#include <string.h> /* memset */ #include <x509/x509_int.h> #include <libtasn1.h> #include <gnutls/x509.h> @@ -54,7 +54,7 @@ gnutls_x509_extract_dn (const gnutls_datum_t * idn, gnutls_x509_dn * rdn) if ((result = asn1_create_element (_gnutls_get_pkix (), - "PKIX1.Name", &dn)) != ASN1_SUCCESS) + "PKIX1.Name", &dn)) != ASN1_SUCCESS) { return _gnutls_asn2err (result); } @@ -71,33 +71,33 @@ gnutls_x509_extract_dn (const gnutls_datum_t * idn, gnutls_x509_dn * rdn) len = sizeof (rdn->country); _gnutls_x509_parse_dn_oid (dn, "", GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, - rdn->country, &len); + rdn->country, &len); len = sizeof (rdn->organization); _gnutls_x509_parse_dn_oid (dn, "", GNUTLS_OID_X520_ORGANIZATION_NAME, 0, - 0, rdn->organization, &len); + 0, rdn->organization, &len); len = sizeof (rdn->organizational_unit_name); _gnutls_x509_parse_dn_oid (dn, "", - GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, 0, - 0, rdn->organizational_unit_name, &len); + GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, 0, + 0, rdn->organizational_unit_name, &len); len = sizeof (rdn->common_name); _gnutls_x509_parse_dn_oid (dn, "", GNUTLS_OID_X520_COMMON_NAME, 0, 0, - rdn->common_name, &len); + rdn->common_name, &len); len = sizeof (rdn->locality_name); _gnutls_x509_parse_dn_oid (dn, "", GNUTLS_OID_X520_LOCALITY_NAME, 0, 0, - rdn->locality_name, &len); + rdn->locality_name, &len); len = sizeof (rdn->state_or_province_name); _gnutls_x509_parse_dn_oid (dn, "", - GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, 0, 0, - rdn->state_or_province_name, &len); + GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, 0, 0, + rdn->state_or_province_name, &len); len = sizeof (rdn->email); _gnutls_x509_parse_dn_oid (dn, "", GNUTLS_OID_PKCS9_EMAIL, 0, 0, - rdn->email, &len); + rdn->email, &len); asn1_delete_structure (&dn); @@ -116,7 +116,7 @@ gnutls_x509_extract_dn (const gnutls_datum_t * idn, gnutls_x509_dn * rdn) -*/ int gnutls_x509_extract_certificate_dn (const gnutls_datum_t * cert, - gnutls_x509_dn * ret) + gnutls_x509_dn * ret) { gnutls_x509_crt_t xcert; int result; @@ -135,33 +135,33 @@ gnutls_x509_extract_certificate_dn (const gnutls_datum_t * cert, len = sizeof (ret->country); gnutls_x509_crt_get_dn_by_oid (xcert, GNUTLS_OID_X520_COUNTRY_NAME, 0, - 0, ret->country, &len); + 0, ret->country, &len); len = sizeof (ret->organization); gnutls_x509_crt_get_dn_by_oid (xcert, GNUTLS_OID_X520_ORGANIZATION_NAME, - 0, 0, ret->organization, &len); + 0, 0, ret->organization, &len); len = sizeof (ret->organizational_unit_name); gnutls_x509_crt_get_dn_by_oid (xcert, - GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, - 0, 0, ret->organizational_unit_name, &len); + GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, + 0, 0, ret->organizational_unit_name, &len); len = sizeof (ret->common_name); gnutls_x509_crt_get_dn_by_oid (xcert, GNUTLS_OID_X520_COMMON_NAME, 0, 0, - ret->common_name, &len); + ret->common_name, &len); len = sizeof (ret->locality_name); gnutls_x509_crt_get_dn_by_oid (xcert, GNUTLS_OID_X520_LOCALITY_NAME, 0, - 0, ret->locality_name, &len); + 0, ret->locality_name, &len); len = sizeof (ret->state_or_province_name); gnutls_x509_crt_get_dn_by_oid (xcert, - GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, - 0, 0, ret->state_or_province_name, &len); + GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, + 0, 0, ret->state_or_province_name, &len); len = sizeof (ret->email); gnutls_x509_crt_get_dn_by_oid (xcert, GNUTLS_OID_PKCS9_EMAIL, 0, 0, - ret->email, &len); + ret->email, &len); gnutls_x509_crt_deinit (xcert); @@ -180,7 +180,7 @@ gnutls_x509_extract_certificate_dn (const gnutls_datum_t * cert, -*/ int gnutls_x509_extract_certificate_issuer_dn (const gnutls_datum_t * cert, - gnutls_x509_dn * ret) + gnutls_x509_dn * ret) { gnutls_x509_crt_t xcert; int result; @@ -199,39 +199,39 @@ gnutls_x509_extract_certificate_issuer_dn (const gnutls_datum_t * cert, len = sizeof (ret->country); gnutls_x509_crt_get_issuer_dn_by_oid (xcert, - GNUTLS_OID_X520_COUNTRY_NAME, 0, - 0, ret->country, &len); + GNUTLS_OID_X520_COUNTRY_NAME, 0, + 0, ret->country, &len); len = sizeof (ret->organization); gnutls_x509_crt_get_issuer_dn_by_oid (xcert, - GNUTLS_OID_X520_ORGANIZATION_NAME, - 0, 0, ret->organization, &len); + GNUTLS_OID_X520_ORGANIZATION_NAME, + 0, 0, ret->organization, &len); len = sizeof (ret->organizational_unit_name); gnutls_x509_crt_get_issuer_dn_by_oid (xcert, - GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, - 0, 0, - ret->organizational_unit_name, &len); + GNUTLS_OID_X520_ORGANIZATIONAL_UNIT_NAME, + 0, 0, + ret->organizational_unit_name, &len); len = sizeof (ret->common_name); gnutls_x509_crt_get_issuer_dn_by_oid (xcert, - GNUTLS_OID_X520_COMMON_NAME, 0, 0, - ret->common_name, &len); + GNUTLS_OID_X520_COMMON_NAME, 0, 0, + ret->common_name, &len); len = sizeof (ret->locality_name); gnutls_x509_crt_get_issuer_dn_by_oid (xcert, - GNUTLS_OID_X520_LOCALITY_NAME, 0, - 0, ret->locality_name, &len); + GNUTLS_OID_X520_LOCALITY_NAME, 0, + 0, ret->locality_name, &len); len = sizeof (ret->state_or_province_name); gnutls_x509_crt_get_issuer_dn_by_oid (xcert, - GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, - 0, 0, ret->state_or_province_name, - &len); + GNUTLS_OID_X520_STATE_OR_PROVINCE_NAME, + 0, 0, ret->state_or_province_name, + &len); len = sizeof (ret->email); gnutls_x509_crt_get_issuer_dn_by_oid (xcert, GNUTLS_OID_PKCS9_EMAIL, 0, - 0, ret->email, &len); + 0, ret->email, &len); gnutls_x509_crt_deinit (xcert); @@ -258,8 +258,8 @@ gnutls_x509_extract_certificate_issuer_dn (const gnutls_datum_t * cert, -*/ int gnutls_x509_extract_certificate_subject_alt_name (const gnutls_datum_t * - cert, int seq, - char *ret, int *ret_size) + cert, int seq, + char *ret, int *ret_size) { gnutls_x509_crt_t xcert; int result; @@ -434,7 +434,7 @@ gnutls_x509_extract_certificate_version (const gnutls_datum_t * cert) -*/ int gnutls_x509_extract_certificate_serial (const gnutls_datum_t * cert, - char *result, int *result_size) + char *result, int *result_size) { gnutls_x509_crt_t xcert; size_t size = *result_size; @@ -478,7 +478,7 @@ gnutls_x509_extract_certificate_serial (const gnutls_datum_t * cert, -*/ int gnutls_x509_extract_certificate_pk_algorithm (const gnutls_datum_t * - cert, int *bits) + cert, int *bits) { gnutls_x509_crt_t xcert; int result; @@ -518,9 +518,9 @@ gnutls_x509_extract_certificate_pk_algorithm (const gnutls_datum_t * -*/ int gnutls_x509_extract_certificate_dn_string (char *buf, - unsigned int sizeof_buf, - const gnutls_datum_t * cert, - int issuer) + unsigned int sizeof_buf, + const gnutls_datum_t * cert, + int issuer) { gnutls_x509_crt_t xcert; int result; @@ -584,11 +584,11 @@ gnutls_x509_extract_certificate_dn_string (char *buf, -*/ int gnutls_x509_verify_certificate (const gnutls_datum_t * cert_list, - int cert_list_length, - const gnutls_datum_t * CA_list, - int CA_list_length, - const gnutls_datum_t * CRL_list, - int CRL_list_length) + int cert_list_length, + const gnutls_datum_t * CA_list, + int CA_list_length, + const gnutls_datum_t * CRL_list, + int CRL_list_length) { unsigned int verify; gnutls_x509_crt_t *peer_certificate_list = NULL; @@ -640,19 +640,19 @@ gnutls_x509_verify_certificate (const gnutls_datum_t * cert_list, { ret = gnutls_x509_crt_init (&peer_certificate_list[i]); if (ret < 0) - { - gnutls_assert (); - goto cleanup; - } + { + gnutls_assert (); + goto cleanup; + } ret = - gnutls_x509_crt_import (peer_certificate_list[i], - &cert_list[i], GNUTLS_X509_FMT_DER); + gnutls_x509_crt_import (peer_certificate_list[i], + &cert_list[i], GNUTLS_X509_FMT_DER); if (ret < 0) - { - gnutls_assert (); - goto cleanup; - } + { + gnutls_assert (); + goto cleanup; + } } /* convert CA_list to gnutls_x509_cert* list @@ -661,19 +661,19 @@ gnutls_x509_verify_certificate (const gnutls_datum_t * cert_list, { ret = gnutls_x509_crt_init (&ca_certificate_list[i]); if (ret < 0) - { - gnutls_assert (); - goto cleanup; - } + { + gnutls_assert (); + goto cleanup; + } ret = - gnutls_x509_crt_import (ca_certificate_list[i], - &CA_list[i], GNUTLS_X509_FMT_DER); + gnutls_x509_crt_import (ca_certificate_list[i], + &CA_list[i], GNUTLS_X509_FMT_DER); if (ret < 0) - { - gnutls_assert (); - goto cleanup; - } + { + gnutls_assert (); + goto cleanup; + } } #ifdef ENABLE_PKI @@ -683,19 +683,19 @@ gnutls_x509_verify_certificate (const gnutls_datum_t * cert_list, { ret = gnutls_x509_crl_init (&crl_list[i]); if (ret < 0) - { - gnutls_assert (); - goto cleanup; - } + { + gnutls_assert (); + goto cleanup; + } ret = - gnutls_x509_crl_import (crl_list[i], - &CRL_list[i], GNUTLS_X509_FMT_DER); + gnutls_x509_crl_import (crl_list[i], + &CRL_list[i], GNUTLS_X509_FMT_DER); if (ret < 0) - { - gnutls_assert (); - goto cleanup; - } + { + gnutls_assert (); + goto cleanup; + } } #endif @@ -703,10 +703,10 @@ gnutls_x509_verify_certificate (const gnutls_datum_t * cert_list, */ ret = gnutls_x509_crt_list_verify (peer_certificate_list, - peer_certificate_list_size, - ca_certificate_list, - ca_certificate_list_size, crl_list, - crl_list_size, 0, &verify); + peer_certificate_list_size, + ca_certificate_list, + ca_certificate_list_size, crl_list, + crl_list_size, 0, &verify); if (ret < 0) { @@ -721,22 +721,22 @@ cleanup: if (peer_certificate_list != NULL) for (x = 0; x < peer_certificate_list_size; x++) { - if (peer_certificate_list[x] != NULL) - gnutls_x509_crt_deinit (peer_certificate_list[x]); + if (peer_certificate_list[x] != NULL) + gnutls_x509_crt_deinit (peer_certificate_list[x]); } if (ca_certificate_list != NULL) for (x = 0; x < ca_certificate_list_size; x++) { - if (ca_certificate_list[x] != NULL) - gnutls_x509_crt_deinit (ca_certificate_list[x]); + if (ca_certificate_list[x] != NULL) + gnutls_x509_crt_deinit (ca_certificate_list[x]); } #ifdef ENABLE_PKI if (crl_list != NULL) for (x = 0; x < crl_list_size; x++) { - if (crl_list[x] != NULL) - gnutls_x509_crl_deinit (crl_list[x]); + if (crl_list[x] != NULL) + gnutls_x509_crl_deinit (crl_list[x]); } gnutls_free (crl_list); @@ -802,9 +802,9 @@ gnutls_x509_extract_key_pk_algorithm (const gnutls_datum_t * key) -*/ int gnutls_x509_pkcs7_extract_certificate (const gnutls_datum_t * - pkcs7_struct, int indx, - char *certificate, - int *certificate_size) + pkcs7_struct, int indx, + char *certificate, + int *certificate_size) { gnutls_pkcs7_t pkcs7; int result; diff --git a/libextra/openssl_compat.h b/libextra/openssl_compat.h index 4720ad1e81..52484f2b19 100644 --- a/libextra/openssl_compat.h +++ b/libextra/openssl_compat.h @@ -31,40 +31,40 @@ int gnutls_x509_extract_dn (const gnutls_datum_t *, gnutls_x509_dn *); int gnutls_x509_extract_dn_string (const gnutls_datum_t * idn, - char *buf, unsigned int sizeof_buf); + char *buf, unsigned int sizeof_buf); int gnutls_x509_extract_certificate_dn (const gnutls_datum_t *, - gnutls_x509_dn *); + gnutls_x509_dn *); int gnutls_x509_extract_certificate_dn_string (char *buf, - unsigned int sizeof_buf, - const gnutls_datum_t * cert, - int issuer); + unsigned int sizeof_buf, + const gnutls_datum_t * cert, + int issuer); int gnutls_x509_extract_certificate_issuer_dn (const gnutls_datum_t *, - gnutls_x509_dn *); + gnutls_x509_dn *); int gnutls_x509_extract_certificate_version (const gnutls_datum_t *); int gnutls_x509_extract_certificate_serial (const gnutls_datum_t * cert, - char *result, int *result_size); + char *result, int *result_size); time_t gnutls_x509_extract_certificate_activation_time (const gnutls_datum_t - *); + *); time_t gnutls_x509_extract_certificate_expiration_time (const gnutls_datum_t - *); + *); int gnutls_x509_extract_certificate_subject_alt_name (const gnutls_datum_t - *, int seq, char *, - int *); + *, int seq, char *, + int *); int gnutls_x509_pkcs7_extract_certificate (const gnutls_datum_t * - pkcs7_struct, int indx, - char *certificate, - int *certificate_size); + pkcs7_struct, int indx, + char *certificate, + int *certificate_size); int gnutls_x509_extract_certificate_pk_algorithm (const gnutls_datum_t * - cert, int *bits); + cert, int *bits); int gnutls_x509_extract_certificate_ca_status (const gnutls_datum_t * cert); int gnutls_x509_extract_key_pk_algorithm (const gnutls_datum_t * key); int gnutls_x509_verify_certificate (const gnutls_datum_t * cert_list, - int cert_list_length, - const gnutls_datum_t * CA_list, - int CA_list_length, - const gnutls_datum_t * CRL_list, - int CRL_list_length); + int cert_list_length, + const gnutls_datum_t * CA_list, + int CA_list_length, + const gnutls_datum_t * CRL_list, + int CRL_list_length); #define gnutls_x509_fingerprint gnutls_fingerprint #define gnutls_x509_certificate_format gnutls_x509_crt_fmt_t |