1
1
/*
2
- * Copyright (c) 1997, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 1997, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -97,15 +97,26 @@ public Attributes getAttributes() throws IOException {
97
97
* from the entry input stream until the end of the stream has been
98
98
* reached. Otherwise, this method will return {@code null}.
99
99
*
100
+ * <p>It is recommended to use the {@link getCodeSigners} method instead,
101
+ * which returns an array of {@code CodeSigner}s.
102
+ *
100
103
* <p>The returned certificate array comprises all the signer certificates
101
104
* that were used to verify this entry. Each signer certificate is
102
105
* followed by its supporting certificate chain (which may be empty).
103
106
* Each signer certificate and its supporting certificate chain are ordered
104
107
* bottom-to-top (i.e., with the signer certificate first and the (root)
105
108
* certificate authority last).
106
109
*
110
+ * @apiNote
111
+ * The verification process does not include validating or establishing
112
+ * trust in the code signers. A caller should perform additional checks,
113
+ * such as using a {@link java.security.cert.CertPathValidator} to
114
+ * validate each signer's certificate chain, and determining whether
115
+ * to trust the entry signed by the signers.
116
+ *
107
117
* @return the {@code Certificate} objects for this entry, or
108
118
* {@code null} if none.
119
+ *
109
120
*/
110
121
public Certificate [] getCertificates () {
111
122
return certs == null ? null : certs .clone ();
@@ -121,6 +132,13 @@ public Certificate[] getCertificates() {
121
132
* <p>The returned array comprises all the code signers that have signed
122
133
* this entry.
123
134
*
135
+ * @apiNote
136
+ * The verification process does not include validating or establishing
137
+ * trust in the code signers. A caller should perform additional checks,
138
+ * such as using a {@link java.security.cert.CertPathValidator} to
139
+ * validate each signer's certificate chain, and determining whether
140
+ * to trust the entry signed by the signers.
141
+ *
124
142
* @return the {@code CodeSigner} objects for this entry, or
125
143
* {@code null} if none.
126
144
*
0 commit comments