diff options
-rw-r--r-- | NEWS | 34 | ||||
-rw-r--r-- | doc/gnutls.texi | 4 | ||||
-rw-r--r-- | doc/manpages/Makefile.am | 2 | ||||
-rw-r--r-- | includes/gnutls/gnutls.h.in | 14 | ||||
-rw-r--r-- | includes/gnutls/openpgp.h | 78 | ||||
-rw-r--r-- | lib/auth_cert.c | 12 | ||||
-rw-r--r-- | lib/gnutls_cert.c | 8 | ||||
-rw-r--r-- | lib/gnutls_extra_hooks.c | 24 | ||||
-rw-r--r-- | lib/gnutls_extra_hooks.h | 36 | ||||
-rw-r--r-- | lib/gnutls_state.c | 2 | ||||
-rw-r--r-- | libextra/gnutls_extra.c | 4 | ||||
-rw-r--r-- | libextra/gnutls_extra.h | 4 | ||||
-rw-r--r-- | libextra/gnutls_openpgp.c | 14 | ||||
-rw-r--r-- | libextra/openpgp/compat.c | 42 | ||||
-rw-r--r-- | libextra/openpgp/extras.c | 2 | ||||
-rw-r--r-- | libextra/openpgp/gnutls_openpgp.h | 2 | ||||
-rw-r--r-- | libextra/openpgp/openpgp.h | 44 | ||||
-rw-r--r-- | libextra/openpgp/pgp.c | 72 | ||||
-rw-r--r-- | libextra/openpgp/pgpverify.c | 10 | ||||
-rw-r--r-- | libextra/openpgp/privkey.c | 4 | ||||
-rw-r--r-- | src/common.c | 22 |
21 files changed, 217 insertions, 217 deletions
@@ -6,24 +6,24 @@ See the end for copying conditions. * Version 2.1.4 (unreleased) ** API and ABI modifications: -gnutls_openpgp_key_t: RENAMED to gnutls_openpgp_cert_t -gnutls_openpgp_key_status_t: RENAMEDS gnutls_openpgp_cert_status_t +gnutls_openpgp_key_t: RENAMED to gnutls_openpgp_crt_t +gnutls_openpgp_key_status_t: RENAMEDS gnutls_openpgp_crt_status_t gnutls_openpgp_send_key: RENAMED to gnutls_openpgp_send_cert -gnutls_openpgp_key_init: RENAMED to gnutls_openpgp_cert_init -gnutls_openpgp_key_import: RENAMED to gnutls_openpgp_cert_import -gnutls_openpgp_key_export: RENAMED to gnutls_openpgp_cert_export -gnutls_openpgp_key_check_hostname: RENAMED to gnutls_openpgp_cert_check_hostname -gnutls_openpgp_key_get_creation_time: RENAMED to gnutls_openpgp_cert_get_creation_time -gnutls_openpgp_key_get_expiration_time: RENAMED to gnutls_openpgp_cert_get_expiration_time -gnutls_openpgp_key_get_fingerprint: RENAMED to gnutls_openpgp_cert_get_fingerprint -gnutls_openpgp_key_get_version: RENAMED to gnutls_openpgp_cert_get_version -gnutls_openpgp_key_get_pk_algorithm: RENAMED to gnutls_openpgp_cert_get_pk_algorithm -gnutls_openpgp_key_get_name: RENAMED to gnutls_openpgp_cert_get_name -gnutls_openpgp_key_deinit: RENAMED to gnutls_openpgp_cert_deinit -gnutls_openpgp_key_get_id: RENAMED to gnutls_openpgp_cert_get_id -gnutls_openpgp_key_get_key_usage: RENAMED to gnutls_openpgp_cert_get_key_usage -gnutls_openpgp_key_verify_ring: RENAMED to gnutls_openpgp_cert_verify_ring -gnutls_openpgp_key_verify_self: RENAMED to gnutls_openpgp_cert_verify_self +gnutls_openpgp_key_init: RENAMED to gnutls_openpgp_crt_init +gnutls_openpgp_key_import: RENAMED to gnutls_openpgp_crt_import +gnutls_openpgp_key_export: RENAMED to gnutls_openpgp_crt_export +gnutls_openpgp_key_check_hostname: RENAMED to gnutls_openpgp_crt_check_hostname +gnutls_openpgp_key_get_creation_time: RENAMED to gnutls_openpgp_crt_get_creation_time +gnutls_openpgp_key_get_expiration_time: RENAMED to gnutls_openpgp_crt_get_expiration_time +gnutls_openpgp_key_get_fingerprint: RENAMED to gnutls_openpgp_crt_get_fingerprint +gnutls_openpgp_key_get_version: RENAMED to gnutls_openpgp_crt_get_version +gnutls_openpgp_key_get_pk_algorithm: RENAMED to gnutls_openpgp_crt_get_pk_algorithm +gnutls_openpgp_key_get_name: RENAMED to gnutls_openpgp_crt_get_name +gnutls_openpgp_key_deinit: RENAMED to gnutls_openpgp_crt_deinit +gnutls_openpgp_key_get_id: RENAMED to gnutls_openpgp_crt_get_id +gnutls_openpgp_key_get_key_usage: RENAMED to gnutls_openpgp_crt_get_key_usage +gnutls_openpgp_key_verify_ring: RENAMED to gnutls_openpgp_crt_verify_ring +gnutls_openpgp_key_verify_self: RENAMED to gnutls_openpgp_crt_verify_self * Version 2.1.3 (released 2007-10-17) diff --git a/doc/gnutls.texi b/doc/gnutls.texi index 5d6c9a4fb0..406b9d4ae8 100644 --- a/doc/gnutls.texi +++ b/doc/gnutls.texi @@ -1850,7 +1850,7 @@ belong to the actual owner. @subsection @acronym{OpenPGP} Keys In @acronym{GnuTLS} the @acronym{OpenPGP} key structures -@xcite{RFC2440} are handled using the @code{gnutls_openpgp_cert_t} type +@xcite{RFC2440} are handled using the @code{gnutls_openpgp_crt_t} type and the corresponding private keys with the @code{gnutls_openpgp_privkey_t} type. All the prototypes for the key handling functions can be found at @file{gnutls/openpgp.h}. @@ -1865,7 +1865,7 @@ GPGME (@url{http://www.gnupg.org/related_software/gpgme/}) is recommended. There is one verification function in @acronym{GnuTLS}, the -@ref{gnutls_openpgp_cert_verify_ring}. +@ref{gnutls_openpgp_crt_verify_ring}. This checks an @acronym{OpenPGP} key against a given set of public keys (keyring) and returns the key status. The key verification status is the same as in @acronym{X.509} certificates, although the meaning and interpretation are diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am index 65bcc3b48b..05a9103d37 100644 --- a/doc/manpages/Makefile.am +++ b/doc/manpages/Makefile.am @@ -26,7 +26,7 @@ if ENABLE_SRP dist_man_MANS += srptool.1 endif -APIMANS = gnutls_oprfi_enable_client.3 gnutls_oprfi_enable_server.3 gnutls_server_name_get.3 gnutls_server_name_set.3 gnutls_alert_get_name.3 gnutls_alert_send.3 gnutls_error_to_alert.3 gnutls_alert_send_appropriate.3 gnutls_alert_get.3 gnutls_mac_get_name.3 gnutls_mac_get_key_size.3 gnutls_mac_list.3 gnutls_compression_get_name.3 gnutls_compression_list.3 gnutls_cipher_get_key_size.3 gnutls_cipher_get_name.3 gnutls_cipher_list.3 gnutls_kx_get_name.3 gnutls_kx_list.3 gnutls_protocol_get_name.3 gnutls_protocol_list.3 gnutls_cipher_suite_get_name.3 gnutls_cipher_suite_info.3 gnutls_certificate_type_get_name.3 gnutls_certificate_type_list.3 gnutls_sign_algorithm_get_name.3 gnutls_pk_algorithm_get_name.3 gnutls_anon_free_server_credentials.3 gnutls_anon_allocate_server_credentials.3 gnutls_anon_free_client_credentials.3 gnutls_anon_allocate_client_credentials.3 gnutls_anon_set_server_dh_params.3 gnutls_anon_set_server_params_function.3 gnutls_credentials_clear.3 gnutls_credentials_set.3 gnutls_auth_get_type.3 gnutls_auth_server_get_type.3 gnutls_auth_client_get_type.3 gnutls_transport_set_errno.3 gnutls_transport_set_global_errno.3 gnutls_record_check_pending.3 gnutls_certificate_free_keys.3 gnutls_certificate_free_cas.3 gnutls_certificate_free_ca_names.3 gnutls_certificate_free_credentials.3 gnutls_certificate_allocate_credentials.3 gnutls_certificate_server_set_request.3 gnutls_certificate_client_set_retrieve_function.3 gnutls_certificate_server_set_retrieve_function.3 gnutls_certificate_verify_peers2.3 gnutls_certificate_verify_peers.3 gnutls_certificate_expiration_time_peers.3 gnutls_certificate_activation_time_peers.3 gnutls_sign_callback_set.3 gnutls_sign_callback_get.3 gnutls_db_set_retrieve_function.3 gnutls_db_set_remove_function.3 gnutls_db_set_store_function.3 gnutls_db_set_ptr.3 gnutls_db_get_ptr.3 gnutls_db_set_cache_expiration.3 gnutls_db_check_entry.3 gnutls_db_remove_session.3 gnutls_dh_params_import_raw.3 gnutls_dh_params_init.3 gnutls_dh_params_deinit.3 gnutls_dh_params_cpy.3 gnutls_dh_params_generate2.3 gnutls_dh_params_import_pkcs3.3 gnutls_dh_params_export_pkcs3.3 gnutls_dh_params_export_raw.3 gnutls_error_is_fatal.3 gnutls_perror.3 gnutls_strerror.3 gnutls_global_set_log_function.3 gnutls_global_set_log_level.3 gnutls_global_set_mem_functions.3 gnutls_global_init.3 gnutls_global_deinit.3 gnutls_transport_set_pull_function.3 gnutls_transport_set_push_function.3 gnutls_check_version.3 gnutls_rehandshake.3 gnutls_handshake.3 gnutls_handshake_set_max_packet_length.3 gnutls_handshake_get_last_in.3 gnutls_handshake_get_last_out.3 gnutls_malloc.3 gnutls_free.3 gnutls_cipher_set_priority.3 gnutls_kx_set_priority.3 gnutls_mac_set_priority.3 gnutls_compression_set_priority.3 gnutls_protocol_set_priority.3 gnutls_certificate_type_set_priority.3 gnutls_set_default_priority.3 gnutls_set_default_export_priority.3 gnutls_psk_free_client_credentials.3 gnutls_psk_allocate_client_credentials.3 gnutls_psk_set_client_credentials.3 gnutls_psk_free_server_credentials.3 gnutls_psk_allocate_server_credentials.3 gnutls_psk_set_server_credentials_file.3 gnutls_psk_set_server_credentials_function.3 gnutls_psk_set_client_credentials_function.3 gnutls_psk_server_get_username.3 gnutls_hex_decode.3 gnutls_hex_encode.3 gnutls_psk_set_server_dh_params.3 gnutls_psk_set_server_params_function.3 gnutls_protocol_get_version.3 gnutls_transport_set_lowat.3 gnutls_transport_set_ptr.3 gnutls_transport_set_ptr2.3 gnutls_transport_get_ptr.3 gnutls_transport_get_ptr2.3 gnutls_bye.3 gnutls_record_send.3 gnutls_record_recv.3 gnutls_record_get_max_size.3 gnutls_record_set_max_size.3 gnutls_rsa_params_import_raw.3 gnutls_rsa_params_init.3 gnutls_rsa_params_deinit.3 gnutls_rsa_params_cpy.3 gnutls_rsa_params_generate2.3 gnutls_rsa_params_import_pkcs1.3 gnutls_rsa_params_export_pkcs1.3 gnutls_rsa_params_export_raw.3 gnutls_session_get_data.3 gnutls_session_get_data2.3 gnutls_session_get_id.3 gnutls_session_set_data.3 gnutls_cipher_get.3 gnutls_certificate_type_get.3 gnutls_kx_get.3 gnutls_mac_get.3 gnutls_compression_get.3 gnutls_init.3 gnutls_deinit.3 gnutls_openpgp_send_key.3 gnutls_certificate_send_x509_rdn_sequence.3 gnutls_handshake_set_private_extensions.3 gnutls_prf_raw.3 gnutls_prf.3 gnutls_session_get_client_random.3 gnutls_session_get_server_random.3 gnutls_session_get_master_secret.3 gnutls_session_is_resumed.3 gnutls_session_get_ptr.3 gnutls_session_set_ptr.3 gnutls_record_get_direction.3 gnutls_handshake_set_post_client_hello_function.3 gnutls_dh_set_prime_bits.3 gnutls_dh_get_group.3 gnutls_dh_get_pubkey.3 gnutls_rsa_export_get_pubkey.3 gnutls_dh_get_secret_bits.3 gnutls_dh_get_prime_bits.3 gnutls_rsa_export_get_modulus_bits.3 gnutls_dh_get_peers_public_bits.3 gnutls_certificate_get_ours.3 gnutls_certificate_get_peers.3 gnutls_certificate_client_get_request_status.3 gnutls_fingerprint.3 gnutls_certificate_set_dh_params.3 gnutls_certificate_set_params_function.3 gnutls_certificate_set_verify_flags.3 gnutls_certificate_set_verify_limits.3 gnutls_certificate_set_rsa_export_params.3 gnutls_psk_set_params_function.3 gnutls_anon_set_params_function.3 gnutls_certificate_set_x509_key_mem.3 gnutls_certificate_set_x509_key.3 gnutls_certificate_set_x509_key_file.3 gnutls_certificate_set_x509_trust_mem.3 gnutls_certificate_set_x509_trust.3 gnutls_certificate_set_x509_trust_file.3 gnutls_certificate_set_x509_crl_mem.3 gnutls_certificate_set_x509_crl.3 gnutls_certificate_set_x509_crl_file.3 gnutls_certificate_set_x509_simple_pkcs12_file.3 gnutls_certificate_free_crls.3 gnutls_pem_base64_encode.3 gnutls_pem_base64_encode_alloc.3 gnutls_pem_base64_decode.3 gnutls_pem_base64_decode_alloc.3 gnutls_global_init_extra.3 gnutls_extra_check_version.3 gnutls_ia_permute_inner_secret.3 gnutls_ia_generate_challenge.3 gnutls_ia_extract_inner_secret.3 gnutls_ia_endphase_send.3 gnutls_ia_verify_endphase.3 gnutls_ia_send.3 gnutls_ia_recv.3 gnutls_ia_handshake_p.3 gnutls_ia_handshake.3 gnutls_ia_allocate_client_credentials.3 gnutls_ia_free_client_credentials.3 gnutls_ia_set_client_avp_function.3 gnutls_ia_set_client_avp_ptr.3 gnutls_ia_get_client_avp_ptr.3 gnutls_ia_allocate_server_credentials.3 gnutls_ia_free_server_credentials.3 gnutls_ia_set_server_avp_function.3 gnutls_ia_set_server_avp_ptr.3 gnutls_ia_get_server_avp_ptr.3 gnutls_ia_enable.3 gnutls_certificate_set_openpgp_key_mem.3 gnutls_certificate_set_openpgp_key_file.3 gnutls_certificate_set_openpgp_keyring_file.3 gnutls_certificate_set_openpgp_keyring_mem.3 gnutls_openpgp_set_recv_key_function.3 gnutls_certificate_set_openpgp_key.3 gnutls_openpgp_privkey_sign_hash.3 gnutls_x509_dn_oid_known.3 gnutls_x509_crl_init.3 gnutls_x509_crl_deinit.3 gnutls_x509_crl_import.3 gnutls_x509_crl_get_issuer_dn.3 gnutls_x509_crl_get_issuer_dn_by_oid.3 gnutls_x509_crl_get_dn_oid.3 gnutls_x509_crl_get_signature_algorithm.3 gnutls_x509_crl_get_signature.3 gnutls_x509_crl_get_version.3 gnutls_x509_crl_get_this_update.3 gnutls_x509_crl_get_next_update.3 gnutls_x509_crl_get_crt_count.3 gnutls_x509_crl_get_crt_serial.3 gnutls_x509_crl_export.3 gnutls_x509_crl_set_version.3 gnutls_x509_crl_sign2.3 gnutls_x509_crl_sign.3 gnutls_x509_crl_set_this_update.3 gnutls_x509_crl_set_next_update.3 gnutls_x509_crl_set_crt_serial.3 gnutls_x509_crl_set_crt.3 gnutls_x509_crq_init.3 gnutls_x509_crq_deinit.3 gnutls_x509_crq_import.3 gnutls_x509_crq_get_dn.3 gnutls_x509_crq_get_dn_by_oid.3 gnutls_x509_crq_get_dn_oid.3 gnutls_x509_crq_get_challenge_password.3 gnutls_x509_crq_set_attribute_by_oid.3 gnutls_x509_crq_get_attribute_by_oid.3 gnutls_x509_crq_set_dn_by_oid.3 gnutls_x509_crq_set_version.3 gnutls_x509_crq_get_version.3 gnutls_x509_crq_set_key.3 gnutls_x509_crq_set_challenge_password.3 gnutls_x509_crq_sign2.3 gnutls_x509_crq_sign.3 gnutls_x509_crq_export.3 gnutls_x509_crq_get_pk_algorithm.3 gnutls_x509_rdn_get.3 gnutls_x509_rdn_get_by_oid.3 gnutls_x509_rdn_get_oid.3 gnutls_x509_crt_print.3 gnutls_x509_crl_print.3 gnutls_pkcs12_init.3 gnutls_pkcs12_deinit.3 gnutls_pkcs12_import.3 gnutls_pkcs12_export.3 gnutls_pkcs12_get_bag.3 gnutls_pkcs12_set_bag.3 gnutls_pkcs12_generate_mac.3 gnutls_pkcs12_verify_mac.3 gnutls_pkcs12_bag_init.3 gnutls_pkcs12_bag_deinit.3 gnutls_pkcs12_bag_get_type.3 gnutls_pkcs12_bag_get_count.3 gnutls_pkcs12_bag_get_data.3 gnutls_pkcs12_bag_set_data.3 gnutls_pkcs12_bag_set_crt.3 gnutls_pkcs12_bag_set_crl.3 gnutls_pkcs12_bag_set_key_id.3 gnutls_pkcs12_bag_get_key_id.3 gnutls_pkcs12_bag_get_friendly_name.3 gnutls_pkcs12_bag_set_friendly_name.3 gnutls_pkcs12_bag_decrypt.3 gnutls_pkcs12_bag_encrypt.3 gnutls_pkcs7_init.3 gnutls_pkcs7_deinit.3 gnutls_pkcs7_import.3 gnutls_pkcs7_get_crt_raw.3 gnutls_pkcs7_get_crt_count.3 gnutls_pkcs7_export.3 gnutls_pkcs7_set_crt_raw.3 gnutls_pkcs7_set_crt.3 gnutls_pkcs7_delete_crt.3 gnutls_pkcs7_get_crl_raw.3 gnutls_pkcs7_get_crl_count.3 gnutls_pkcs7_set_crl_raw.3 gnutls_pkcs7_set_crl.3 gnutls_pkcs7_delete_crl.3 gnutls_x509_privkey_init.3 gnutls_x509_privkey_deinit.3 gnutls_x509_privkey_cpy.3 gnutls_x509_privkey_import.3 gnutls_x509_privkey_import_rsa_raw.3 gnutls_x509_privkey_import_dsa_raw.3 gnutls_x509_privkey_get_pk_algorithm.3 gnutls_x509_privkey_export.3 gnutls_x509_privkey_export_rsa_raw.3 gnutls_x509_privkey_export_dsa_raw.3 gnutls_x509_privkey_generate.3 gnutls_x509_privkey_get_key_id.3 gnutls_x509_privkey_sign_data.3 gnutls_x509_privkey_sign_hash.3 gnutls_x509_privkey_verify_data.3 gnutls_x509_privkey_fix.3 gnutls_x509_privkey_export_pkcs8.3 gnutls_x509_privkey_import_pkcs8.3 gnutls_x509_crt_check_hostname.3 gnutls_x509_crt_check_issuer.3 gnutls_x509_crt_list_verify.3 gnutls_x509_crt_verify.3 gnutls_x509_crl_check_issuer.3 gnutls_x509_crl_verify.3 gnutls_x509_crt_init.3 gnutls_x509_crt_deinit.3 gnutls_x509_crt_import.3 gnutls_x509_crt_get_issuer_dn.3 gnutls_x509_crt_get_issuer_dn_by_oid.3 gnutls_x509_crt_get_issuer_dn_oid.3 gnutls_x509_crt_get_dn.3 gnutls_x509_crt_get_dn_by_oid.3 gnutls_x509_crt_get_dn_oid.3 gnutls_x509_crt_get_signature_algorithm.3 gnutls_x509_crt_get_signature.3 gnutls_x509_crt_get_version.3 gnutls_x509_crt_get_activation_time.3 gnutls_x509_crt_get_expiration_time.3 gnutls_x509_crt_get_serial.3 gnutls_x509_crt_get_subject_key_id.3 gnutls_x509_crt_get_authority_key_id.3 gnutls_x509_crt_get_pk_algorithm.3 gnutls_x509_crt_get_subject_alt_name.3 gnutls_x509_crt_get_subject_alt_othername_oid.3 gnutls_x509_crt_get_basic_constraints.3 gnutls_x509_crt_get_ca_status.3 gnutls_x509_crt_get_key_usage.3 gnutls_x509_crt_get_proxy.3 gnutls_x509_crt_get_extension_by_oid.3 gnutls_x509_crt_get_extension_oid.3 gnutls_x509_crt_get_extension_info.3 gnutls_x509_crt_get_extension_data.3 gnutls_x509_crt_get_raw_issuer_dn.3 gnutls_x509_crt_get_raw_dn.3 gnutls_x509_crt_get_subject.3 gnutls_x509_crt_get_issuer.3 gnutls_x509_dn_get_rdn_ava.3 gnutls_x509_crt_get_fingerprint.3 gnutls_x509_crt_export.3 gnutls_x509_crt_get_key_id.3 gnutls_x509_crt_check_revocation.3 gnutls_x509_crt_verify_data.3 gnutls_x509_crt_get_crl_dist_points.3 gnutls_x509_crt_get_key_purpose_oid.3 gnutls_x509_crt_get_pk_rsa_raw.3 gnutls_x509_crt_get_pk_dsa_raw.3 gnutls_x509_crt_list_import.3 gnutls_x509_crt_set_dn_by_oid.3 gnutls_x509_crt_set_issuer_dn_by_oid.3 gnutls_x509_crt_set_proxy_dn.3 gnutls_x509_crt_set_version.3 gnutls_x509_crt_set_key.3 gnutls_x509_crt_set_crq.3 gnutls_x509_crt_set_extension_by_oid.3 gnutls_x509_crt_set_basic_constraints.3 gnutls_x509_crt_set_ca_status.3 gnutls_x509_crt_set_key_usage.3 gnutls_x509_crt_set_subject_alternative_name.3 gnutls_x509_crt_set_proxy.3 gnutls_x509_crt_sign2.3 gnutls_x509_crt_sign.3 gnutls_x509_crt_set_activation_time.3 gnutls_x509_crt_set_expiration_time.3 gnutls_x509_crt_set_serial.3 gnutls_x509_crt_set_crl_dist_points.3 gnutls_x509_crt_cpy_crl_dist_points.3 gnutls_x509_crt_set_subject_key_id.3 gnutls_x509_crt_set_authority_key_id.3 gnutls_x509_crt_set_key_purpose_oid.3 gnutls_openpgp_keyring_init.3 gnutls_openpgp_keyring_deinit.3 gnutls_openpgp_keyring_check_id.3 gnutls_openpgp_keyring_import.3 gnutls_openpgp_key_init.3 gnutls_openpgp_key_deinit.3 gnutls_openpgp_key_import.3 gnutls_openpgp_key_export.3 gnutls_openpgp_key_get_fingerprint.3 gnutls_openpgp_key_get_name.3 gnutls_openpgp_key_get_pk_algorithm.3 gnutls_openpgp_key_get_version.3 gnutls_openpgp_key_get_creation_time.3 gnutls_openpgp_key_get_expiration_time.3 gnutls_openpgp_key_get_id.3 gnutls_openpgp_key_check_hostname.3 gnutls_openpgp_key_get_key_usage.3 gnutls_openpgp_key_verify_ring.3 gnutls_openpgp_key_verify_self.3 gnutls_openpgp_privkey_init.3 gnutls_openpgp_privkey_deinit.3 gnutls_openpgp_privkey_import.3 gnutls_openpgp_privkey_get_pk_algorithm.3 +APIMANS = gnutls_oprfi_enable_client.3 gnutls_oprfi_enable_server.3 gnutls_server_name_get.3 gnutls_server_name_set.3 gnutls_alert_get_name.3 gnutls_alert_send.3 gnutls_error_to_alert.3 gnutls_alert_send_appropriate.3 gnutls_alert_get.3 gnutls_mac_get_name.3 gnutls_mac_get_key_size.3 gnutls_mac_list.3 gnutls_compression_get_name.3 gnutls_compression_list.3 gnutls_cipher_get_key_size.3 gnutls_cipher_get_name.3 gnutls_cipher_list.3 gnutls_kx_get_name.3 gnutls_kx_list.3 gnutls_protocol_get_name.3 gnutls_protocol_list.3 gnutls_cipher_suite_get_name.3 gnutls_cipher_suite_info.3 gnutls_certificate_type_get_name.3 gnutls_certificate_type_list.3 gnutls_sign_algorithm_get_name.3 gnutls_pk_algorithm_get_name.3 gnutls_anon_free_server_credentials.3 gnutls_anon_allocate_server_credentials.3 gnutls_anon_free_client_credentials.3 gnutls_anon_allocate_client_credentials.3 gnutls_anon_set_server_dh_params.3 gnutls_anon_set_server_params_function.3 gnutls_credentials_clear.3 gnutls_credentials_set.3 gnutls_auth_get_type.3 gnutls_auth_server_get_type.3 gnutls_auth_client_get_type.3 gnutls_transport_set_errno.3 gnutls_transport_set_global_errno.3 gnutls_record_check_pending.3 gnutls_certificate_free_keys.3 gnutls_certificate_free_cas.3 gnutls_certificate_free_ca_names.3 gnutls_certificate_free_credentials.3 gnutls_certificate_allocate_credentials.3 gnutls_certificate_server_set_request.3 gnutls_certificate_client_set_retrieve_function.3 gnutls_certificate_server_set_retrieve_function.3 gnutls_certificate_verify_peers2.3 gnutls_certificate_verify_peers.3 gnutls_certificate_expiration_time_peers.3 gnutls_certificate_activation_time_peers.3 gnutls_sign_callback_set.3 gnutls_sign_callback_get.3 gnutls_db_set_retrieve_function.3 gnutls_db_set_remove_function.3 gnutls_db_set_store_function.3 gnutls_db_set_ptr.3 gnutls_db_get_ptr.3 gnutls_db_set_cache_expiration.3 gnutls_db_check_entry.3 gnutls_db_remove_session.3 gnutls_dh_params_import_raw.3 gnutls_dh_params_init.3 gnutls_dh_params_deinit.3 gnutls_dh_params_cpy.3 gnutls_dh_params_generate2.3 gnutls_dh_params_import_pkcs3.3 gnutls_dh_params_export_pkcs3.3 gnutls_dh_params_export_raw.3 gnutls_error_is_fatal.3 gnutls_perror.3 gnutls_strerror.3 gnutls_global_set_log_function.3 gnutls_global_set_log_level.3 gnutls_global_set_mem_functions.3 gnutls_global_init.3 gnutls_global_deinit.3 gnutls_transport_set_pull_function.3 gnutls_transport_set_push_function.3 gnutls_check_version.3 gnutls_rehandshake.3 gnutls_handshake.3 gnutls_handshake_set_max_packet_length.3 gnutls_handshake_get_last_in.3 gnutls_handshake_get_last_out.3 gnutls_malloc.3 gnutls_free.3 gnutls_cipher_set_priority.3 gnutls_kx_set_priority.3 gnutls_mac_set_priority.3 gnutls_compression_set_priority.3 gnutls_protocol_set_priority.3 gnutls_certificate_type_set_priority.3 gnutls_set_default_priority.3 gnutls_set_default_export_priority.3 gnutls_psk_free_client_credentials.3 gnutls_psk_allocate_client_credentials.3 gnutls_psk_set_client_credentials.3 gnutls_psk_free_server_credentials.3 gnutls_psk_allocate_server_credentials.3 gnutls_psk_set_server_credentials_file.3 gnutls_psk_set_server_credentials_function.3 gnutls_psk_set_client_credentials_function.3 gnutls_psk_server_get_username.3 gnutls_hex_decode.3 gnutls_hex_encode.3 gnutls_psk_set_server_dh_params.3 gnutls_psk_set_server_params_function.3 gnutls_protocol_get_version.3 gnutls_transport_set_lowat.3 gnutls_transport_set_ptr.3 gnutls_transport_set_ptr2.3 gnutls_transport_get_ptr.3 gnutls_transport_get_ptr2.3 gnutls_bye.3 gnutls_record_send.3 gnutls_record_recv.3 gnutls_record_get_max_size.3 gnutls_record_set_max_size.3 gnutls_rsa_params_import_raw.3 gnutls_rsa_params_init.3 gnutls_rsa_params_deinit.3 gnutls_rsa_params_cpy.3 gnutls_rsa_params_generate2.3 gnutls_rsa_params_import_pkcs1.3 gnutls_rsa_params_export_pkcs1.3 gnutls_rsa_params_export_raw.3 gnutls_session_get_data.3 gnutls_session_get_data2.3 gnutls_session_get_id.3 gnutls_session_set_data.3 gnutls_cipher_get.3 gnutls_certificate_type_get.3 gnutls_kx_get.3 gnutls_mac_get.3 gnutls_compression_get.3 gnutls_init.3 gnutls_deinit.3 gnutls_openpgp_send_cert.3 gnutls_certificate_send_x509_rdn_sequence.3 gnutls_handshake_set_private_extensions.3 gnutls_prf_raw.3 gnutls_prf.3 gnutls_session_get_client_random.3 gnutls_session_get_server_random.3 gnutls_session_get_master_secret.3 gnutls_session_is_resumed.3 gnutls_session_get_ptr.3 gnutls_session_set_ptr.3 gnutls_record_get_direction.3 gnutls_handshake_set_post_client_hello_function.3 gnutls_dh_set_prime_bits.3 gnutls_dh_get_group.3 gnutls_dh_get_pubkey.3 gnutls_rsa_export_get_pubkey.3 gnutls_dh_get_secret_bits.3 gnutls_dh_get_prime_bits.3 gnutls_rsa_export_get_modulus_bits.3 gnutls_dh_get_peers_public_bits.3 gnutls_certificate_get_ours.3 gnutls_certificate_get_peers.3 gnutls_certificate_client_get_request_status.3 gnutls_fingerprint.3 gnutls_certificate_set_dh_params.3 gnutls_certificate_set_params_function.3 gnutls_certificate_set_verify_flags.3 gnutls_certificate_set_verify_limits.3 gnutls_certificate_set_rsa_export_params.3 gnutls_psk_set_params_function.3 gnutls_anon_set_params_function.3 gnutls_certificate_set_x509_key_mem.3 gnutls_certificate_set_x509_key.3 gnutls_certificate_set_x509_key_file.3 gnutls_certificate_set_x509_trust_mem.3 gnutls_certificate_set_x509_trust.3 gnutls_certificate_set_x509_trust_file.3 gnutls_certificate_set_x509_crl_mem.3 gnutls_certificate_set_x509_crl.3 gnutls_certificate_set_x509_crl_file.3 gnutls_certificate_set_x509_simple_pkcs12_file.3 gnutls_certificate_free_crls.3 gnutls_pem_base64_encode.3 gnutls_pem_base64_encode_alloc.3 gnutls_pem_base64_decode.3 gnutls_pem_base64_decode_alloc.3 gnutls_global_init_extra.3 gnutls_extra_check_version.3 gnutls_ia_permute_inner_secret.3 gnutls_ia_generate_challenge.3 gnutls_ia_extract_inner_secret.3 gnutls_ia_endphase_send.3 gnutls_ia_verify_endphase.3 gnutls_ia_send.3 gnutls_ia_recv.3 gnutls_ia_handshake_p.3 gnutls_ia_handshake.3 gnutls_ia_allocate_client_credentials.3 gnutls_ia_free_client_credentials.3 gnutls_ia_set_client_avp_function.3 gnutls_ia_set_client_avp_ptr.3 gnutls_ia_get_client_avp_ptr.3 gnutls_ia_allocate_server_credentials.3 gnutls_ia_free_server_credentials.3 gnutls_ia_set_server_avp_function.3 gnutls_ia_set_server_avp_ptr.3 gnutls_ia_get_server_avp_ptr.3 gnutls_ia_enable.3 gnutls_certificate_set_openpgp_key_mem.3 gnutls_certificate_set_openpgp_key_file.3 gnutls_certificate_set_openpgp_keyring_file.3 gnutls_certificate_set_openpgp_keyring_mem.3 gnutls_openpgp_set_recv_key_function.3 gnutls_certificate_set_openpgp_key.3 gnutls_openpgp_privkey_sign_hash.3 gnutls_x509_dn_oid_known.3 gnutls_x509_crl_init.3 gnutls_x509_crl_deinit.3 gnutls_x509_crl_import.3 gnutls_x509_crl_get_issuer_dn.3 gnutls_x509_crl_get_issuer_dn_by_oid.3 gnutls_x509_crl_get_dn_oid.3 gnutls_x509_crl_get_signature_algorithm.3 gnutls_x509_crl_get_signature.3 gnutls_x509_crl_get_version.3 gnutls_x509_crl_get_this_update.3 gnutls_x509_crl_get_next_update.3 gnutls_x509_crl_get_crt_count.3 gnutls_x509_crl_get_crt_serial.3 gnutls_x509_crl_export.3 gnutls_x509_crl_set_version.3 gnutls_x509_crl_sign2.3 gnutls_x509_crl_sign.3 gnutls_x509_crl_set_this_update.3 gnutls_x509_crl_set_next_update.3 gnutls_x509_crl_set_crt_serial.3 gnutls_x509_crl_set_crt.3 gnutls_x509_crq_init.3 gnutls_x509_crq_deinit.3 gnutls_x509_crq_import.3 gnutls_x509_crq_get_dn.3 gnutls_x509_crq_get_dn_by_oid.3 gnutls_x509_crq_get_dn_oid.3 gnutls_x509_crq_get_challenge_password.3 gnutls_x509_crq_set_attribute_by_oid.3 gnutls_x509_crq_get_attribute_by_oid.3 gnutls_x509_crq_set_dn_by_oid.3 gnutls_x509_crq_set_version.3 gnutls_x509_crq_get_version.3 gnutls_x509_crq_set_key.3 gnutls_x509_crq_set_challenge_password.3 gnutls_x509_crq_sign2.3 gnutls_x509_crq_sign.3 gnutls_x509_crq_export.3 gnutls_x509_crq_get_pk_algorithm.3 gnutls_x509_rdn_get.3 gnutls_x509_rdn_get_by_oid.3 gnutls_x509_rdn_get_oid.3 gnutls_x509_crt_print.3 gnutls_x509_crl_print.3 gnutls_pkcs12_init.3 gnutls_pkcs12_deinit.3 gnutls_pkcs12_import.3 gnutls_pkcs12_export.3 gnutls_pkcs12_get_bag.3 gnutls_pkcs12_set_bag.3 gnutls_pkcs12_generate_mac.3 gnutls_pkcs12_verify_mac.3 gnutls_pkcs12_bag_init.3 gnutls_pkcs12_bag_deinit.3 gnutls_pkcs12_bag_get_type.3 gnutls_pkcs12_bag_get_count.3 gnutls_pkcs12_bag_get_data.3 gnutls_pkcs12_bag_set_data.3 gnutls_pkcs12_bag_set_crt.3 gnutls_pkcs12_bag_set_crl.3 gnutls_pkcs12_bag_set_key_id.3 gnutls_pkcs12_bag_get_key_id.3 gnutls_pkcs12_bag_get_friendly_name.3 gnutls_pkcs12_bag_set_friendly_name.3 gnutls_pkcs12_bag_decrypt.3 gnutls_pkcs12_bag_encrypt.3 gnutls_pkcs7_init.3 gnutls_pkcs7_deinit.3 gnutls_pkcs7_import.3 gnutls_pkcs7_get_crt_raw.3 gnutls_pkcs7_get_crt_count.3 gnutls_pkcs7_export.3 gnutls_pkcs7_set_crt_raw.3 gnutls_pkcs7_set_crt.3 gnutls_pkcs7_delete_crt.3 gnutls_pkcs7_get_crl_raw.3 gnutls_pkcs7_get_crl_count.3 gnutls_pkcs7_set_crl_raw.3 gnutls_pkcs7_set_crl.3 gnutls_pkcs7_delete_crl.3 gnutls_x509_privkey_init.3 gnutls_x509_privkey_deinit.3 gnutls_x509_privkey_cpy.3 gnutls_x509_privkey_import.3 gnutls_x509_privkey_import_rsa_raw.3 gnutls_x509_privkey_import_dsa_raw.3 gnutls_x509_privkey_get_pk_algorithm.3 gnutls_x509_privkey_export.3 gnutls_x509_privkey_export_rsa_raw.3 gnutls_x509_privkey_export_dsa_raw.3 gnutls_x509_privkey_generate.3 gnutls_x509_privkey_get_key_id.3 gnutls_x509_privkey_sign_data.3 gnutls_x509_privkey_sign_hash.3 gnutls_x509_privkey_verify_data.3 gnutls_x509_privkey_fix.3 gnutls_x509_privkey_export_pkcs8.3 gnutls_x509_privkey_import_pkcs8.3 gnutls_x509_crt_check_hostname.3 gnutls_x509_crt_check_issuer.3 gnutls_x509_crt_list_verify.3 gnutls_x509_crt_verify.3 gnutls_x509_crl_check_issuer.3 gnutls_x509_crl_verify.3 gnutls_x509_crt_init.3 gnutls_x509_crt_deinit.3 gnutls_x509_crt_import.3 gnutls_x509_crt_get_issuer_dn.3 gnutls_x509_crt_get_issuer_dn_by_oid.3 gnutls_x509_crt_get_issuer_dn_oid.3 gnutls_x509_crt_get_dn.3 gnutls_x509_crt_get_dn_by_oid.3 gnutls_x509_crt_get_dn_oid.3 gnutls_x509_crt_get_signature_algorithm.3 gnutls_x509_crt_get_signature.3 gnutls_x509_crt_get_version.3 gnutls_x509_crt_get_activation_time.3 gnutls_x509_crt_get_expiration_time.3 gnutls_x509_crt_get_serial.3 gnutls_x509_crt_get_subject_key_id.3 gnutls_x509_crt_get_authority_key_id.3 gnutls_x509_crt_get_pk_algorithm.3 gnutls_x509_crt_get_subject_alt_name.3 gnutls_x509_crt_get_subject_alt_othername_oid.3 gnutls_x509_crt_get_basic_constraints.3 gnutls_x509_crt_get_ca_status.3 gnutls_x509_crt_get_key_usage.3 gnutls_x509_crt_get_proxy.3 gnutls_x509_crt_get_extension_by_oid.3 gnutls_x509_crt_get_extension_oid.3 gnutls_x509_crt_get_extension_info.3 gnutls_x509_crt_get_extension_data.3 gnutls_x509_crt_get_raw_issuer_dn.3 gnutls_x509_crt_get_raw_dn.3 gnutls_x509_crt_get_subject.3 gnutls_x509_crt_get_issuer.3 gnutls_x509_dn_get_rdn_ava.3 gnutls_x509_crt_get_fingerprint.3 gnutls_x509_crt_export.3 gnutls_x509_crt_get_key_id.3 gnutls_x509_crt_check_revocation.3 gnutls_x509_crt_verify_data.3 gnutls_x509_crt_get_crl_dist_points.3 gnutls_x509_crt_get_key_purpose_oid.3 gnutls_x509_crt_get_pk_rsa_raw.3 gnutls_x509_crt_get_pk_dsa_raw.3 gnutls_x509_crt_list_import.3 gnutls_x509_crt_set_dn_by_oid.3 gnutls_x509_crt_set_issuer_dn_by_oid.3 gnutls_x509_crt_set_proxy_dn.3 gnutls_x509_crt_set_version.3 gnutls_x509_crt_set_key.3 gnutls_x509_crt_set_crq.3 gnutls_x509_crt_set_extension_by_oid.3 gnutls_x509_crt_set_basic_constraints.3 gnutls_x509_crt_set_ca_status.3 gnutls_x509_crt_set_key_usage.3 gnutls_x509_crt_set_subject_alternative_name.3 gnutls_x509_crt_set_proxy.3 gnutls_x509_crt_sign2.3 gnutls_x509_crt_sign.3 gnutls_x509_crt_set_activation_time.3 gnutls_x509_crt_set_expiration_time.3 gnutls_x509_crt_set_serial.3 gnutls_x509_crt_set_crl_dist_points.3 gnutls_x509_crt_cpy_crl_dist_points.3 gnutls_x509_crt_set_subject_key_id.3 gnutls_x509_crt_set_authority_key_id.3 gnutls_x509_crt_set_key_purpose_oid.3 gnutls_openpgp_keyring_init.3 gnutls_openpgp_keyring_deinit.3 gnutls_openpgp_keyring_check_id.3 gnutls_openpgp_keyring_import.3 gnutls_openpgp_cert_init.3 gnutls_openpgp_cert_deinit.3 gnutls_openpgp_cert_import.3 gnutls_openpgp_cert_export.3 gnutls_openpgp_cert_get_fingerprint.3 gnutls_openpgp_cert_get_name.3 gnutls_openpgp_cert_get_pk_algorithm.3 gnutls_openpgp_cert_get_version.3 gnutls_openpgp_cert_get_creation_time.3 gnutls_openpgp_cert_get_expiration_time.3 gnutls_openpgp_cert_get_id.3 gnutls_openpgp_cert_check_hostname.3 gnutls_openpgp_cert_get_key_usage.3 gnutls_openpgp_cert_verify_ring.3 gnutls_openpgp_cert_verify_self.3 gnutls_openpgp_privkey_init.3 gnutls_openpgp_privkey_deinit.3 gnutls_openpgp_privkey_import.3 gnutls_openpgp_privkey_get_pk_algorithm.3 SRPMANS = gnutls_srp_base64_encode.3 gnutls_srp_base64_encode_alloc.3 gnutls_srp_base64_decode.3 gnutls_srp_base64_decode_alloc.3 gnutls_srp_free_client_credentials.3 gnutls_srp_allocate_client_credentials.3 gnutls_srp_set_client_credentials.3 gnutls_srp_free_server_credentials.3 gnutls_srp_allocate_server_credentials.3 gnutls_srp_set_server_credentials_file.3 gnutls_srp_set_server_credentials_function.3 gnutls_srp_set_client_credentials_function.3 gnutls_srp_server_get_username.3 gnutls_srp_verifier.3 diff --git a/includes/gnutls/gnutls.h.in b/includes/gnutls/gnutls.h.in index 7b765ff114..b93f20f562 100644 --- a/includes/gnutls/gnutls.h.in +++ b/includes/gnutls/gnutls.h.in @@ -246,7 +246,7 @@ extern "C" typedef enum { GNUTLS_OPENPGP_CERT, GNUTLS_OPENPGP_CERT_FINGERPRINT - } gnutls_openpgp_cert_status_t; + } gnutls_openpgp_crt_status_t; #define GNUTLS_OPENPGP_KEY GNUTLS_OPENPGP_CERT #define GNUTLS_OPENPGP_KEY_FINGERPRINT GNUTLS_OPENPGP_CERT_FINGERPRINT @@ -806,9 +806,9 @@ extern "C" void *gnutls_session_get_ptr (gnutls_session_t session); #define gnutls_openpgp_send_key gnutls_openpgp_send_cert -#define gnutls_openpgp_key_status_t gnutls_openpgp_cert_status_t +#define gnutls_openpgp_key_status_t gnutls_openpgp_crt_status_t void gnutls_openpgp_send_cert (gnutls_session_t session, - gnutls_openpgp_cert_status_t status); + gnutls_openpgp_crt_status_t status); /* fingerprint * Actually this function returns the hash of the given data. @@ -964,9 +964,9 @@ extern "C" GNUTLS_SAN_OTHERNAME_XMPP = 1000 } gnutls_x509_subject_alt_name_t; - struct gnutls_openpgp_cert_int; - typedef struct gnutls_openpgp_cert_int *gnutls_openpgp_cert_t; -#define gnutls_openpgp_key_t gnutls_openpgp_cert_t + struct gnutls_openpgp_crt_int; + typedef struct gnutls_openpgp_crt_int *gnutls_openpgp_crt_t; +#define gnutls_openpgp_key_t gnutls_openpgp_crt_t struct gnutls_openpgp_privkey_int; typedef struct gnutls_openpgp_privkey_int *gnutls_openpgp_privkey_t; @@ -977,7 +977,7 @@ extern "C" union cert { gnutls_x509_crt_t *x509; - gnutls_openpgp_cert_t pgp; + gnutls_openpgp_crt_t pgp; } cert; unsigned int ncerts; /* one for pgp keys */ diff --git a/includes/gnutls/openpgp.h b/includes/gnutls/openpgp.h index 15715c649b..6657951aea 100644 --- a/includes/gnutls/openpgp.h +++ b/includes/gnutls/openpgp.h @@ -40,63 +40,63 @@ extern "C" /* gnutls_openpgp_cert_t should be defined in gnutls.h */ - typedef enum gnutls_openpgp_cert_fmt + typedef enum gnutls_openpgp_crt_fmt { GNUTLS_OPENPGP_FMT_RAW, GNUTLS_OPENPGP_FMT_BASE64 - } gnutls_openpgp_cert_fmt_t; -#define gnutls_openpgp_key_fmt_t gnutls_openpgp_cert_fmt_t - -#define gnutls_openpgp_key_init gnutls_openpgp_cert_init -#define gnutls_openpgp_key_deinit gnutls_openpgp_cert_deinit -#define gnutls_openpgp_key_import gnutls_openpgp_cert_import -#define gnutls_openpgp_key_export gnutls_openpgp_cert_export -#define gnutls_openpgp_key_get_key_usage gnutls_openpgp_cert_get_key_usage -#define gnutls_openpgp_key_get_fingerprint gnutls_openpgp_cert_get_fingerprint -#define gnutls_openpgp_key_get_pk_algorithm gnutls_openpgp_cert_get_pk_algorithm -#define gnutls_openpgp_key_get_name gnutls_openpgp_cert_get_name -#define gnutls_openpgp_key_get_version gnutls_openpgp_cert_get_version -#define gnutls_openpgp_key_get_creation_time gnutls_openpgp_cert_get_creation_time -#define gnutls_openpgp_key_get_expiration_time gnutls_openpgp_cert_get_expiration_time -#define gnutls_openpgp_key_get_id gnutls_openpgp_cert_get_id -#define gnutls_openpgp_key_check_hostname gnutls_openpgp_cert_check_hostname - - /* initializes the memory for gnutls_openpgp_cert_t struct */ - int gnutls_openpgp_cert_init (gnutls_openpgp_cert_t * key); + } gnutls_openpgp_crt_fmt_t; +#define gnutls_openpgp_key_fmt_t gnutls_openpgp_crt_fmt_t + +#define gnutls_openpgp_key_init gnutls_openpgp_crt_init +#define gnutls_openpgp_key_deinit gnutls_openpgp_crt_deinit +#define gnutls_openpgp_key_import gnutls_openpgp_crt_import +#define gnutls_openpgp_key_export gnutls_openpgp_crt_export +#define gnutls_openpgp_key_get_key_usage gnutls_openpgp_crt_get_key_usage +#define gnutls_openpgp_key_get_fingerprint gnutls_openpgp_crt_get_fingerprint +#define gnutls_openpgp_key_get_pk_algorithm gnutls_openpgp_crt_get_pk_algorithm +#define gnutls_openpgp_key_get_name gnutls_openpgp_crt_get_name +#define gnutls_openpgp_key_get_version gnutls_openpgp_crt_get_version +#define gnutls_openpgp_key_get_creation_time gnutls_openpgp_crt_get_creation_time +#define gnutls_openpgp_key_get_expiration_time gnutls_openpgp_crt_get_expiration_time +#define gnutls_openpgp_key_get_id gnutls_openpgp_crt_get_id +#define gnutls_openpgp_key_check_hostname gnutls_openpgp_crt_check_hostname + + /* initializes the memory for gnutls_openpgp_crt_t struct */ + int gnutls_openpgp_crt_init (gnutls_openpgp_crt_t * key); /* frees all memory */ - void gnutls_openpgp_cert_deinit (gnutls_openpgp_cert_t key); + void gnutls_openpgp_crt_deinit (gnutls_openpgp_crt_t key); - int gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, + int gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format); - int gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, - gnutls_openpgp_cert_fmt_t format, + gnutls_openpgp_crt_fmt_t format); + int gnutls_openpgp_crt_export (gnutls_openpgp_crt_t key, + gnutls_openpgp_crt_fmt_t format, void *output_data, size_t * output_data_size); /* The key_usage flags are defined in gnutls.h. They are * the GNUTLS_KEY_* definitions. */ - int gnutls_openpgp_cert_get_key_usage (gnutls_openpgp_cert_t cert, + int gnutls_openpgp_crt_get_key_usage (gnutls_openpgp_crt_t cert, unsigned int *key_usage); - int gnutls_openpgp_cert_get_fingerprint (gnutls_openpgp_cert_t key, void *fpr, + int gnutls_openpgp_crt_get_fingerprint (gnutls_openpgp_crt_t key, void *fpr, size_t * fprlen); - int gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, + int gnutls_openpgp_crt_get_name (gnutls_openpgp_crt_t key, int idx, char *buf, size_t * sizeof_buf); gnutls_pk_algorithm_t - gnutls_openpgp_cert_get_pk_algorithm (gnutls_openpgp_cert_t key, + gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key, unsigned int *bits); - int gnutls_openpgp_cert_get_version (gnutls_openpgp_cert_t key); + int gnutls_openpgp_crt_get_version (gnutls_openpgp_crt_t key); - time_t gnutls_openpgp_cert_get_creation_time (gnutls_openpgp_cert_t key); - time_t gnutls_openpgp_cert_get_expiration_time (gnutls_openpgp_cert_t key); + time_t gnutls_openpgp_crt_get_creation_time (gnutls_openpgp_crt_t key); + time_t gnutls_openpgp_crt_get_expiration_time (gnutls_openpgp_crt_t key); - int gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, + int gnutls_openpgp_crt_get_id (gnutls_openpgp_crt_t key, unsigned char keyid[8]); - int gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, + int gnutls_openpgp_crt_check_hostname (gnutls_openpgp_crt_t key, const char *hostname); /* privkey stuff. @@ -108,7 +108,7 @@ extern "C" unsigned int *bits); int gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format, + gnutls_openpgp_crt_fmt_t format, const char *pass, unsigned int flags); int gnutls_openpgp_privkey_sign_hash (gnutls_openpgp_privkey_t key, const gnutls_datum_t * hash, @@ -124,19 +124,19 @@ extern "C" int gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format); + gnutls_openpgp_crt_fmt_t format); int gnutls_openpgp_keyring_check_id (gnutls_openpgp_keyring_t ring, const unsigned char keyid[8], unsigned int flags); - int gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, + int gnutls_openpgp_crt_verify_ring (gnutls_openpgp_crt_t key, gnutls_openpgp_keyring_t keyring, unsigned int flags, unsigned int *verify /* the output of the verification */ ); - int gnutls_openpgp_cert_verify_self (gnutls_openpgp_cert_t key, + int gnutls_openpgp_crt_verify_self (gnutls_openpgp_crt_t key, unsigned int flags, unsigned int *verify); @@ -144,7 +144,7 @@ extern "C" /* certificate authentication stuff. */ int gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t - res, gnutls_openpgp_cert_t key, + res, gnutls_openpgp_crt_t key, gnutls_openpgp_privkey_t pkey); #ifdef __cplusplus diff --git a/lib/auth_cert.c b/lib/auth_cert.c index 5084ed5d8d..687e3ce30b 100644 --- a/lib/auth_cert.c +++ b/lib/auth_cert.c @@ -49,7 +49,7 @@ static gnutls_cert *alloc_and_load_x509_certs (gnutls_x509_crt_t * certs, unsigned); static gnutls_privkey *alloc_and_load_x509_key (gnutls_x509_privkey_t key); -static gnutls_cert *alloc_and_load_pgp_certs (gnutls_openpgp_cert_t cert); +static gnutls_cert *alloc_and_load_pgp_certs (gnutls_openpgp_crt_t cert); static gnutls_privkey *alloc_and_load_pgp_key (const gnutls_openpgp_privkey_t key); @@ -481,14 +481,14 @@ cleanup: { if (st.deinit_all) { - if (_E_gnutls_openpgp_cert_deinit == NULL || + if (_E_gnutls_openpgp_crt_deinit == NULL || _E_gnutls_openpgp_privkey_deinit == NULL) { gnutls_assert (); return GNUTLS_E_INIT_LIBEXTRA; } - _E_gnutls_openpgp_cert_deinit (st.cert.pgp); + _E_gnutls_openpgp_crt_deinit (st.cert.pgp); _E_gnutls_openpgp_privkey_deinit (st.key.pgp); } } @@ -1583,7 +1583,7 @@ alloc_and_load_x509_key (gnutls_x509_privkey_t key) * space for them. */ static gnutls_cert * -alloc_and_load_pgp_certs (gnutls_openpgp_cert_t cert) +alloc_and_load_pgp_certs (gnutls_openpgp_crt_t cert) { gnutls_cert *local_certs; int ret = 0; @@ -1598,13 +1598,13 @@ alloc_and_load_pgp_certs (gnutls_openpgp_cert_t cert) return NULL; } - if (_E_gnutls_openpgp_cert_to_gcert == NULL) + if (_E_gnutls_openpgp_crt_to_gcert == NULL) { gnutls_assert (); return NULL; } - ret = _E_gnutls_openpgp_cert_to_gcert (local_certs, cert); + ret = _E_gnutls_openpgp_crt_to_gcert (local_certs, cert); if (ret < 0) { gnutls_assert (); diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c index 21c7340acb..cbfb4f35c8 100644 --- a/lib/gnutls_cert.c +++ b/lib/gnutls_cert.c @@ -432,7 +432,7 @@ _gnutls_x509_get_raw_crt_expiration_time (const gnutls_datum_t * cert) } /*- - * _gnutls_openpgp_cert_verify_peers - This function returns the peer's certificate status + * _gnutls_openpgp_crt_verify_peers - This function returns the peer's certificate status * @session: is a gnutls session * * This function will try to verify the peer's certificate and return its status (TRUSTED, INVALID etc.). @@ -440,7 +440,7 @@ _gnutls_x509_get_raw_crt_expiration_time (const gnutls_datum_t * cert) * -*/ int -_gnutls_openpgp_cert_verify_peers (gnutls_session_t session, +_gnutls_openpgp_crt_verify_peers (gnutls_session_t session, unsigned int *status) { cert_auth_info_t info; @@ -547,7 +547,7 @@ gnutls_certificate_verify_peers2 (gnutls_session_t session, case GNUTLS_CRT_X509: return _gnutls_x509_cert_verify_peers (session, status); case GNUTLS_CRT_OPENPGP: - return _gnutls_openpgp_cert_verify_peers (session, status); + return _gnutls_openpgp_crt_verify_peers (session, status); default: return GNUTLS_E_INVALID_REQUEST; } @@ -719,7 +719,7 @@ _gnutls_raw_privkey_to_gkey (gnutls_privkey * key, return GNUTLS_E_INIT_LIBEXTRA; } return _E_gnutls_openpgp_raw_privkey_to_gkey (key, raw_key, - (gnutls_openpgp_cert_fmt_t) + (gnutls_openpgp_crt_fmt_t) key_enc); default: gnutls_assert (); diff --git a/lib/gnutls_extra_hooks.c b/lib/gnutls_extra_hooks.c index 1d6673240d..eedf902860 100644 --- a/lib/gnutls_extra_hooks.c +++ b/lib/gnutls_extra_hooks.c @@ -29,17 +29,17 @@ _gnutls_add_openpgp_functions(), typically invoked by libgnutls_extra. */ _gnutls_openpgp_verify_key_func _E_gnutls_openpgp_verify_key = NULL; -_gnutls_openpgp_cert_creation_time_func +_gnutls_openpgp_crt_creation_time_func _E_gnutls_openpgp_get_raw_key_creation_time = NULL; -_gnutls_openpgp_cert_expiration_time_func +_gnutls_openpgp_crt_expiration_time_func _E_gnutls_openpgp_get_raw_key_expiration_time = NULL; _gnutls_openpgp_fingerprint_func _E_gnutls_openpgp_fingerprint = NULL; -_gnutls_openpgp_cert_request_func _E_gnutls_openpgp_request_key = NULL; +_gnutls_openpgp_crt_request_func _E_gnutls_openpgp_request_key = NULL; _gnutls_openpgp_raw_key_to_gcert_func _E_gnutls_openpgp_raw_key_to_gcert = NULL; _gnutls_openpgp_raw_privkey_to_gkey_func _E_gnutls_openpgp_raw_privkey_to_gkey = NULL; -_gnutls_openpgp_cert_to_gcert_func _E_gnutls_openpgp_cert_to_gcert = NULL; +_gnutls_openpgp_crt_to_gcert_func _E_gnutls_openpgp_crt_to_gcert = NULL; _gnutls_openpgp_privkey_to_gkey_func _E_gnutls_openpgp_privkey_to_gkey = NULL; -_gnutls_openpgp_cert_deinit_func _E_gnutls_openpgp_cert_deinit = NULL; +_gnutls_openpgp_crt_deinit_func _E_gnutls_openpgp_crt_deinit = NULL; _gnutls_openpgp_keyring_deinit_func _E_gnutls_openpgp_keyring_deinit = NULL; _gnutls_openpgp_privkey_deinit_func _E_gnutls_openpgp_privkey_deinit = NULL; @@ -48,15 +48,15 @@ _gnutls_openpgp_privkey_deinit_func _E_gnutls_openpgp_privkey_deinit = NULL; extern void _gnutls_add_openpgp_functions (_gnutls_openpgp_verify_key_func verify_key, - _gnutls_openpgp_cert_creation_time_func key_creation_time, - _gnutls_openpgp_cert_expiration_time_func key_expiration_time, + _gnutls_openpgp_crt_creation_time_func key_creation_time, + _gnutls_openpgp_crt_expiration_time_func key_expiration_time, _gnutls_openpgp_fingerprint_func fingerprint, - _gnutls_openpgp_cert_request_func request_key, + _gnutls_openpgp_crt_request_func request_key, _gnutls_openpgp_raw_key_to_gcert_func raw_key_to_gcert, _gnutls_openpgp_raw_privkey_to_gkey_func raw_privkey_to_gkey, - _gnutls_openpgp_cert_to_gcert_func key_to_gcert, + _gnutls_openpgp_crt_to_gcert_func key_to_gcert, _gnutls_openpgp_privkey_to_gkey_func privkey_to_gkey, - _gnutls_openpgp_cert_deinit_func key_deinit, + _gnutls_openpgp_crt_deinit_func key_deinit, _gnutls_openpgp_keyring_deinit_func keyring_deinit, _gnutls_openpgp_privkey_deinit_func privkey_deinit) { @@ -67,9 +67,9 @@ _gnutls_add_openpgp_functions _E_gnutls_openpgp_request_key = request_key; _E_gnutls_openpgp_raw_key_to_gcert = raw_key_to_gcert; _E_gnutls_openpgp_raw_privkey_to_gkey = raw_privkey_to_gkey; - _E_gnutls_openpgp_cert_to_gcert = key_to_gcert; + _E_gnutls_openpgp_crt_to_gcert = key_to_gcert; _E_gnutls_openpgp_privkey_to_gkey = privkey_to_gkey; - _E_gnutls_openpgp_cert_deinit = key_deinit; + _E_gnutls_openpgp_crt_deinit = key_deinit; _E_gnutls_openpgp_keyring_deinit = keyring_deinit; _E_gnutls_openpgp_privkey_deinit = privkey_deinit; diff --git a/lib/gnutls_extra_hooks.h b/lib/gnutls_extra_hooks.h index 15f4f931fe..ac55d06a76 100644 --- a/lib/gnutls_extra_hooks.h +++ b/lib/gnutls_extra_hooks.h @@ -33,13 +33,13 @@ typedef int (*_gnutls_openpgp_verify_key_func) const gnutls_datum_t *, int, unsigned int *); -typedef time_t (*_gnutls_openpgp_cert_creation_time_func) +typedef time_t (*_gnutls_openpgp_crt_creation_time_func) (const gnutls_datum_t *); -typedef time_t (*_gnutls_openpgp_cert_expiration_time_func) +typedef time_t (*_gnutls_openpgp_crt_expiration_time_func) (const gnutls_datum_t *); -typedef int (*_gnutls_openpgp_cert_request_func) +typedef int (*_gnutls_openpgp_crt_request_func) (gnutls_session_t, gnutls_datum_t *, const gnutls_certificate_credentials_t, opaque *, int); @@ -54,17 +54,17 @@ typedef int (*_gnutls_openpgp_raw_key_to_gcert_func) typedef int (*_gnutls_openpgp_raw_privkey_to_gkey_func) (gnutls_privkey *, const gnutls_datum_t *, - gnutls_openpgp_cert_fmt_t); + gnutls_openpgp_crt_fmt_t); -typedef int (*_gnutls_openpgp_cert_to_gcert_func) -(gnutls_cert *, gnutls_openpgp_cert_t); +typedef int (*_gnutls_openpgp_crt_to_gcert_func) +(gnutls_cert *, gnutls_openpgp_crt_t); typedef int (*_gnutls_openpgp_privkey_to_gkey_func) (gnutls_privkey *, gnutls_openpgp_privkey_t); -typedef void (*_gnutls_openpgp_cert_deinit_func) -(gnutls_openpgp_cert_t); +typedef void (*_gnutls_openpgp_crt_deinit_func) +(gnutls_openpgp_crt_t); typedef void (*_gnutls_openpgp_keyring_deinit_func) (gnutls_openpgp_keyring_t); @@ -77,30 +77,30 @@ typedef void (*_gnutls_openpgp_privkey_deinit_func) are declared here, because this file is included by auth_cert.c and gnutls_cert.c too. */ extern _gnutls_openpgp_verify_key_func _E_gnutls_openpgp_verify_key; -extern _gnutls_openpgp_cert_creation_time_func +extern _gnutls_openpgp_crt_creation_time_func _E_gnutls_openpgp_get_raw_key_creation_time; -extern _gnutls_openpgp_cert_expiration_time_func +extern _gnutls_openpgp_crt_expiration_time_func _E_gnutls_openpgp_get_raw_key_expiration_time; extern _gnutls_openpgp_fingerprint_func _E_gnutls_openpgp_fingerprint; -extern _gnutls_openpgp_cert_request_func _E_gnutls_openpgp_request_key; +extern _gnutls_openpgp_crt_request_func _E_gnutls_openpgp_request_key; extern _gnutls_openpgp_raw_key_to_gcert_func _E_gnutls_openpgp_raw_key_to_gcert; extern _gnutls_openpgp_raw_privkey_to_gkey_func _E_gnutls_openpgp_raw_privkey_to_gkey; -extern _gnutls_openpgp_cert_to_gcert_func _E_gnutls_openpgp_cert_to_gcert; +extern _gnutls_openpgp_crt_to_gcert_func _E_gnutls_openpgp_crt_to_gcert; extern _gnutls_openpgp_privkey_to_gkey_func _E_gnutls_openpgp_privkey_to_gkey; -extern _gnutls_openpgp_cert_deinit_func _E_gnutls_openpgp_cert_deinit; +extern _gnutls_openpgp_crt_deinit_func _E_gnutls_openpgp_crt_deinit; extern _gnutls_openpgp_keyring_deinit_func _E_gnutls_openpgp_keyring_deinit; extern _gnutls_openpgp_privkey_deinit_func _E_gnutls_openpgp_privkey_deinit; extern void _gnutls_add_openpgp_functions (_gnutls_openpgp_verify_key_func verify_key, - _gnutls_openpgp_cert_creation_time_func key_creation_time, - _gnutls_openpgp_cert_expiration_time_func key_expiration_time, + _gnutls_openpgp_crt_creation_time_func key_creation_time, + _gnutls_openpgp_crt_expiration_time_func key_expiration_time, _gnutls_openpgp_fingerprint_func fingerprint, - _gnutls_openpgp_cert_request_func request_key, + _gnutls_openpgp_crt_request_func request_key, _gnutls_openpgp_raw_key_to_gcert_func raw_key_to_gcert, _gnutls_openpgp_raw_privkey_to_gkey_func raw_privkey_to_gkey, - _gnutls_openpgp_cert_to_gcert_func key_to_gcert, + _gnutls_openpgp_crt_to_gcert_func key_to_gcert, _gnutls_openpgp_privkey_to_gkey_func privkey_to_gkey, - _gnutls_openpgp_cert_deinit_func key_deinit, + _gnutls_openpgp_crt_deinit_func key_deinit, _gnutls_openpgp_keyring_deinit_func keyring_deinit, _gnutls_openpgp_privkey_deinit_func privkey_deinit); diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index db4bca712e..0b3c9e2c49 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -630,7 +630,7 @@ _gnutls_dh_set_group (gnutls_session_t session, mpi_t gen, mpi_t prime) **/ void gnutls_openpgp_send_cert (gnutls_session_t session, - gnutls_openpgp_cert_status_t status) + gnutls_openpgp_crt_status_t status) { session->internals.pgp_fingerprint = status; } diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c index fde3388fbc..313145d8dc 100644 --- a/libextra/gnutls_extra.c +++ b/libextra/gnutls_extra.c @@ -150,9 +150,9 @@ gnutls_global_init_extra (void) _gnutls_openpgp_request_key, _gnutls_openpgp_raw_key_to_gcert, _gnutls_openpgp_raw_privkey_to_gkey, - _gnutls_openpgp_cert_to_gcert, + _gnutls_openpgp_crt_to_gcert, _gnutls_openpgp_privkey_to_gkey, - gnutls_openpgp_cert_deinit, + gnutls_openpgp_crt_deinit, gnutls_openpgp_keyring_deinit, gnutls_openpgp_privkey_deinit); diff --git a/libextra/gnutls_extra.h b/libextra/gnutls_extra.h index 70a34e9838..d5cf897345 100644 --- a/libextra/gnutls_extra.h +++ b/libextra/gnutls_extra.h @@ -43,8 +43,8 @@ typedef int (*OPENPGP_RAW_KEY_TO_GCERT) (gnutls_cert *, typedef int (*OPENPGP_RAW_PRIVKEY_TO_GKEY) (gnutls_privkey *, const gnutls_datum_t *); -typedef int (*OPENPGP_KEY_TO_GCERT) (gnutls_cert *, gnutls_openpgp_cert_t); +typedef int (*OPENPGP_KEY_TO_GCERT) (gnutls_cert *, gnutls_openpgp_crt_t); typedef int (*OPENPGP_PRIVKEY_TO_GKEY) (gnutls_privkey *, gnutls_openpgp_privkey_t); -typedef void (*OPENPGP_KEY_DEINIT) (gnutls_openpgp_cert_t); +typedef void (*OPENPGP_KEY_DEINIT) (gnutls_openpgp_crt_t); typedef void (*OPENPGP_PRIVKEY_DEINIT) (gnutls_openpgp_privkey_t); diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index cc867975da..8151deed04 100644 --- a/libextra/gnutls_openpgp.c +++ b/libextra/gnutls_openpgp.c @@ -307,7 +307,7 @@ openpgp_pk_to_gnutls_cert (gnutls_cert * cert, cdk_pkt_pubkey_t pk) int _gnutls_openpgp_raw_privkey_to_gkey (gnutls_privkey * pkey, const gnutls_datum_t * raw_key, - gnutls_openpgp_cert_fmt_t format) + gnutls_openpgp_crt_fmt_t format) { cdk_kbnode_t snode = NULL; cdk_packet_t pkt; @@ -985,10 +985,10 @@ cleanup: return ret; } -/* Converts a parsed gnutls_openpgp_cert_t to a gnutls_cert structure. +/* Converts a parsed gnutls_openpgp_crt_t to a gnutls_cert structure. */ int -_gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert) +_gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert, gnutls_openpgp_crt_t cert) { opaque *der; size_t der_size = 0; @@ -999,7 +999,7 @@ _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert) gcert->cert_type = GNUTLS_CRT_OPENPGP; - ret = gnutls_openpgp_cert_export (cert, GNUTLS_OPENPGP_FMT_RAW, + ret = gnutls_openpgp_crt_export (cert, GNUTLS_OPENPGP_FMT_RAW, NULL, &der_size); if (ret != GNUTLS_E_SHORT_MEMORY_BUFFER) { @@ -1014,7 +1014,7 @@ _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert) return GNUTLS_E_MEMORY_ERROR; } - ret = gnutls_openpgp_cert_export (cert, GNUTLS_OPENPGP_FMT_RAW, + ret = gnutls_openpgp_crt_export (cert, GNUTLS_OPENPGP_FMT_RAW, der, &der_size); if (ret < 0) { @@ -1054,7 +1054,7 @@ _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, gnutls_openpgp_cert_t cert) **/ int gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t - res, gnutls_openpgp_cert_t key, + res, gnutls_openpgp_crt_t key, gnutls_openpgp_privkey_t pkey) { int ret; @@ -1105,7 +1105,7 @@ gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t res->cert_list_length[res->ncerts] = 1; - ret = _gnutls_openpgp_cert_to_gcert (res->cert_list[res->ncerts], key); + ret = _gnutls_openpgp_crt_to_gcert (res->cert_list[res->ncerts], key); if (ret < 0) { gnutls_assert (); diff --git a/libextra/openpgp/compat.c b/libextra/openpgp/compat.c index 3f7328c516..4f7e784108 100644 --- a/libextra/openpgp/compat.c +++ b/libextra/openpgp/compat.c @@ -50,7 +50,7 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, int cert_list_length, unsigned int *status) { int ret = 0; - gnutls_openpgp_cert_t key = NULL; + gnutls_openpgp_crt_t key = NULL; unsigned int verify = 0, verify_self = 0; if (!cert_list || cert_list_length != 1) @@ -59,14 +59,14 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, return GNUTLS_E_NO_CERTIFICATE_FOUND; } - ret = gnutls_openpgp_cert_init (&key); + ret = gnutls_openpgp_crt_init (&key); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_import (key, &cert_list[0], GNUTLS_OPENPGP_FMT_RAW); + ret = gnutls_openpgp_crt_import (key, &cert_list[0], GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { gnutls_assert (); @@ -75,7 +75,7 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, if (cred->keyring != NULL) { - ret = gnutls_openpgp_cert_verify_ring (key, cred->keyring, 0, &verify); + ret = gnutls_openpgp_crt_verify_ring (key, cred->keyring, 0, &verify); if (ret < 0) { gnutls_assert (); @@ -84,7 +84,7 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, } /* Now try the self signature. */ - ret = gnutls_openpgp_cert_verify_self (key, 0, &verify_self); + ret = gnutls_openpgp_crt_verify_self (key, 0, &verify_self); if (ret < 0) { gnutls_assert (); @@ -100,7 +100,7 @@ _gnutls_openpgp_verify_key (const gnutls_certificate_credentials_t cred, ret = 0; leave: - gnutls_openpgp_cert_deinit (key); + gnutls_openpgp_crt_deinit (key); return ret; } @@ -118,25 +118,25 @@ int _gnutls_openpgp_fingerprint (const gnutls_datum_t * cert, unsigned char *fpr, size_t * fprlen) { - gnutls_openpgp_cert_t key; + gnutls_openpgp_crt_t key; int ret; - ret = gnutls_openpgp_cert_init (&key); + ret = gnutls_openpgp_crt_init (&key); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); + ret = gnutls_openpgp_crt_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_get_fingerprint (key, fpr, fprlen); - gnutls_openpgp_cert_deinit (key); + ret = gnutls_openpgp_crt_get_fingerprint (key, fpr, fprlen); + gnutls_openpgp_crt_deinit (key); if (ret < 0) { gnutls_assert (); @@ -155,27 +155,27 @@ _gnutls_openpgp_fingerprint (const gnutls_datum_t * cert, time_t _gnutls_openpgp_get_raw_key_creation_time (const gnutls_datum_t * cert) { - gnutls_openpgp_cert_t key; + gnutls_openpgp_crt_t key; int ret; time_t tim; - ret = gnutls_openpgp_cert_init (&key); + ret = gnutls_openpgp_crt_init (&key); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); + ret = gnutls_openpgp_crt_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { gnutls_assert (); return ret; } - tim = gnutls_openpgp_cert_get_creation_time (key); + tim = gnutls_openpgp_crt_get_creation_time (key); - gnutls_openpgp_cert_deinit (key); + gnutls_openpgp_crt_deinit (key); return tim; } @@ -191,27 +191,27 @@ _gnutls_openpgp_get_raw_key_creation_time (const gnutls_datum_t * cert) time_t _gnutls_openpgp_get_raw_key_expiration_time (const gnutls_datum_t * cert) { - gnutls_openpgp_cert_t key; + gnutls_openpgp_crt_t key; int ret; time_t tim; - ret = gnutls_openpgp_cert_init (&key); + ret = gnutls_openpgp_crt_init (&key); if (ret < 0) { gnutls_assert (); return ret; } - ret = gnutls_openpgp_cert_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); + ret = gnutls_openpgp_crt_import (key, cert, GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { gnutls_assert (); return ret; } - tim = gnutls_openpgp_cert_get_expiration_time (key); + tim = gnutls_openpgp_crt_get_expiration_time (key); - gnutls_openpgp_cert_deinit (key); + gnutls_openpgp_crt_deinit (key); return tim; } diff --git a/libextra/openpgp/extras.c b/libextra/openpgp/extras.c index db3355530f..da14987fb6 100644 --- a/libextra/openpgp/extras.c +++ b/libextra/openpgp/extras.c @@ -134,7 +134,7 @@ gnutls_openpgp_keyring_check_id (gnutls_openpgp_keyring_t ring, int gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring, const gnutls_datum_t *data, - gnutls_openpgp_cert_fmt_t format) + gnutls_openpgp_crt_fmt_t format) { cdk_error_t err; cdk_stream_t input; diff --git a/libextra/openpgp/gnutls_openpgp.h b/libextra/openpgp/gnutls_openpgp.h index 79d81c6984..9c4124dbac 100644 --- a/libextra/openpgp/gnutls_openpgp.h +++ b/libextra/openpgp/gnutls_openpgp.h @@ -66,7 +66,7 @@ int _gnutls_openpgp_raw_key_to_gcert (gnutls_cert * cert, int _gnutls_openpgp_raw_privkey_to_gkey (gnutls_privkey * pkey, const gnutls_datum_t * raw_key, - gnutls_openpgp_cert_fmt_t format); + gnutls_openpgp_crt_fmt_t format); int _gnutls_openpgp_request_key (gnutls_session_t, diff --git a/libextra/openpgp/openpgp.h b/libextra/openpgp/openpgp.h index 5d1bdde777..84a1ad7625 100644 --- a/libextra/openpgp/openpgp.h +++ b/libextra/openpgp/openpgp.h @@ -6,21 +6,21 @@ #endif /* The format the OpenPGP key is stored in. */ -typedef enum gnutls_openpgp_cert_fmt_t +typedef enum gnutls_openpgp_crt_fmt_t { GNUTLS_OPENPGP_FMT_RAW, GNUTLS_OPENPGP_FMT_BASE64 -} gnutls_openpgp_cert_fmt_t; +} gnutls_openpgp_crt_fmt_t; #ifdef ENABLE_OPENPGP #include <opencdk.h> /* Internal context to store the OpenPGP key. */ -typedef struct gnutls_openpgp_cert_int +typedef struct gnutls_openpgp_crt_int { cdk_kbnode_t knode; -} gnutls_openpgp_cert_int; +} gnutls_openpgp_crt_int; /* Internal context to store the private OpenPGP key. */ @@ -40,46 +40,46 @@ typedef struct gnutls_openpgp_keyring_int typedef struct gnutls_openpgp_keyring_int *gnutls_openpgp_keyring_t; int _gnutls_map_cdk_rc (int rc); -int gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_get_name (gnutls_openpgp_crt_t key, int idx, char *buf, size_t * sizeof_buf); -int gnutls_openpgp_cert_get_fingerprint (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_get_fingerprint (gnutls_openpgp_crt_t key, void *fpr, size_t * fprlen); gnutls_pk_algorithm_t -gnutls_openpgp_cert_get_pk_algorithm (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key, unsigned int *bits); -int gnutls_openpgp_cert_get_version (gnutls_openpgp_cert_t key); -time_t gnutls_openpgp_cert_get_creation_time (gnutls_openpgp_cert_t key); -time_t gnutls_openpgp_cert_get_expiration_time (gnutls_openpgp_cert_t key); -int gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_get_version (gnutls_openpgp_crt_t key); +time_t gnutls_openpgp_crt_get_creation_time (gnutls_openpgp_crt_t key); +time_t gnutls_openpgp_crt_get_expiration_time (gnutls_openpgp_crt_t key); +int gnutls_openpgp_crt_get_id (gnutls_openpgp_crt_t key, unsigned char keyid[8]); -int gnutls_openpgp_cert_init (gnutls_openpgp_cert_t * key); -void gnutls_openpgp_cert_deinit (gnutls_openpgp_cert_t key); -int gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_init (gnutls_openpgp_crt_t * key); +void gnutls_openpgp_crt_deinit (gnutls_openpgp_crt_t key); +int gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format); -int gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, - gnutls_openpgp_cert_fmt_t format, + gnutls_openpgp_crt_fmt_t format); +int gnutls_openpgp_crt_export (gnutls_openpgp_crt_t key, + gnutls_openpgp_crt_fmt_t format, void *output_data, size_t * output_data_size); void gnutls_openpgp_keyring_deinit (gnutls_openpgp_keyring_t keyring); int gnutls_openpgp_keyring_init (gnutls_openpgp_keyring_t * keyring); int gnutls_openpgp_keyring_import (gnutls_openpgp_keyring_t keyring, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format); + gnutls_openpgp_crt_fmt_t format); int gnutls_openpgp_keyring_check_id (gnutls_openpgp_keyring_t ring, const unsigned char keyid[8], unsigned int flags); -int gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_verify_ring (gnutls_openpgp_crt_t key, gnutls_openpgp_keyring_t keyring, unsigned int flags, unsigned int *verify); -int gnutls_openpgp_cert_verify_self (gnutls_openpgp_cert_t key, +int gnutls_openpgp_crt_verify_self (gnutls_openpgp_crt_t key, unsigned int flags, unsigned int *verify); -int _gnutls_openpgp_cert_to_gcert (gnutls_cert * gcert, - gnutls_openpgp_cert_t cert); +int _gnutls_openpgp_crt_to_gcert (gnutls_cert * gcert, + gnutls_openpgp_crt_t cert); int _gnutls_openpgp_privkey_to_gkey (gnutls_privkey * dest, gnutls_openpgp_privkey_t src); diff --git a/libextra/openpgp/pgp.c b/libextra/openpgp/pgp.c index ae0f42f92b..2e17b7d99b 100644 --- a/libextra/openpgp/pgp.c +++ b/libextra/openpgp/pgp.c @@ -34,7 +34,7 @@ /** - * gnutls_openpgp_cert_init - This function initializes a gnutls_openpgp_cert_t structure + * gnutls_openpgp_crt_init - This function initializes a gnutls_openpgp_crt_t structure * @key: The structure to be initialized * * This function will initialize an OpenPGP key structure. @@ -43,9 +43,9 @@ * **/ int -gnutls_openpgp_cert_init (gnutls_openpgp_cert_t * key) +gnutls_openpgp_crt_init (gnutls_openpgp_crt_t * key) { - *key = gnutls_calloc (1, sizeof (gnutls_openpgp_cert_int)); + *key = gnutls_calloc (1, sizeof (gnutls_openpgp_crt_int)); if (*key) return 0; /* success */ @@ -53,13 +53,13 @@ gnutls_openpgp_cert_init (gnutls_openpgp_cert_t * key) } /** - * gnutls_openpgp_cert_deinit - This function deinitializes memory used by a gnutls_openpgp_cert_t structure + * gnutls_openpgp_crt_deinit - This function deinitializes memory used by a gnutls_openpgp_crt_t structure * @key: The structure to be initialized * * This function will deinitialize a key structure. **/ void -gnutls_openpgp_cert_deinit (gnutls_openpgp_cert_t key) +gnutls_openpgp_crt_deinit (gnutls_openpgp_crt_t key) { if (!key) return; @@ -74,20 +74,20 @@ gnutls_openpgp_cert_deinit (gnutls_openpgp_cert_t key) } /** - * gnutls_openpgp_cert_import - This function will import a RAW or BASE64 encoded key + * gnutls_openpgp_crt_import - This function will import a RAW or BASE64 encoded key * @key: The structure to store the parsed key. * @data: The RAW or BASE64 encoded key. - * @format: One of gnutls_openpgp_cert_fmt_t elements. + * @format: One of gnutls_openpgp_crt_fmt_t elements. * * This function will convert the given RAW or Base64 encoded key - * to the native gnutls_openpgp_cert_t format. The output will be stored in 'key'. + * to the native gnutls_openpgp_crt_t format. The output will be stored in 'key'. * * Returns 0 on success. **/ int -gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_import (gnutls_openpgp_crt_t key, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format) + gnutls_openpgp_crt_fmt_t format) { cdk_stream_t inp; int rc; @@ -120,9 +120,9 @@ gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, } /** - * gnutls_openpgp_cert_export - This function will export a RAW or BASE64 encoded key + * gnutls_openpgp_crt_export - This function will export a RAW or BASE64 encoded key * @key: Holds the key. - * @format: One of gnutls_openpgp_cert_fmt_t elements. + * @format: One of gnutls_openpgp_crt_fmt_t elements. * @output_data: will contain the key base64 encoded or raw * @output_data_size: holds the size of output_data (and will be replaced by the actual size of parameters) * @@ -134,8 +134,8 @@ gnutls_openpgp_cert_import (gnutls_openpgp_cert_t key, * **/ int -gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, - gnutls_openpgp_cert_fmt_t format, +gnutls_openpgp_crt_export (gnutls_openpgp_crt_t key, + gnutls_openpgp_crt_fmt_t format, void *output_data, size_t * output_data_size) { size_t input_data_size = *output_data_size; @@ -185,7 +185,7 @@ gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, /** - * gnutls_openpgp_cert_get_fingerprint - Gets the fingerprint + * gnutls_openpgp_crt_get_fingerprint - Gets the fingerprint * @key: the raw data that contains the OpenPGP public key. * @fpr: the buffer to save the fingerprint, must hold at least 20 bytes. * @fprlen: the integer to save the length of the fingerprint. @@ -194,7 +194,7 @@ gnutls_openpgp_cert_export (gnutls_openpgp_cert_t key, * the fingerprint can be 16 or 20 bytes. **/ int -gnutls_openpgp_cert_get_fingerprint (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_fingerprint (gnutls_openpgp_crt_t key, void *fpr, size_t * fprlen) { cdk_packet_t pkt; @@ -224,7 +224,7 @@ gnutls_openpgp_cert_get_fingerprint (gnutls_openpgp_cert_t key, } int -_gnutls_openpgp_count_key_names (gnutls_openpgp_cert_t key) +_gnutls_openpgp_count_key_names (gnutls_openpgp_crt_t key) { cdk_kbnode_t p, ctx; cdk_packet_t pkt; @@ -250,7 +250,7 @@ _gnutls_openpgp_count_key_names (gnutls_openpgp_cert_t key) /** - * gnutls_openpgp_cert_get_name - Extracts the userID + * gnutls_openpgp_crt_get_name - Extracts the userID * @key: the structure that contains the OpenPGP public key. * @idx: the index of the ID to extract * @buf: a pointer to a structure to hold the name @@ -264,7 +264,7 @@ _gnutls_openpgp_count_key_names (gnutls_openpgp_cert_t key) * **/ int -gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_name (gnutls_openpgp_crt_t key, int idx, char *buf, size_t * sizeof_buf) { cdk_kbnode_t ctx = NULL, p; @@ -319,7 +319,7 @@ gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, } /** - * gnutls_openpgp_cert_get_pk_algorithm - This function returns the key's PublicKey algorithm + * gnutls_openpgp_crt_get_pk_algorithm - This function returns the key's PublicKey algorithm * @key: is an OpenPGP key * @bits: if bits is non null it will hold the size of the parameters' in bits * @@ -335,7 +335,7 @@ gnutls_openpgp_cert_get_name (gnutls_openpgp_cert_t key, * **/ gnutls_pk_algorithm_t -gnutls_openpgp_cert_get_pk_algorithm (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key, unsigned int *bits) { cdk_packet_t pkt; @@ -364,13 +364,13 @@ gnutls_openpgp_cert_get_pk_algorithm (gnutls_openpgp_cert_t key, /** - * gnutls_openpgp_cert_get_version - Extracts the version of the key. + * gnutls_openpgp_crt_get_version - Extracts the version of the key. * @key: the structure that contains the OpenPGP public key. * * Extract the version of the OpenPGP key. **/ int -gnutls_openpgp_cert_get_version (gnutls_openpgp_cert_t key) +gnutls_openpgp_crt_get_version (gnutls_openpgp_crt_t key) { cdk_packet_t pkt; int version; @@ -389,13 +389,13 @@ gnutls_openpgp_cert_get_version (gnutls_openpgp_cert_t key) /** - * gnutls_openpgp_cert_get_creation_time - Extract the timestamp + * gnutls_openpgp_crt_get_creation_time - Extract the timestamp * @key: the structure that contains the OpenPGP public key. * * Returns the timestamp when the OpenPGP key was created. **/ time_t -gnutls_openpgp_cert_get_creation_time (gnutls_openpgp_cert_t key) +gnutls_openpgp_crt_get_creation_time (gnutls_openpgp_crt_t key) { cdk_packet_t pkt; time_t timestamp; @@ -414,14 +414,14 @@ gnutls_openpgp_cert_get_creation_time (gnutls_openpgp_cert_t key) /** - * gnutls_openpgp_cert_get_expiration_time - Extract the expire date + * gnutls_openpgp_crt_get_expiration_time - Extract the expire date * @key: the structure that contains the OpenPGP public key. * * Returns the time when the OpenPGP key expires. A value of '0' means * that the key doesn't expire at all. **/ time_t -gnutls_openpgp_cert_get_expiration_time (gnutls_openpgp_cert_t key) +gnutls_openpgp_crt_get_expiration_time (gnutls_openpgp_crt_t key) { cdk_packet_t pkt; time_t expiredate; @@ -439,14 +439,14 @@ gnutls_openpgp_cert_get_expiration_time (gnutls_openpgp_cert_t key) } /** - * gnutls_openpgp_cert_get_id - Gets the keyID + * gnutls_openpgp_crt_get_id - Gets the keyID * @key: the structure that contains the OpenPGP public key. * @keyid: the buffer to save the keyid. * * Returns the 64-bit keyID of the OpenPGP key. **/ int -gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, unsigned char keyid[8]) +gnutls_openpgp_crt_get_id (gnutls_openpgp_crt_t key, unsigned char keyid[8]) { cdk_packet_t pkt; uint32_t kid[2]; @@ -475,8 +475,8 @@ gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, unsigned char keyid[8]) } /** - * gnutls_openpgp_cert_check_hostname - This function compares the given hostname with the hostname in the key - * @key: should contain an gnutls_openpgp_cert_t structure + * gnutls_openpgp_crt_check_hostname - This function compares the given hostname with the hostname in the key + * @key: should contain an gnutls_openpgp_crt_t structure * @hostname: A null terminated string that contains a DNS name * * This function will check if the given key's owner matches @@ -487,7 +487,7 @@ gnutls_openpgp_cert_get_id (gnutls_openpgp_cert_t key, unsigned char keyid[8]) * **/ int -gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_check_hostname (gnutls_openpgp_crt_t key, const char *hostname) { char dnsname[MAX_CN]; @@ -499,7 +499,7 @@ gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, for (i = 0; !(ret < 0); i++) { dnsnamesize = sizeof (dnsname); - ret = gnutls_openpgp_cert_get_name (key, i, dnsname, &dnsnamesize); + ret = gnutls_openpgp_crt_get_name (key, i, dnsname, &dnsnamesize); /* FIXME: ret is not used */ if (_gnutls_hostname_compare (dnsname, hostname)) return 1; @@ -510,8 +510,8 @@ gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, } /** - * gnutls_openpgp_cert_get_key_usage - This function returns the key's usage - * @key: should contain a gnutls_openpgp_cert_t structure + * gnutls_openpgp_crt_get_key_usage - This function returns the key's usage + * @key: should contain a gnutls_openpgp_crt_t structure * @key_usage: where the key usage bits will be stored * * This function will return certificate's key usage, by checking the @@ -522,7 +522,7 @@ gnutls_openpgp_cert_check_hostname (gnutls_openpgp_cert_t key, * */ int -gnutls_openpgp_cert_get_key_usage (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_get_key_usage (gnutls_openpgp_crt_t key, unsigned int *key_usage) { cdk_packet_t pkt; diff --git a/libextra/openpgp/pgpverify.c b/libextra/openpgp/pgpverify.c index ba48947544..5130d441a7 100644 --- a/libextra/openpgp/pgpverify.c +++ b/libextra/openpgp/pgpverify.c @@ -34,7 +34,7 @@ /** - * gnutls_openpgp_cert_verify_ring - Verify all signatures in the key + * gnutls_openpgp_crt_verify_ring - Verify all signatures in the key * @key: the structure that holds the key. * @keyring: holds the keyring to check against * @flags: unused (should be 0) @@ -56,7 +56,7 @@ * Returns 0 on success. **/ int -gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_verify_ring (gnutls_openpgp_crt_t key, gnutls_openpgp_keyring_t keyring, unsigned int flags, unsigned int *verify) { @@ -98,7 +98,7 @@ gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, /* Check if the key is included in the ring. */ if (!(flags & GNUTLS_VERIFY_DO_NOT_ALLOW_SAME)) { - rc = gnutls_openpgp_cert_get_id (key, id); + rc = gnutls_openpgp_crt_get_id (key, id); if (rc < 0) { gnutls_assert (); @@ -116,7 +116,7 @@ gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, /** - * gnutls_openpgp_cert_verify_self - Verify the self signature on the key + * gnutls_openpgp_crt_verify_self - Verify the self signature on the key * @key: the structure that holds the key. * @flags: unused (should be 0) * @verify: will hold the key verification output. @@ -130,7 +130,7 @@ gnutls_openpgp_cert_verify_ring (gnutls_openpgp_cert_t key, * Returns 0 on success. **/ int -gnutls_openpgp_cert_verify_self (gnutls_openpgp_cert_t key, +gnutls_openpgp_crt_verify_self (gnutls_openpgp_crt_t key, unsigned int flags, unsigned int *verify) { int status; diff --git a/libextra/openpgp/privkey.c b/libextra/openpgp/privkey.c index 632d2a42f5..939400e63e 100644 --- a/libextra/openpgp/privkey.c +++ b/libextra/openpgp/privkey.c @@ -74,7 +74,7 @@ gnutls_openpgp_privkey_deinit (gnutls_openpgp_privkey_t key) * gnutls_openpgp_privkey_import - This function will import a RAW or BASE64 encoded key * @key: The structure to store the parsed key. * @data: The RAW or BASE64 encoded key. - * @format: One of gnutls_openpgp_cert_fmt_t elements. + * @format: One of gnutls_openpgp_crt_fmt_t elements. * @pass: Unused for now * @flags: should be zero * @@ -87,7 +87,7 @@ gnutls_openpgp_privkey_deinit (gnutls_openpgp_privkey_t key) int gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key, const gnutls_datum_t * data, - gnutls_openpgp_cert_fmt_t format, + gnutls_openpgp_crt_fmt_t format, const char *pass, unsigned int flags) { int rc; diff --git a/src/common.c b/src/common.c index 37da0d4076..1e08bead1a 100644 --- a/src/common.c +++ b/src/common.c @@ -291,7 +291,7 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) const char *cstr; char name[256]; size_t name_len = sizeof (name); - gnutls_openpgp_cert_t crt; + gnutls_openpgp_crt_t crt; const gnutls_datum_t *cert_list; int cert_list_size = 0; time_t expiret; @@ -303,9 +303,9 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) { unsigned int algo, bits; - gnutls_openpgp_cert_init (&crt); + gnutls_openpgp_crt_init (&crt); ret = - gnutls_openpgp_cert_import (crt, &cert_list[0], + gnutls_openpgp_crt_import (crt, &cert_list[0], GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { @@ -320,7 +320,7 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) size = sizeof (buffer); ret = - gnutls_openpgp_cert_export (crt, + gnutls_openpgp_crt_export (crt, GNUTLS_OPENPGP_FMT_BASE64, buffer, &size); if (ret < 0) @@ -338,7 +338,7 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) * if it matches the name of the host we * connected to. */ - if (gnutls_openpgp_cert_check_hostname (crt, hostname) == 0) + if (gnutls_openpgp_crt_check_hostname (crt, hostname) == 0) { printf (" # The hostname in the key does NOT match '%s'.\n", @@ -350,8 +350,8 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) } } - activet = gnutls_openpgp_cert_get_creation_time (crt); - expiret = gnutls_openpgp_cert_get_expiration_time (crt); + activet = gnutls_openpgp_crt_get_creation_time (crt); + expiret = gnutls_openpgp_crt_get_expiration_time (crt); printf (" # Key was created at: %s", my_ctime (&activet)); printf (" # Key expires: "); @@ -360,7 +360,7 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) else printf ("Never\n"); - if (gnutls_openpgp_cert_get_fingerprint (crt, digest, &digest_size) >= 0) + if (gnutls_openpgp_crt_get_fingerprint (crt, digest, &digest_size) >= 0) { print = raw_to_string (digest, digest_size); @@ -368,7 +368,7 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) gnutls_openpgp_key_get_version (crt)); bits = 0; - algo = gnutls_openpgp_cert_get_pk_algorithm (crt, &bits); + algo = gnutls_openpgp_crt_get_pk_algorithm (crt, &bits); printf (" # PGP Key public key algorithm: "); cstr = SU (gnutls_pk_algorithm_get_name (algo)); @@ -378,7 +378,7 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) printf (" # PGP Key fingerprint: %s\n", print); name_len = sizeof (name); - if (gnutls_openpgp_cert_get_name (crt, 0, name, &name_len) < 0) + if (gnutls_openpgp_crt_get_name (crt, 0, name, &name_len) < 0) { fprintf (stderr, "Could not extract name\n"); } @@ -389,7 +389,7 @@ print_openpgp_info (gnutls_session_t session, const char *hostname) } - gnutls_openpgp_cert_deinit (crt); + gnutls_openpgp_crt_deinit (crt); } } |