summaryrefslogtreecommitdiff
path: root/lib/x509
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2018-11-11 08:52:13 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2018-11-15 13:43:02 +0100
commit74be675bd1d6e4bdf5a0c20f854344da8b87720d (patch)
treef872ee6a1f748f35ee3c3eed90810b87b8184c19 /lib/x509
parent64771f333f223551d76243319af439db13e0b638 (diff)
downloadgnutls-74be675bd1d6e4bdf5a0c20f854344da8b87720d.tar.gz
doc: minor updates in elliptic curve documentation
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/x509')
-rw-r--r--lib/x509/privkey.c26
-rw-r--r--lib/x509/x509.c21
2 files changed, 25 insertions, 22 deletions
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index db1279e842..a9ce8475fd 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -1082,8 +1082,8 @@ gnutls_x509_privkey_import_dsa_raw(gnutls_x509_privkey_t key,
* gnutls_x509_privkey_import_ecc_raw:
* @key: The data to store the parsed key
* @curve: holds the curve
- * @x: holds the x
- * @y: holds the y
+ * @x: holds the x-coordinate
+ * @y: holds the y-coordinate
* @k: holds the k
*
* This function will convert the given elliptic curve parameters to the
@@ -1188,9 +1188,9 @@ gnutls_x509_privkey_import_ecc_raw(gnutls_x509_privkey_t key,
* @curve: holds the curve
* @digest: will hold the digest
* @paramset: will hold the GOST parameter set ID
- * @x: holds the x
- * @y: holds the y
- * @k: holds the k
+ * @x: holds the x-coordinate
+ * @y: holds the y-coordinate
+ * @k: holds the k (private key)
*
* This function will convert the given GOST private key's parameters to the
* native #gnutls_x509_privkey_t format. The output will be stored
@@ -1525,8 +1525,8 @@ gnutls_sec_param_t gnutls_x509_privkey_sec_param(gnutls_x509_privkey_t key)
* gnutls_x509_privkey_export_ecc_raw:
* @key: a key
* @curve: will hold the curve
- * @x: will hold the x coordinate
- * @y: will hold the y coordinate
+ * @x: will hold the x-coordinate
+ * @y: will hold the y-coordinate
* @k: will hold the private key
*
* This function will export the ECC private key's parameters found
@@ -1542,10 +1542,10 @@ gnutls_sec_param_t gnutls_x509_privkey_sec_param(gnutls_x509_privkey_t key)
* Since: 3.0
**/
int gnutls_x509_privkey_export_ecc_raw(gnutls_x509_privkey_t key,
- gnutls_ecc_curve_t * curve,
- gnutls_datum_t * x,
- gnutls_datum_t * y,
- gnutls_datum_t * k)
+ gnutls_ecc_curve_t *curve,
+ gnutls_datum_t *x,
+ gnutls_datum_t *y,
+ gnutls_datum_t *k)
{
if (key == NULL) {
gnutls_assert();
@@ -1561,8 +1561,8 @@ int gnutls_x509_privkey_export_ecc_raw(gnutls_x509_privkey_t key,
* @curve: will hold the curve
* @digest: will hold the digest
* @paramset: will hold the GOST parameter set ID
- * @x: will hold the x coordinate
- * @y: will hold the y coordinate
+ * @x: will hold the x-coordinate
+ * @y: will hold the y-coordinate
* @k: will hold the private key
*
* This function will export the GOST private key's parameters found
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index 6fe6cd91c3..998062fd6d 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -3480,21 +3480,24 @@ gnutls_x509_crt_get_pk_rsa_raw(gnutls_x509_crt_t crt,
* gnutls_x509_crt_get_pk_ecc_raw:
* @crt: Holds the certificate
* @curve: will hold the curve
- * @x: will hold x
- * @y: will hold y
+ * @x: will hold the x-coordinate
+ * @y: will hold the y-coordinate
*
* This function will export the ECC public key's parameters found in
* the given certificate. The new parameters will be allocated using
* gnutls_malloc() and will be stored in the appropriate datum.
*
+ * In EdDSA curves the @y parameter will be %NULL and the other parameters
+ * will be in the native format for the curve.
+ *
* Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code.
*
* Since: 3.4.1
**/
int
gnutls_x509_crt_get_pk_ecc_raw(gnutls_x509_crt_t crt,
- gnutls_ecc_curve_t * curve,
- gnutls_datum_t * x, gnutls_datum_t * y)
+ gnutls_ecc_curve_t *curve,
+ gnutls_datum_t *x, gnutls_datum_t *y)
{
int ret;
gnutls_pubkey_t pubkey;
@@ -3531,8 +3534,8 @@ gnutls_x509_crt_get_pk_ecc_raw(gnutls_x509_crt_t crt,
* @curve: will hold the curve
* @digest: will hold the digest
* @paramset: will hold the GOST parameter set ID
- * @x: will hold x
- * @y: will hold y
+ * @x: will hold the x-coordinate
+ * @y: will hold the y-coordinate
*
* This function will export the GOST public key's parameters found in
* the given certificate. The new parameters will be allocated using
@@ -3544,10 +3547,10 @@ gnutls_x509_crt_get_pk_ecc_raw(gnutls_x509_crt_t crt,
**/
int
gnutls_x509_crt_get_pk_gost_raw(gnutls_x509_crt_t crt,
- gnutls_ecc_curve_t * curve,
- gnutls_digest_algorithm_t * digest,
+ gnutls_ecc_curve_t *curve,
+ gnutls_digest_algorithm_t *digest,
gnutls_gost_paramset_t *paramset,
- gnutls_datum_t * x, gnutls_datum_t * y)
+ gnutls_datum_t *x, gnutls_datum_t *y)
{
int ret;
gnutls_pubkey_t pubkey;