[crypto] Allow private key to be specified as a TLS connection parameter

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2020-12-15 16:54:06 +00:00
parent 6a8664d9ec
commit f43a8f8b9f
8 changed files with 103 additions and 21 deletions
+2 -2
View File
@@ -116,13 +116,13 @@ struct x509_certificate * certstore_find ( struct asn1_cursor *raw ) {
* @v key Private key
* @ret cert X.509 certificate, or NULL if not found
*/
struct x509_certificate * certstore_find_key ( struct asn1_cursor *key ) {
struct x509_certificate * certstore_find_key ( struct private_key *key ) {
struct x509_certificate *cert;
/* Search for certificate within store */
list_for_each_entry ( cert, &certstore.links, store.list ) {
if ( pubkey_match ( cert->signature_algorithm->pubkey,
key->data, key->len,
key->builder.data, key->builder.len,
cert->subject.public_key.raw.data,
cert->subject.public_key.raw.len ) == 0 )
return certstore_found ( cert );