From: Nikos Mavrogiannopoulos Date: Tue, 31 Jan 2012 17:23:25 +0000 (+0100) Subject: Updated documentation for gnutls_pubkey. X-Git-Tag: gnutls_3_0_13~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f71ea450074a1740e52669af16b5c926d6fa8da;p=thirdparty%2Fgnutls.git Updated documentation for gnutls_pubkey. --- diff --git a/doc/cha-cert-auth2.texi b/doc/cha-cert-auth2.texi index 9d246b04bb..b9e13eb3b8 100644 --- a/doc/cha-cert-auth2.texi +++ b/doc/cha-cert-auth2.texi @@ -579,7 +579,8 @@ or through an ASN.1 encoding of the X.509 @code{SubjectPublicKeyInfo} sequence. @showfuncdesc{gnutls_pubkey_import_x509} -@showfuncD{gnutls_pubkey_import_openpgp,gnutls_pubkey_import_pkcs11,gnutls_pubkey_import_pkcs11_url,gnutls_pubkey_import_privkey} +@showfuncE{gnutls_pubkey_import_openpgp,gnutls_pubkey_import_pkcs11,gnutls_pubkey_import_pkcs11_url,gnutls_pubkey_import_privkey,gnutls_pubkey_import} +@showfuncdesc{gnutls_pubkey_export} Additional functions are available that will return information over a public key. diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c index 5e7f94a7e7..7bebc3562a 100644 --- a/lib/gnutls_pubkey.c +++ b/lib/gnutls_pubkey.c @@ -465,7 +465,9 @@ gnutls_pubkey_get_openpgp_key_id (gnutls_pubkey_t key, unsigned int flags, * @output_data_size: holds the size of output_data (and will be * replaced by the actual size of parameters) * - * This function will export the certificate to DER or PEM format. + * This function will export the public key to DER or PEM format. + * The contents of the exported data is the SubjectPublicKeyInfo + * X.509 structure. * * If the buffer provided is not long enough to hold the output, then * *output_data_size is updated and %GNUTLS_E_SHORT_MEMORY_BUFFER will @@ -801,10 +803,11 @@ int gnutls_pubkey_get_pk_ecc_x962 (gnutls_pubkey_t key, gnutls_datum_t* paramete * @data: The DER or PEM encoded certificate. * @format: One of DER or PEM * - * This function will convert the given DER or PEM encoded Public key - * to the native gnutls_pubkey_t format.The output will be stored - * in @key. - * If the Certificate is PEM encoded it should have a header of "PUBLIC KEY". + * This function will import the provided public key in + * a SubjectPublicKeyInfo X.509 structure to a native + * %gnutls_pubkey_t structure. The output will be stored + * in @key. If the public key is PEM encoded it should have a header + * of "PUBLIC KEY". * * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value.