00001 #ifndef _GPXE_X509_H 00002 #define _GPXE_X509_H 00003 00004 /** @file 00005 * 00006 * X.509 certificates 00007 * 00008 */ 00009 00010 FILE_LICENCE ( GPL2_OR_LATER ); 00011 00012 #include <stdint.h> 00013 00014 struct asn1_cursor; 00015 00016 /** An X.509 RSA public key */ 00017 struct x509_rsa_public_key { 00018 /** Modulus */ 00019 uint8_t *modulus; 00020 /** Modulus length */ 00021 size_t modulus_len; 00022 /** Exponent */ 00023 uint8_t *exponent; 00024 /** Exponent length */ 00025 size_t exponent_len; 00026 }; 00027 00028 /** 00029 * Free X.509 RSA public key 00030 * 00031 * @v rsa_pubkey RSA public key 00032 */ 00033 static inline void 00034 x509_free_rsa_public_key ( struct x509_rsa_public_key *rsa_pubkey ) { 00035 free ( rsa_pubkey->modulus ); 00036 } 00037 00038 extern int x509_rsa_public_key ( const struct asn1_cursor *certificate, 00039 struct x509_rsa_public_key *rsa_pubkey ); 00040 00041 #endif /* _GPXE_X509_H */
1.5.7.1