@@ -198,6 +198,100 @@ public TrustRootsResultBuilder trustRoots(@NonNull Set<X509Certificate> trustRoo
198
198
return new TrustRootsResultBuilder ().trustRoots (trustRoots );
199
199
}
200
200
}
201
+
202
+ /**
203
+ * A set of attestation root certificates trusted to certify the relevant attestation
204
+ * statement. If the attestation statement is not trusted, or if no trust roots were found,
205
+ * this should be an empty set.
206
+ */
207
+ // TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
208
+ public AttestationTrustSource .TrustRootsResult .TrustRootsResultBuilder trustRoots (
209
+ @ NonNull final Set <X509Certificate > trustRoots ) {
210
+ if (trustRoots == null ) {
211
+ throw new java .lang .NullPointerException ("trustRoots is marked non-null but is null" );
212
+ }
213
+ this .trustRoots = trustRoots ;
214
+ return this ;
215
+ }
216
+
217
+ /**
218
+ * A {@link CertStore} of additional CRLs and/or intermediate certificates to use during
219
+ * certificate path validation, if any. This will not be used if {@link
220
+ * TrustRootsResultBuilder#trustRoots(Set) trustRoots} is empty.
221
+ *
222
+ * <p>Any certificates included in this {@link CertStore} are NOT considered trusted; they
223
+ * will be trusted only if they chain to any of the {@link
224
+ * TrustRootsResultBuilder#trustRoots(Set) trustRoots}.
225
+ *
226
+ * <p>The default is <code>null</code>.
227
+ */
228
+ // TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
229
+ public AttestationTrustSource .TrustRootsResult .TrustRootsResultBuilder certStore (
230
+ final CertStore certStore ) {
231
+ this .certStore$value = certStore ;
232
+ certStore$set = true ;
233
+ return this ;
234
+ }
235
+
236
+ /**
237
+ * Whether certificate revocation should be checked during certificate path validation.
238
+ *
239
+ * <p>The default is <code>true</code>.
240
+ */
241
+ // TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
242
+ public AttestationTrustSource .TrustRootsResult .TrustRootsResultBuilder
243
+ enableRevocationChecking (final boolean enableRevocationChecking ) {
244
+ this .enableRevocationChecking$value = enableRevocationChecking ;
245
+ enableRevocationChecking$set = true ;
246
+ return this ;
247
+ }
248
+
249
+ /**
250
+ * If non-null, the PolicyQualifiersRejected flag will be set to false during certificate path
251
+ * validation. See {@link
252
+ * java.security.cert.PKIXParameters#setPolicyQualifiersRejected(boolean)}.
253
+ *
254
+ * <p>The given {@link Predicate} will be used to validate the policy tree. The {@link
255
+ * Predicate} should return <code>true</code> if the policy tree is acceptable, and <code>
256
+ * false
257
+ * </code> otherwise.
258
+ *
259
+ * <p>Depending on your <code>"PKIX"</code> JCA provider configuration, this may be required
260
+ * if any certificate in the certificate path contains a certificate policies extension marked
261
+ * critical. If this is not set, then such a certificate will be rejected by the certificate
262
+ * path validator from the default provider.
263
+ *
264
+ * <p>Consult the <a
265
+ * href="https://docs.oracle.com/en/java/javase/17/security/java-pki-programmers-guide.html#GUID-3AD41382-E729-469B-83EE-CB2FE66D71D8">Java
266
+ * PKI Programmer's Guide</a> for how to use the {@link PolicyNode} argument of the {@link
267
+ * Predicate}.
268
+ *
269
+ * <p>The default is <code>null</code>.
270
+ */
271
+ // TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
272
+ public AttestationTrustSource .TrustRootsResult .TrustRootsResultBuilder policyTreeValidator (
273
+ final Predicate <PolicyNode > policyTreeValidator ) {
274
+ this .policyTreeValidator$value = policyTreeValidator ;
275
+ policyTreeValidator$set = true ;
276
+ return this ;
277
+ }
278
+ }
279
+
280
+ /**
281
+ * A set of attestation root certificates trusted to certify the relevant attestation statement.
282
+ * If the attestation statement is not trusted, or if no trust roots were found, this should be
283
+ * an empty set.
284
+ */
285
+ // TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
286
+ @ NonNull
287
+ public Set <X509Certificate > getTrustRoots () {
288
+ return this .trustRoots ;
289
+ }
290
+
291
+ /** Whether certificate revocation should be checked during certificate path validation. */
292
+ // TODO: Let this auto-generate (investigate why Lombok fails to copy javadoc)
293
+ public boolean isEnableRevocationChecking () {
294
+ return this .enableRevocationChecking ;
201
295
}
202
296
}
203
297
}
0 commit comments