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