8237962: give better error output for invalid OCSP response intervals in CertPathValidator checks

Reviewed-by: clanger, mullan
This commit is contained in:
Matthias Baesken 2020-02-03 09:39:39 +01:00
parent edd28610d5
commit ef41763d32
2 changed files with 6 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -599,8 +599,9 @@ public final class OCSPResponse {
} }
debug.println("OCSP response validity interval is from " + debug.println("OCSP response validity interval is from " +
sr.thisUpdate + until); sr.thisUpdate + until);
debug.println("Checking validity of OCSP response on: " + debug.println("Checking validity of OCSP response on " +
new Date(now)); new Date(now) + " with allowed interval between " +
nowMinusSkew + " and " + nowPlusSkew);
} }
// Check that the test date is within the validity interval: // Check that the test date is within the validity interval:

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -175,7 +175,7 @@ public class ValidatePathWithParams {
certStatus = Status.EXPIRED; certStatus = Status.EXPIRED;
} else { } else {
throw new RuntimeException( throw new RuntimeException(
"TEST FAILED: couldn't determine EE certificate status"); "TEST FAILED: couldn't determine EE certificate status", cpve);
} }
} }