mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-26 00:22:10 +03:00
Fix typo in issuer field when exporting SSL certificate to JSON
This commit is contained in:
parent
4ff24034aa
commit
e484b1746d
@ -1,3 +1,3 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl ssl/cacert.hurl --cacert ssl/ca/cert.pem --ssl-no-revoke --verbose
|
||||
hurl --cacert ssl/ca/cert.pem --ssl-no-revoke ssl/cacert.hurl
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl ssl/cacert.hurl --cacert ssl/ca/cert.pem --verbose
|
||||
hurl --cacert ssl/ca/cert.pem ssl/cacert.hurl
|
||||
|
1
integration/hurl/ssl/cacert_to_json.exit
Normal file
1
integration/hurl/ssl/cacert_to_json.exit
Normal file
@ -0,0 +1 @@
|
||||
0
|
1
integration/hurl/ssl/cacert_to_json.out.pattern
Normal file
1
integration/hurl/ssl/cacert_to_json.out.pattern
Normal file
@ -0,0 +1 @@
|
||||
{"cookies":[],"entries":[{"asserts":[{"line":5,"success":true},{"line":5,"success":true},{"line":6,"success":true}],"calls":[{"request":{"cookies":[],"headers":[{"name":"Host","value":"localhost:8002"},{"name":"Accept","value":"*/*"},{"name":"User-Agent","value":"hurl/~~~"}],"method":"GET","queryString":[],"url":"https://localhost:8002/hello"},"response":{"certificate":{"expire_date":"2025-03-15 10:48:00 UTC","issuer":"C~=~US, ST~=~Denial, L~=~Springfield, O~=~Dis, CN~=~myCA","serial_number":"3e:23:bb:87:21:f8:10:85:36:c2:72:c9:64:34:d6:15:d1:8c:69:15","start_date":"2022-12-11 10:48:00 UTC","subject":"C~=~US, ST~=~Denial, L~=~Springfield, O~=~Dis, CN~=~localhost"},"cookies":[],"headers":[{"name":"Server","value":"Werkzeug/~~~ Python/~~~"},{"name":"Date","value":"~~~"},{"name":"Content-Type","value":"text/html; charset=utf-8"},{"name":"Content-Length","value":"12"},{"name":"Connection","value":"close"}],"httpVersion":"HTTP/1.1","status":200},"timings":{"app_connect":~~~,"begin_call":"~~~","connect":~~~,"end_call":"~~~","name_lookup":~~~,"pre_transfer":~~~,"start_transfer":~~~,"total":~~~}}],"captures":[],"index":1,"line":3,"time":~~~}],"filename":"ssl/cacert.hurl","success":true,"time":~~~}
|
3
integration/hurl/ssl/cacert_to_json.ps1
Normal file
3
integration/hurl/ssl/cacert_to_json.ps1
Normal file
@ -0,0 +1,3 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl --cacert ssl/ca/cert.pem --ssl-no-revoke --json ssl/cacert.hurl
|
3
integration/hurl/ssl/cacert_to_json.sh
Executable file
3
integration/hurl/ssl/cacert_to_json.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl --cacert ssl/ca/cert.pem --json ssl/cacert.hurl
|
@ -179,8 +179,7 @@ struct ResponseCookieJson {
|
||||
#[derive(Serialize)]
|
||||
struct CertificateJson {
|
||||
subject: String,
|
||||
// FIXME: should be issuer
|
||||
issue: String,
|
||||
issuer: String,
|
||||
start_date: String,
|
||||
expire_date: String,
|
||||
serial_number: String,
|
||||
@ -407,7 +406,7 @@ impl CertificateJson {
|
||||
fn from_certificate(c: &Certificate) -> Self {
|
||||
CertificateJson {
|
||||
subject: c.subject.clone(),
|
||||
issue: c.issuer.to_string(),
|
||||
issuer: c.issuer.to_string(),
|
||||
start_date: c.start_date.to_string(),
|
||||
expire_date: c.expire_date.to_string(),
|
||||
serial_number: c.serial_number.to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user