1#![no_std]
28#![warn(
29 clippy::alloc_instead_of_core,
30 clippy::use_self,
31 clippy::std_instead_of_core
32)]
33#![deny(missing_docs, clippy::as_conversions)]
34#![cfg_attr(webpki_docsrs, feature(doc_cfg))]
36
37#[cfg(any(feature = "std", test))]
38extern crate std;
39
40#[cfg(any(test, feature = "alloc"))]
41#[cfg_attr(test, macro_use)]
42extern crate alloc;
43
44#[macro_use]
45mod der;
46
47#[cfg(test)]
48mod aws_lc_rs_algs;
49mod cert;
50mod end_entity;
51mod error;
52#[cfg(test)]
53mod ring_algs;
54mod rpk_entity;
55pub mod sct;
57mod signed_data;
58mod subject_name;
59mod time;
60mod trust_anchor;
61
62mod crl;
63mod verify_cert;
64mod x509;
65
66#[cfg(test)]
67pub(crate) mod test_utils;
68
69pub use {
70 cert::Cert,
71 crl::{
72 BorrowedCertRevocationList, BorrowedRevokedCert, CertRevocationList, CrlsRequired,
73 ExpirationPolicy, RevocationCheckDepth, RevocationOptions, RevocationOptionsBuilder,
74 RevocationReason, UnknownStatusPolicy,
75 },
76 der::DerIterator,
77 end_entity::EndEntityCert,
78 error::{
79 DerTypeId, Error, InvalidNameContext, UnsupportedSignatureAlgorithmContext,
80 UnsupportedSignatureAlgorithmForPublicKeyContext,
81 },
82 rpk_entity::RawPublicKeyEntity,
83 trust_anchor::anchor_from_trusted_cert,
84 verify_cert::{
85 ExtendedKeyUsage, ExtendedKeyUsageValidator, IntermediateIterator, KeyPurposeId,
86 KeyPurposeIdIter, RequiredEkuNotFoundContext, VerifiedPath,
87 },
88};
89
90#[cfg(feature = "alloc")]
91pub use trust_anchor::spki_for_anchor;
92
93#[cfg(feature = "alloc")]
94pub use crl::{OwnedCertRevocationList, OwnedRevokedCert};
95
96fn public_values_eq(a: untrusted::Input<'_>, b: untrusted::Input<'_>) -> bool {
97 a.as_slice_less_safe() == b.as_slice_less_safe()
98}