mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 21:41:43 +03:00
[crypto] Include "?subject=" in cross-signed certificate URI
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -151,8 +151,8 @@ static int validator_start_download ( struct validator *validator,
|
|||||||
crosscert = ( crosscert_copy ? crosscert_copy : crosscert_default );
|
crosscert = ( crosscert_copy ? crosscert_copy : crosscert_default );
|
||||||
|
|
||||||
/* Allocate URI string */
|
/* Allocate URI string */
|
||||||
uri_string_len = ( strlen ( crosscert ) + 14 /* "/%08x.der?" */ +
|
uri_string_len = ( strlen ( crosscert ) + 22 /* "/%08x.der?subject=" */
|
||||||
base64_encoded_len ( issuer->len ) + 1 /* NUL */ );
|
+ base64_encoded_len ( issuer->len ) + 1 /* NUL */ );
|
||||||
uri_string = zalloc ( uri_string_len );
|
uri_string = zalloc ( uri_string_len );
|
||||||
if ( ! uri_string ) {
|
if ( ! uri_string ) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
@@ -163,7 +163,7 @@ static int validator_start_download ( struct validator *validator,
|
|||||||
crc = crc32_le ( 0xffffffffUL, issuer->data, issuer->len );
|
crc = crc32_le ( 0xffffffffUL, issuer->data, issuer->len );
|
||||||
|
|
||||||
/* Generate URI string */
|
/* Generate URI string */
|
||||||
len = snprintf ( uri_string, uri_string_len, "%s/%08x.der?",
|
len = snprintf ( uri_string, uri_string_len, "%s/%08x.der?subject=",
|
||||||
crosscert, crc );
|
crosscert, crc );
|
||||||
base64_encode ( issuer->data, issuer->len, ( uri_string + len ) );
|
base64_encode ( issuer->data, issuer->len, ( uri_string + len ) );
|
||||||
DBGC ( validator, "VALIDATOR %p downloading cross-signed certificate "
|
DBGC ( validator, "VALIDATOR %p downloading cross-signed certificate "
|
||||||
|
|||||||
Reference in New Issue
Block a user