use a local str_nlen fct instead of hinting to POSIX
This commit is contained in:
1 parent
a3415da519
commit
2ccf84f40a
4 files changed
+18
-6
No files matched your search
@@ -15,7 +15,7 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// asn.1 dumping
|
||||
//-----------------------------------------------------------------------------
|
||||
#define _POSIX_C_SOURCE 200809L // need for strnlen()
|
||||
|
||||
#include "asn1dump.h"
|
||||
|
||||
#include "commonutil.h" // ARRAYLEN
|
||||
@@ -344,17 +344,17 @@ static void asn1_tag_dump_object_id(const struct tlv *tlv, const struct asn1_tag
|
||||
} else {
|
||||
const char *ppstr = NULL;
|
||||
mbedtls_oid_get_attr_short_name(&asn1_buf, &ppstr);
|
||||
if (ppstr && strnlen(ppstr, 1)) {
|
||||
if (ppstr && str_nlen(ppstr, 1)) {
|
||||
PrintAndLogEx(NORMAL, " (%s)", ppstr);
|
||||
return;
|
||||
}
|
||||
mbedtls_oid_get_sig_alg_desc(&asn1_buf, &ppstr);
|
||||
if (ppstr && strnlen(ppstr, 1)) {
|
||||
if (ppstr && str_nlen(ppstr, 1)) {
|
||||
PrintAndLogEx(NORMAL, " (%s)", ppstr);
|
||||
return;
|
||||
}
|
||||
mbedtls_oid_get_extended_key_usage(&asn1_buf, &ppstr);
|
||||
if (ppstr && strnlen(ppstr, 1)) {
|
||||
if (ppstr && str_nlen(ppstr, 1)) {
|
||||
PrintAndLogEx(NORMAL, " (%s)", ppstr);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user