[gnutls-devel] Guile-GnuTLS | Add gnutls_x509_privkey_export binding. (5fb0e70b)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Jun 16 18:01:41 CEST 2023




David Thompson commented on a discussion on guile/src/core.c: https://gitlab.com/gnutls/guile/-/commit/5fb0e70b3bea2a9256c7c803c59c6423c8ad298e#note_1434327215

> +	    "Return a bytevector resulting from the export of @var{key} "
> +	    "(an X.509 private key) according to @var{format}.")
> +#define FUNC_NAME s_scm_gnutls_export_x509_private_key
> +{
> +  int err;
> +  SCM result;
> +  gnutls_x509_privkey_t c_key;
> +  gnutls_x509_crt_fmt_t c_format;
> +  uint8_t *c_data;
> +  size_t c_data_len;
> +
> +  c_key = scm_to_gnutls_x509_private_key (key, 1, FUNC_NAME);
> +  c_format = scm_to_gnutls_x509_certificate_format (format, 2, FUNC_NAME);
> +  c_data = scm_malloc (2048);
> +  c_data_len = sizeof (c_data);
> +

I will check how it's done in `pkcs_export_parameters` and try to do the same.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/guile/-/commit/5fb0e70b3bea2a9256c7c803c59c6423c8ad298e#note_1434327215
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20230616/1a44c853/attachment-0001.html>


More information about the Gnutls-devel mailing list