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

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:910:    return this;       return NULL("init: Too many fields. %O\n", sizeof(a));    }       //    // --- Extension code    //       //! Set if the certificate contains a valid basicConstraints -  //! extension. @rfc{3280@} 4.2.1.10. +  //! extension. @rfc{3280:4.2.1.10@}.    int(0..1) ext_basicConstraints;       //! If set, the certificate may be used as a CA certificate, i.e.    //! sign other certificates.    int(0..1) ext_basicConstraints_cA;       //! The maximum number of certificates that may follow this    //! certificate in a certificate chain. @expr{0@} in case no limit    //! is imposed. Note that this variable is off by one compared to    //! the @rfc{3280@} definition, which only counts intermediate
pike.git/lib/modules/Standards.pmod/X509.pmod:961:    }    else    ext_basicConstraints_pathLenConstraint = 0;       ext_basicConstraints = 1;    ext_basicConstraints_cA = s[0]->value;    return 1;    }       //! Set if the certificate contains a valid authorityKeyIdentifier -  //! extension. @rfc{3280@} 4.2.1.1. +  //! extension. @rfc{3280:4.2.1.1@}.    int(0..1) ext_authorityKeyIdentifier;       //! Set to the KeyIdentifier, if set in the extension.    string ext_authorityKeyIdentifier_keyIdentifier;       //! Set to the CertificateSerialNumber, if set in the extension.    Gmp.mpz ext_authorityKeyIdentifier_authorityCertSerialNumber;       protected int(0..1) parse_authorityKeyIdentifier(Object o)    {
pike.git/lib/modules/Standards.pmod/X509.pmod:1001:    break;    }}       // FIXME: We don't parse authorityCertIssuer yet.       ext_authorityKeyIdentifier = 1;    return 1;    }       //! Set to the value of the SubjectKeyIdentifier if the certificate -  //! contains the subjectKeyIdentifier extension. @rfc{3280@} -  //! 4.2.1.2. +  //! contains the subjectKeyIdentifier +  //! extension. @rfc{3280:4.2.1.2@}.    string ext_subjectKeyIdentifier;       protected int(0..1) parse_subjectKeyIdentifier(Object o)    {    if( o->type_name!="OCTET STRING" )    return 0;    ext_subjectKeyIdentifier = o->value;    return 1;    }       //! Set to the value of the KeyUsage if the certificate contains the -  //! keyUsage extension. @rfc{3280@} 4.2.1.3. +  //! keyUsage extension. @rfc{3280:4.2.1.3@}.    keyUsage ext_keyUsage;       protected int(0..1) parse_keyUsage(Object o)    {    if( o->type_name!="BIT STRING" )    return 0;       int pos;    foreach(o->value;; int char)    for(int i; i<8; i++)
pike.git/lib/modules/Standards.pmod/X509.pmod:1038:    pos++;    char <<= 1;    }       return 1;    }       //! Set to the list of extended key usages from anyExtendedKeyUsage,    //! if the certificate contains the extKeyUsage extensions. These    //! Identifier objects are typically found in -  //! @[.PKCS.Identifiers.reverse_kp_ids]. @rfc{3280@} 4.2.1.13. +  //! @[.PKCS.Identifiers.reverse_kp_ids]. @rfc{3280:4.2.1.13@}.    array(Identifier) ext_extKeyUsage;       protected int(0..1) parse_extKeyUsage(Object o)    {    if( o->type_name!="SEQUENCE" )    return 0;    Sequence s = [object(Sequence)]o;       ext_extKeyUsage = s->elements;    return 1;