I'm trying to use an ESP-32 to parse some PKCS#7 signatures. This is supported, to some degree, through mbedTLS. There is additionally an option in the SDK configuration editor to enable the usage of these signatures. Ultimately, I'd like to be able to receive signed data and a x509 certificate bundled up in the PKCS#7 format, and then cryptographically verify the received data using a public key embedded in the received x509 certificate.
I have attempted to create several dummy PKCS#7 structures via OpenSSL. I then flash these to an NVS partition I made. From there, I can use NVS functions (e.g., nvs_get_blob) to extract this data for processing. I have been able to do this with x509 certificates (again, I created these certificates with OpenSSL). I could then use mbedTLS x509 functions like mbedtls_x509_crt_parse to interact with them.
My problem is that when I attempt to do this with my PKCS#7 data and associated functions, specifically mbedtls_pkcs7_parse_der, I run into a myriad of errors. Most commonly, MBEDTLS_ERR_PKCS7_FEATURE_UNAVAILABLE and MBEDTLS_ERR_PKCS7_INVALID_SIGNER_INFO. I have tried with a multitude of "homemade" PKCS#7 signatures, each failing in one way or another.
What I am looking for here is general guidance on how to use the available PKCS#7 functionality as I am clearly misunderstanding something. In attempting to look for some example code I have come up short. As far as I can tell there has not been much user code submitted using this stuff.
Is there some sample PKCS#7 data which I can use; this would inform me on how I should go about creating more signatures moving forward.
Has anyone had any success using these functions?
I understand I have not supplied any sample code or sample data. I suppose I can, however, I don't feel as if I'm looking for a specific "fix" or the like. Instead, I'm kind of looking for the "Explain It Like I'm 5" version. Also, if you HAVE done what I'm trying to do, or something similar, please give ME sample code/data please.
mbedTLS PKCS#7 signature usage
-
- Posts: 2
- Joined: Tue Sep 05, 2023 4:24 am
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: axellin, iParcelBox and 109 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.