瀏覽代碼

[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…
取消
儲存