equal
deleted
inserted
replaced
1 # |
1 # |
2 # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2014, 2017, 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. |
7 # published by the Free Software Foundation. |
52 $KT -importcert -alias signer |
52 $KT -importcert -alias signer |
53 |
53 |
54 $JAR cvf a.jar ks |
54 $JAR cvf a.jar ks |
55 |
55 |
56 # We always trust a TrustedCertificateEntry |
56 # We always trust a TrustedCertificateEntry |
57 $JS a.jar ca | grep "chain is not validated" && exit 1 |
57 $JS a.jar ca | grep "chain is invalid" && exit 1 |
58 |
58 |
59 # An end-entity cert must follow algorithm constraints |
59 # An end-entity cert must follow algorithm constraints |
60 $JS a.jar signer | grep "chain is not validated" || exit 2 |
60 $JS a.jar signer | grep "chain is invalid" || exit 2 |
61 |
61 |
62 exit 0 |
62 exit 0 |