Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT Pkcs7 nondetached #7054

Draft
wants to merge 8 commits into
base: development
Choose a base branch
from

Commits on Dec 6, 2022

  1. pkcs7: check that content lengths fill whole buffer

    Otherwise invalid data could be accepted.
    
    Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
    DemiMarie committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    03262c4 View commit details
    Browse the repository at this point in the history
  2. pkcs7: Remove duplicate code

    No change in behavior
    
    Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
    DemiMarie committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    b9e8707 View commit details
    Browse the repository at this point in the history
  3. Clean up PKCS7 parsing

    This adds more code, but the newer code is easier to understand.
    
    Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
    DemiMarie committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    27758fa View commit details
    Browse the repository at this point in the history
  4. Check for junk after SignedData

    There must not be any.
    
    Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
    DemiMarie committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    5c63f00 View commit details
    Browse the repository at this point in the history
  5. Simple cleanup

    No change in behavior.
    
    Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
    DemiMarie committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    e0b6fb9 View commit details
    Browse the repository at this point in the history
  6. Avoid returning MBEDTLS_ERR_BAD_INPUT_DATA for unsupported content

    MBEDTLS_ERR_BAD_INPUT_DATA indicates a bug in the caller, such as
    passing NULL to an interface that doesn't accept it.  It should not be
    used for an unsupported type of content.
    
    Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
    DemiMarie committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    6c33088 View commit details
    Browse the repository at this point in the history
  7. pkcs7: make signed data available to callers

    This makes the SignedData available to callers.  Previously, it was
    ignored.
    
    Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
    DemiMarie committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    e4fdddc View commit details
    Browse the repository at this point in the history
  8. pkcs7: support signatures with internal data

    A CMS signature can have internal data.  Provide a function for
    verifying this data, and check that it is absent when verifying
    detached signatures.
    
    Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
    DemiMarie committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    3038516 View commit details
    Browse the repository at this point in the history