mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 10:02:42 +03:00
[tls] Use iPXE native RSA algorithm
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -182,9 +182,6 @@ struct tls_session {
|
||||
/** SHA256 context for handshake verification */
|
||||
uint8_t handshake_sha256_ctx[SHA256_CTX_SIZE];
|
||||
|
||||
/** Hack: server RSA public key */
|
||||
struct x509_rsa_public_key rsa;
|
||||
|
||||
/** TX sequence number */
|
||||
uint64_t tx_seq;
|
||||
/** TX pending transmissions */
|
||||
|
||||
@@ -11,31 +11,14 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct asn1_cursor;
|
||||
#include <ipxe/asn1.h>
|
||||
|
||||
/** An X.509 RSA public key */
|
||||
struct x509_rsa_public_key {
|
||||
/** Modulus */
|
||||
uint8_t *modulus;
|
||||
/** Modulus length */
|
||||
size_t modulus_len;
|
||||
/** Exponent */
|
||||
uint8_t *exponent;
|
||||
/** Exponent length */
|
||||
size_t exponent_len;
|
||||
/** Raw public key */
|
||||
struct asn1_cursor raw;
|
||||
};
|
||||
|
||||
/**
|
||||
* Free X.509 RSA public key
|
||||
*
|
||||
* @v rsa_pubkey RSA public key
|
||||
*/
|
||||
static inline void
|
||||
x509_free_rsa_public_key ( struct x509_rsa_public_key *rsa_pubkey ) {
|
||||
free ( rsa_pubkey->modulus );
|
||||
}
|
||||
|
||||
extern int x509_rsa_public_key ( const struct asn1_cursor *certificate,
|
||||
struct x509_rsa_public_key *rsa_pubkey );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user