Skip to content

Commit

Permalink
PKCS7_dataInit and PKCS7_dataFinal compile with some caveats
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Oct 22, 2024
1 parent 04b369f commit 69cb0fd
Show file tree
Hide file tree
Showing 11 changed files with 1,920 additions and 462 deletions.
2 changes: 2 additions & 0 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ add_library(
pem/pem_xaux.c
pkcs7/pkcs7.c
pkcs7/pkcs7_asn1.c
pkcs7/pkcs7_internal_bio_md.c
pkcs7/pkcs7_internal_bio_cipher.c
pkcs7/pkcs7_x509.c
pkcs8/pkcs8.c
pkcs8/pkcs8_x509.c
Expand Down
22 changes: 22 additions & 0 deletions crypto/err/pkcs7.errordata
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
PKCS7,100,BAD_PKCS7_VERSION
PKCS7,113,CERTIFICATE_VERIFY_ERROR
PKCS7,123,CIPHER_HAS_NO_OBJECT_IDENTIFIER
PKCS7,106,CIPHER_NOT_INITIALIZED
PKCS7,111,CONTENT_AND_DATA_PRESENT
PKCS7,121,DECRYPT_ERROR
PKCS7,119,ERROR_ADDING_RECIPIENT
PKCS7,118,ERROR_SETTING_CIPHER
PKCS7,104,INVALID_NULL_POINTER
PKCS7,101,NOT_PKCS7_SIGNED_DATA
PKCS7,102,NO_CERTIFICATES_INCLUDED
PKCS7,105,NO_CONTENT
PKCS7,103,NO_CRLS_INCLUDED
PKCS7,112,NO_SIGNATURES_ON_DATA
PKCS7,116,NO_SIGNERS
PKCS7,122,PKCS7_DATASIGN
PKCS7,120,PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE
PKCS7,115,SIGNATURE_FAILURE
PKCS7,117,SIGNER_CERTIFICATE_NOT_FOUND
PKCS7,124,SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE
PKCS7,114,SMIME_TEXT_ERROR
PKCS7,109,UNABLE_TO_FIND_MEM_BIO
PKCS7,108,UNABLE_TO_FIND_MESSAGE_DIGEST
PKCS7,125,UNKNOWN_DIGEST_TYPE
PKCS7,107,UNSUPPORTED_CONTENT_TYPE
PKCS7,110,WRONG_CONTENT_TYPE
17 changes: 17 additions & 0 deletions crypto/pkcs7/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,23 @@ int pkcs7_add_signed_data(CBB *out,
const void *arg);


// STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags);
int PKCS7_is_detached(PKCS7 *p7);
ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7);
int PKCS7_type_is_other(const PKCS7 *p7);

const BIO_METHOD *BIO_f_md(void);
const BIO_METHOD *BIO_f_cipher(void);

#define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(mdcp))

#define BIO_get_cipher_ctx(bio, contents) BIO_ctrl(bio, BIO_C_GET_CIPHER_CTX, 0, \
(char *)(contents))

#define BIO_get_cipher_status(bio, contents) BIO_ctrl(bio, BIO_C_GET_CIPHER_STATUS, 0, \
(char *)(contents))


#if defined(__cplusplus)
} // extern C
#endif
Expand Down
Loading

0 comments on commit 69cb0fd

Please sign in to comment.