diff options
| author | Michael Brown | 2020-12-15 17:11:34 +0100 |
|---|---|---|
| committer | Michael Brown | 2020-12-15 17:54:06 +0100 |
| commit | f43a8f8b9f808fb0a8347663abf6efe6908821ed (patch) | |
| tree | 012d6ffcb49d4c4744e12b8a8cbc207f13d3bf65 /src/include/ipxe/tls.h | |
| parent | [tls] Include root of trust within definition of TLS session (diff) | |
| download | ipxe-f43a8f8b9f808fb0a8347663abf6efe6908821ed.tar.gz ipxe-f43a8f8b9f808fb0a8347663abf6efe6908821ed.tar.xz ipxe-f43a8f8b9f808fb0a8347663abf6efe6908821ed.zip | |
[crypto] Allow private key to be specified as a TLS connection parameter
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/tls.h')
| -rw-r--r-- | src/include/ipxe/tls.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/ipxe/tls.h b/src/include/ipxe/tls.h index 8345c9a26..8b03579cc 100644 --- a/src/include/ipxe/tls.h +++ b/src/include/ipxe/tls.h @@ -18,6 +18,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include <ipxe/sha1.h> #include <ipxe/sha256.h> #include <ipxe/x509.h> +#include <ipxe/privkey.h> #include <ipxe/pending.h> #include <ipxe/iobuf.h> #include <ipxe/tables.h> @@ -257,6 +258,8 @@ struct tls_session { const char *name; /** Root of trust */ struct x509_root *root; + /** Private key */ + struct private_key *key; /** Session ID */ uint8_t id[32]; @@ -322,6 +325,8 @@ struct tls_connection { struct digest_algorithm *handshake_digest; /** Digest algorithm context used for handshake verification */ uint8_t *handshake_ctx; + /** Private key */ + struct private_key *key; /** Client certificate chain (if used) */ struct x509_chain *certs; /** Secure renegotiation flag */ @@ -384,6 +389,6 @@ struct tls_connection { #define TLS_RX_ALIGN 16 extern int add_tls ( struct interface *xfer, const char *name, - struct x509_root *root ); + struct x509_root *root, struct private_key *key ); #endif /* _IPXE_TLS_H */ |
