mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
pv: tests: Regenerate the fake certificates using http:// URL
Adapt the script to generate the test certificates to use the prefix
'http://' for the CRL distribution points as otherwise the test would
fail with an upcoming change. Regenerate the certificates and adapt the
test case dist_points' accordingly as the distribution point has
changed.
Note: The files der.crt and der.crl are skipped as that would result in
binary changes which caues trouble with quilt. They are only used
by some basic tests read_crls and read_crts anyway
Assisted-by: IBM Bob:1.0.5
Signed-off-by: Marc Hartmayer <marc@linux.ibm.com>
Acked-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
7510b96238
commit
5552b476bd
@@ -718,8 +718,12 @@ mod tests {
|
||||
// Build mock responses for each distribution point
|
||||
let mut responses = HashMap::new();
|
||||
for dist_point in dist_points {
|
||||
// Treat distribution point as filename
|
||||
let path = get_cert_asset_path(&dist_point);
|
||||
// Treat distribution point as filename, remove the "http://" prefix
|
||||
let dist_point_path = dist_point
|
||||
.strip_prefix("http://")
|
||||
.unwrap_or(&dist_point)
|
||||
.to_string();
|
||||
let path = get_cert_asset_path(&dist_point_path);
|
||||
|
||||
if let Ok(crl_data) = std::fs::read(&path) {
|
||||
responses.insert(dist_point, mock_response(crl_data));
|
||||
|
||||
@@ -54,7 +54,7 @@ fn verify_chain_offline() {
|
||||
fn dist_points() {
|
||||
let crt = load_gen_cert("ibm.crt");
|
||||
let res = x509_dist_points(&crt);
|
||||
let exp = vec!["inter_ca.crl"];
|
||||
let exp = vec!["http://inter_ca.crl"];
|
||||
assert_eq!(res, exp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user