equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
677 Date nowMinusSkew = dateAndTime; |
677 Date nowMinusSkew = dateAndTime; |
678 if (skew > 0) { |
678 if (skew > 0) { |
679 nowPlusSkew = new Date(dateAndTime.getTime() + skew); |
679 nowPlusSkew = new Date(dateAndTime.getTime() + skew); |
680 nowMinusSkew = new Date(dateAndTime.getTime() - skew); |
680 nowMinusSkew = new Date(dateAndTime.getTime() - skew); |
681 } |
681 } |
|
682 |
|
683 // Check that the test date is within the validity interval: |
|
684 // [ thisUpdate - MAX_CLOCK_SKEW, |
|
685 // nextUpdate + MAX_CLOCK_SKEW ] |
682 if (nowMinusSkew.after(nextUpdate) |
686 if (nowMinusSkew.after(nextUpdate) |
683 || nowPlusSkew.before(crlThisUpdate)) { |
687 || nowPlusSkew.before(crlThisUpdate)) { |
684 if (debug != null) { |
688 if (debug != null) { |
685 debug.println("X509CRLSelector.match: update out of range"); |
689 debug.println("X509CRLSelector.match: update out-of-range"); |
686 } |
690 } |
687 return false; |
691 return false; |
688 } |
692 } |
689 } |
693 } |
690 |
694 |