Description of problem: gnutls_x509_crt_set_key() should have a reference to gnutls_pubkey_import_x509() so you can find out how to import it. gnutls_pubkey_encrypt_data() doesn't document that the ciphertext is allocated using gnutls_alloc and needs to be freed!
I've added that text to solve the second point. https://gitlab.com/gnutls/gnutls/commit/09d8d8a89f56cf63745b82834945fa33a1a7654e I'm not sure how gnutls_pubkey_import_x509() fits into the description of gnutls_x509_crt_set_key(). Could you elaborate or suggest some text?
If you have use doxygen you normally just add a reference using: @see gnutls_pubkey_import_x509() Or you would write: To export the public key from the PublicKeyInfo part again, you can do this using gnutls_pubkey_import_x509(). I was looking for gnutls_x509_crt_get_key() or gnutls_x509_crt_get_pubkey(), but there is no such function. I wasn't obvious for me that I have to look in the pubkey import functions. So a simple reference would already help.
gnutls-3.4.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-9b8c741e68
gnutls-3.4.7-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update gnutls' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-9b8c741e68
gnutls-3.4.7-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.