You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
524 B

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "conn.h"
/*#include "dtls.h"*/
#include "dtls_common.h"
#include "dtls_gnutls.h"
struct dtls_ssl_cert dtls_gnutls_get_peers_cert(struct conn * conn,unsigned int n)
struct dtls_gnutls_data *d;
const gnutls_datum_t * clist;
struct dtls_ssl_cert cert;
unsigned int len;
d=(struct dtls_gnutls_data*)conn->dtls_data;
clist = gnutls_certificate_get_peers(d->session,&len);
cert.size = clist[n].size; clist[n].data;
return cert;