Topic: WolfSSL on RIoT OS

have been trying to use for handling X509 certificates in RIOT.My plan is to read a certificate and parse the fields.I could see API documentation https://www.wolfssl.com/doxygen/group__CertsKeys.html . For eg I need to use wolfSSL_X509_d2i() to convert certificates ro Wolfssl structure. I have included the header file  wolfssl/wolfssl/ssl.h  .but while compiling undefined refernce error is shown. Is there any other module to be added using USEMODULE ? Could anybody help ?

Share

Re: WolfSSL on RIoT OS

Hi adarshr.r6

Thank you so much for reaching out to wolfSSL support, can you tell us a bit about what you are working on and the high-level overview of the project to help us better classify this inquiry? Thank you in advance!

Your application must include the wolfSSL configuration headers before any others.

https://github.com/wolfSSL/wolfssl-exam … -tls.c#L34

/* wolfSSL */
#include <wolfssl/options.h>
#include <wolfssl/ssl.h>

Let us know if there are questions.

Re: WolfSSL on RIoT OS

I am trying to read an X509 certificate from file and parse the file to get version,issuer,subject,public key etc,using RIOT OS.https://github.com/RIOT-OS/RIOT . RIOT has  support for WolfSSLhttps://doc.riot-os.org/group__pkg__wolfssl.html . I have found this example https://github.com/cconlon/wolfssl-exam … lds/main.c  where a pem certificate is read and internal WOLFSSL_X509 struct is created. but when I add #include <wolfssl/options.h>,I get error  fatal error: wolfssl/options.h: No such file or directory . is there any other configuration to access options.h ? It is mentioned in RIOT documentation to add #include <wolfssl/wolfcrypt/settings.h> before any other headers.  When I remove options.h I get error, undefined reference to `wolfSSL_X509_d2i' . I have also found another fact ,suppose I change wolfSSL_X509_d2i() to DolfSSL_X509_d2i...then while compiler I get "implicit declaration of function ‘DolfSSL_X509_d2i’; did you mean ‘wolfSSL_X509_d2i’?" . So I think the system knows that the functions are there,but its  not able to access  ? 


There is also another example "wolfSSL/wolfssl-examples/blob/master/ecc/ecc-key-decode.c" ,In which certificate file is read and converted to DecodedCert structure format.I am able to get the fields in the certificate from DecodedCert, but here also  <wolfssl/options.h>, is not added but the code works fine.In the decodedCert I get different public key size though,26 bytes greater than the original one.

Share