summaryrefslogtreecommitdiff
path: root/lib/x509
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2018-09-20 10:11:42 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2018-09-20 10:13:23 +0200
commit8ee1fb73c8284bfd2105d7258d217d1f6fbb3696 (patch)
treeef96b953a3e34b00e15a6aeb362922dd776cf747 /lib/x509
parent96f2e1923a8c32dcfe21e6a7b64b5861f4f31bdf (diff)
downloadgnutls-8ee1fb73c8284bfd2105d7258d217d1f6fbb3696.tar.gz
ECC export/import: updated documentation on EdDSA curves
This clarifies the format that parameters in the EdDSA curves will be returned, and also ensures that the import/export functions fail on unsupported curves. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/x509')
-rw-r--r--lib/x509/privkey.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c
index c018f6dc97..562ad418d0 100644
--- a/lib/x509/privkey.c
+++ b/lib/x509/privkey.c
@@ -1088,7 +1088,8 @@ gnutls_x509_privkey_import_dsa_raw(gnutls_x509_privkey_t key,
*
* This function will convert the given elliptic curve parameters to the
* native #gnutls_x509_privkey_t format. The output will be stored
- * in @key. For EdDSA keys, the @x and @k values will be read.
+ * in @key. For EdDSA keys, the @x and @k values must be in the
+ * native to curve format.
*
* Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a
* negative error value.
@@ -1530,7 +1531,9 @@ gnutls_sec_param_t gnutls_x509_privkey_sec_param(gnutls_x509_privkey_t key)
* This function will export the ECC private key's parameters found
* in the given structure. The new parameters will be allocated using
* gnutls_malloc() and will be stored in the appropriate datum.
- * For EdDSA keys, the @y value should be %NULL.
+ *
+ * In EdDSA curves the @y parameter will be %NULL and the other parameters
+ * will be in the native format for the curve.
*
* Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a
* negative error value.
@@ -1552,7 +1555,7 @@ int gnutls_x509_privkey_export_ecc_raw(gnutls_x509_privkey_t key,
}
/**
- * gnutls_x509_privkey_export_ecc_raw:
+ * gnutls_x509_privkey_export_gost_raw:
* @key: a key
* @curve: will hold the curve
* @digest: will hold the digest