Branch: Tag:

2016-04-22

2016-04-22 13:18:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Standards.X509: Added X509_VALIDATION_DEBUG.

The above macro is intended to be used to debug why certificates
fail to validate, without drowning in other debug.

Also adds some more stuff to TBSCertificate()->_sprintf().

11: Inside #if defined(X509_DEBUG)
     #ifdef X509_DEBUG   #define DBG(X ...) werror(X) - #define NULL(X ...) werror(X) && 0 + #define X509_VALIDATION_DEBUG   #else   #define DBG(X ...) -  + #endif +  + #ifdef X509_VALIDATION_DEBUG + #define NULL(X ...) werror(X) && 0 + #else   #define NULL(X ...) 0   #endif   
778:    if( t!='O' ) return UNDEFINED;    mapping m = cast("mapping");    catch { +  m->serial = serial;    m->issuer = fmt_asn1(m->issuer);    m->subject = fmt_asn1(m->subject); -  +  foreach(extensions; Identifier i; Object o) { +  m[.PKCS.Identifiers.reverse_ce_ids[i]||i] = fmt_asn1(o); +  }    };    return sprintf("%O(%O)", this_program, m);    }