pike.git / lib / modules / Standards.pmod / testsuite.in

version» Context lines:

pike.git/lib/modules/Standards.pmod/testsuite.in:229:   Gx/KXQ/BUpQqEZnae88MNhPVNdwQGVnqlMEAv3WP2fr9dgTbYruQagPZRjXZ+Hxb   -----END CERTIFICATE-----";    object o = Standards.PEM.Message(pem);    object t = Standards.X509.decode_certificate(o->body);    return ([ "der" : stringp(t->der), "version" : t->version, "serial":t->serial->digits(16), "algorithm":sprintf("%O",t->algorithm[0]), "issuer":t->issuer[2][0][1]->value, "not_after":t->not_after, "not_before":t->not_before, "subject":t->subject[2][0][1]->value, "extensions":t->extensions])   ]],[[   ([ /* 9 elements */    "algorithm": "Standards.ASN1.Types.Identifier(1.2.840.113549.1.1.5)",    "der": 1,    "issuer": "Class 1 Public Primary Certification Authority", -  "extensions": 0, +  "extensions": ([]),    "not_after": 1848866399,    "not_before": 822870000,    "serial": "3f691e819cf09a4af373ffb948a2e4dd",    "subject": "Class 1 Public Primary Certification Authority",    "version": 1   ])   ]])   test_any_equal([[    object rsa = Crypto.RSA();    rsa->set_public_key(Gmp.mpz(10091719133288484609038014264477683817475840711323254929480453433408142690559279434827127011542800608968367637399409601909209406663819557863705925738798431), 65537);
pike.git/lib/modules/Standards.pmod/testsuite.in:256:    string c = Standards.X509.make_selfsigned_certificate(rsa, 3600*24*365, attrs, 0, 0, 5);       object t = Standards.X509.decode_certificate(c);    return ([ "version" : t->version, "serial":t->serial->digits(16), "algorithm":sprintf("%O",t->algorithm[0]), "issuer":t->issuer[0][0][1]->value, "subject":t->subject[0][0][1]->value, "extensions":t->extensions, "public_key":(int)t->public_key->rsa->public_key_equal(rsa) ])   ]],[[ ([    "version" : 1,    "serial" : "5",    "algorithm": "Standards.ASN1.Types.Identifier(1.2.840.113549.1.1.11)",    "issuer" : "Test",    "subject" : "Test", -  "extensions" : 0, +  "extensions" : ([]),    "public_key": 1,   ]) ]])      test_any([[    Crypto.DSA dsa = Crypto.DSA(); -  dsa->generate_parameters(1024); -  dsa->generate_key(); +  dsa->generate_key(1024,160);       foreach( ({ 0, Crypto.SHA1,   #if constant(Crypto.SHA224)    Crypto.SHA224,   #endif    Crypto.SHA256 }), object h)    {    string s=Standards.X509.make_selfsigned_certificate(dsa, 3600, ([ "commonName":"*" ]), 0, h);    if( !Standards.X509.verify_certificate(s, ([])) )    return h;