Преглед на файлове

[crypto] Include "?subject=" in cross-signed certificate URI

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown преди 12 години
родител
ревизия
4855e86d95
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3
    3
      src/net/validator.c

+ 3
- 3
src/net/validator.c Целия файл

@@ -151,8 +151,8 @@ static int validator_start_download ( struct validator *validator,
151 151
 	crosscert = ( crosscert_copy ? crosscert_copy : crosscert_default );
152 152
 
153 153
 	/* Allocate URI string */
154
-	uri_string_len = ( strlen ( crosscert ) + 14 /* "/%08x.der?" */ +
155
-			   base64_encoded_len ( issuer->len ) + 1 /* NUL */ );
154
+	uri_string_len = ( strlen ( crosscert ) + 22 /* "/%08x.der?subject=" */
155
+			   + base64_encoded_len ( issuer->len ) + 1 /* NUL */ );
156 156
 	uri_string = zalloc ( uri_string_len );
157 157
 	if ( ! uri_string ) {
158 158
 		rc = -ENOMEM;
@@ -163,7 +163,7 @@ static int validator_start_download ( struct validator *validator,
163 163
 	crc = crc32_le ( 0xffffffffUL, issuer->data, issuer->len );
164 164
 
165 165
 	/* Generate URI string */
166
-	len = snprintf ( uri_string, uri_string_len, "%s/%08x.der?",
166
+	len = snprintf ( uri_string, uri_string_len, "%s/%08x.der?subject=",
167 167
 			 crosscert, crc );
168 168
 	base64_encode ( issuer->data, issuer->len, ( uri_string + len ) );
169 169
 	DBGC ( validator, "VALIDATOR %p downloading cross-signed certificate "

Loading…
Отказ
Запис