Skip to content

Commit

Permalink
Fix doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-mobilecoin committed Oct 19, 2023
1 parent ece88fd commit ae67432
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions attest/verifier/src/dcap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ impl VerificationMessage<DcapVerifierOutput> for DcapVerifier {
/// As documented in
/// <https://download.01.org/intel-sgx/sgx-dcap/1.17/linux/docs/Intel_SGX_ECDSA_QuoteLibReference_DCAP_API.pdf#%5B%7B%22num%22%3A64%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C69%2C283%2C0%5D>
///
/// Production enclaves should not have the REPORT.Attribute.Debug flag set
/// to 1. When the Debug flag is set, a debugger can read the enclave’s
/// memory and should not be provisioned with production secrets.
/// > Production enclaves should not have the REPORT.Attribute.Debug flag set
/// > to 1. When the Debug flag is set, a debugger can read the enclave’s
/// > memory and should not be provisioned with production secrets.
fn debug_attribute_verifier(debug_allowed: bool) -> AttributesVerifier {
// The default bits are all 0 meaning a non debug build.
let attributes = Attributes::default();
Expand Down
6 changes: 3 additions & 3 deletions crypto/keys/src/x25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ impl DistinguishedEncoding for X25519Public {
/// ";
///
/// let parsed = parse(PUBKEY).expect("Could not parse public key PEM");
/// let pubkey = X25519Public::try_from_der(&parsed.contents).expect("Could not parse DER into X25519Public");
/// let pubkey = X25519Public::try_from_der(&parsed.contents()).expect("Could not parse DER into X25519Public");
/// let der = pubkey.to_der();
/// let pubkey2 = X25519Public::try_from_der(der.as_slice()).expect("Could not parse generated DER into X25519Public");
/// assert_eq!(pubkey, pubkey2);
/// assert_eq!(&parsed.contents, &der);
/// assert_eq!(&parsed.contents(), &der);
/// ```
fn try_from_der(src: &[u8]) -> Result<Self, KeyError> {
if src.len() != X25519_SPKI_DER_LEN {
Expand Down Expand Up @@ -245,7 +245,7 @@ impl Debug for X25519Public {
/// ";
///
/// let parsed = parse(PUBKEY).expect("Could not parse public key PEM");
/// let pubkey = X25519Public::try_from_der(&parsed.contents).expect("Could not parse DER into X25519Public");
/// let pubkey = X25519Public::try_from_der(&parsed.contents()).expect("Could not parse DER into X25519Public");
/// assert_eq!(format!("{:?}", pubkey), PUBKEY);
/// ```
fn fmt(&self, f: &mut Formatter) -> FmtResult {
Expand Down

0 comments on commit ae67432

Please sign in to comment.