pike.git / lib / modules / Standards.pmod / X509.pmod

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:5:   //! Functions to generate and validate RFC2459 style X.509 v3   //! certificates.      constant dont_dump_module = 1;      import Standards.ASN1.Types;   import Standards.PKCS;      #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      enum CertFailure   {    //!    CERT_TOO_OLD = 1<<0,       //!    CERT_TOO_NEW = 1<<1,
pike.git/lib/modules/Standards.pmod/X509.pmod:788:    {    foreach(extensions; Identifier i; Object o)    write("%O : %O\n", .PKCS.Identifiers.reverse_ce_ids[i]||i, o);    }       protected string _sprintf(int t)    {    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);    }       //! Populates the object from a certificate decoded into an ASN.1    //! Object. Returns the object on success, otherwise @expr{0@}. You    //! probably want to call @[decode_certificate] or even    //! @[verify_certificate].    this_program init(array|Object asn1)    {