Issues with enabling PKCS7 parsing

Hi all,

I'm currently facing the issue that we are receiving a PKCS7 encoded response from our EST server via a `/simpleenroll` request.

The PKCS7 response now has to be parsed so that we can extract the actual certificate.

To do so, I want to use the functions `mbedtls_pkcs7_init()` and `mbedtls_pkcs7_parse_der()` which are part of the `pkcs7.c`.

I'm now facing two issues:

1) How do I get the `pkcs7.c` file to compile?
As far as I've checked it is not part of any of the libs inside the `CMakeLists.txt` file.

2) How do I enable the symbol `MBEDTLS_PKCS7_C` which is enabling the content of the `pkcs7.c` file?

Heads-up:

I got it successfully running by patching your build/config chain locally, but this is really ugly and definitely not our preferred solution.
But it worked completely fine, that's why I'm curious why this feature seems not to be supported or at least is not being part of the `CONFIG_MBEDTLS_X509_LIBRARY`?

Additional info:

Current NCS version: 3.1.1

It would be nice if you could help me out on what's the best way to resolve this issue.

Thanks in advance and have a nice day!

Best regards
Jaro

Related