Hi tmarschen,
So we have a "struct tm" in asn.c that is implemented if defined USE_WOLF_TM.
You've added this check:
#ifndef USE_WOLF_TM
#include <time.h>
#endif
which accomplishes this: "If wolfssl is not going to implement a tm structure then we're going to include the posix time.h header which DOES implement the tm structure" Then we will define wolfssl_tm to be that tm instead of the one in wolfssl/wolfcrypt/src/asn.c (since it wasn't implemented in this case)"
There is nothing wrong with doing that as long as the tm struct in <time.h> has all the same elements and will not result in our library accessing some element of that structure that doesn't exist.
We try to remain as portable as we can across all platforms. I believe you have identified a case where we were not 100% portable. We would not consider this a bug because there is no "undefined" or "unexpected" behavior taking place during the execution of the program. This is a compile time issue that resulted from building on a non-standard environment. Porting and building on different environments often requires minor additions/modifications to get everything working smoothly. When we identify these portability issues we try to account for them for all future users so thank you for pointing it out to us.
Could you tell us the operating system and version you are working on, which compiler you're building with and how your include directories are setup (IE why the ../include_posix/time.h). If we can replicate the issue we can look into getting a fix for portability sake.
Thank you again for your question and we look forward to hearing back from you.
Kind Regards,
Kaleb and the wolfSSL Team