Skip to content

Commit f0c60c0

Browse files
committed
ci(https support ): add test for https support DI
- still WIP Signed-off-by: Sarita Mahajan <[email protected]>
1 parent a281209 commit f0c60c0

File tree

12 files changed

+326
-20
lines changed

12 files changed

+326
-20
lines changed

Cargo.lock

Lines changed: 76 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-linuxapp/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,8 @@ async fn perform_to2(
855855
) -> Result<bool> {
856856
log::info!("Performing TO2 protocol, URL: {:?}", url);
857857

858-
let mut client = fdo_http_wrapper::client::ServiceClient::new(ProtocolVersion::Version1_1, url)?;
858+
let mut client =
859+
fdo_http_wrapper::client::ServiceClient::new(ProtocolVersion::Version1_1, url)?;
859860

860861
let nonce5 = match get_nonce(MessageType::TO1RVRedirect).await {
861862
Ok(nonce5) => nonce5,

http-wrapper/src/client.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ impl ServiceClient {
159159
client_builder = client_builder.danger_accept_invalid_certs(true);
160160
}
161161

162-
Ok(ServiceClient {
162+
Ok(ServiceClient {
163163
protocol_version,
164164
base_url: base_url.trim_end_matches('/').to_string(),
165165
client: client_builder
166-
.tls_info(true)
167-
// .danger_accept_invalid_certs(true)
168-
.build()?,
166+
.tls_info(true)
167+
// .danger_accept_invalid_certs(true)
168+
.build()?,
169169
authorization_token: None,
170170
encryption_keys: EncryptionKeys::unencrypted(),
171171
last_message_type: None,
@@ -223,15 +223,15 @@ impl ServiceClient {
223223
let to_send = to_send.serialize_data()?;
224224
let to_send = self.encryption_keys.encrypt(&to_send)?;
225225
log::trace!("Sending message: {:?}", hex::encode(&to_send));
226-
227-
let url = format!(
228-
"{}/fdo/{}/msg/{}",
226+
227+
let url = format!(
228+
"{}/fdo/{}/msg/{}",
229229
&self.base_url,
230230
self.protocol_version,
231231
OM::message_type() as u8
232-
);
232+
);
233233

234-
log::debug!("url: {}",url);
234+
log::debug!("url: {}", url);
235235
let mut req = self
236236
.client
237237
.post(&url)

integration-tests/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ serde_cbor = "0.11"
3232
serde_json = "1.0"
3333
pretty_assertions = "1.0.0"
3434
paste = "1.0"
35-
pem = "2.0"
35+
pem = "3.0.3"
36+
chrono = "0.4.33"
3637

3738
fdo-data-formats = { path = "../data-formats" }
3839
fdo-util = { path = "../util" }

integration-tests/templates/manufacturing-server.yml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ ownership_voucher_store_driver:
88
public_key_store_driver:
99
Directory:
1010
path: {{ config_dir }}/keys/
11-
bind: {{ bind }}
11+
bind_http: {{ bind }}
12+
bind_https: {{ bind_https }}
1213
rendezvous_info:
1314
- dns: localhost
1415
device_port: 8082
@@ -33,3 +34,5 @@ manufacturing:
3334
owner_cert_path: {{ keys_path }}/owner_cert.pem
3435
device_cert_ca_private_key: {{ keys_path }}/device_ca_key.der
3536
device_cert_ca_chain: {{ keys_path }}/device_ca_cert.pem
37+
manufacturing_server_https_cert: {{ keys_path }}/manufacturing_server_https_cert.crt
38+
manufacturing_server_https_key: {{ keys_path }}/manufacturing_server_https_key.key

0 commit comments

Comments
 (0)