certs.h (509B)
1 #ifndef GEMINI_CERTS_H 2 #define GEMINI_CERTS_H 3 #include <bearssl.h> 4 #include <stdio.h> 5 6 struct gmni_options; 7 8 struct gmni_client_certificate { 9 br_x509_certificate *chain; 10 size_t nchain; 11 struct gmni_private_key *key; 12 }; 13 14 struct gmni_private_key { 15 int type; 16 union { 17 br_rsa_private_key rsa; 18 br_ec_private_key ec; 19 }; 20 unsigned char data[]; 21 }; 22 23 // Returns nonzero on failure and sets errno. Closes both files. 24 int gmni_ccert_load(struct gmni_client_certificate *cert, 25 FILE *certin, FILE *skin); 26 27 #endif