[gnutls-help] Obtain CN from session certificate
Nikos Mavrogiannopoulos
nmav at gnutls.org
Mon Jan 16 19:35:16 CET 2017
On Mon, 2017-01-16 at 08:12 +0000, Jordi Blasi Uribarri wrote:
> Hi,
>
> I am trying to adapt some other developers project and my
> understanding of the process is not complete. I have compiled and run
> the FreeCoap project that uses GNUTLS to stablish a DTLS session to
> comunicate between peers. At the present, the code negotiates the
> keys using x.509 certificates and sends information correctly. The
> keys are generated with the following command:
> [...]
> What I want is to obtain in the code the information relative to the
> requester, this means, the cn, unit, and organization.
I'd suggest to read the manual. While extensive it has quite some
examples. You'll need to get the peer's certificate and parse it. For
start check gnutls_certificate_get_peers().
regards,
Nikos
More information about the Gnutls-help
mailing list