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

version» Context lines:

pike.git/lib/modules/Standards.pmod/testsuite.in:98:   test_equal((string)Standards.URI("c?d=e", "http://a.b"), "http://a.b/c?d=e")   test_equal(Standards.URI("http://www.com/")->get_query_variables(),([]))   test_equal(Standards.URI("http://www.com/?a=b")->get_query_variables(),(["a":"b"]))   test_equal(Standards.URI("http://www.com/?a=b&a=b")->get_query_variables(),(["a":"b"]))   test_equal(Standards.URI("http://www.com/?a=b&c")->get_query_variables(),(["a":"b","c":0]))   test_equal(Standards.URI("http://www.com/?foo")->get_http_path_query(),"/?foo")   test_equal(Standards.URI("http://www.com/?")->get_http_path_query(),"/?")   test_equal(Standards.URI("http://www.com/")->get_http_path_query(),"/")   test_eval_error(Standards.URI("www.com"))   test_eq((string)Standards.URI("www.com","http://"),"http://www.com") + test_eq((string)Standards.URI("www.com/x?a=b#y","http://"),"http://www.com/x?a=b#y")   test_eq((string)Standards.URI("ftp://www.com/x?a=b#y","http://"),"ftp://www.com/x?a=b#y")   // Some tests of empty path followed by a query.   test_eq(Standards.URI("http://user:??@host?query")->query, "query")   test_eq(Standards.URI("http://user:??@host?query")->password, "??")   test_eq(Standards.URI("http://user:??@host?query")->path, "")   test_eq(Standards.URI("HTTP://WWW.COM/")->scheme, "http")   // test `==   test_true(Standards.URI("a://b:c@d:1/e?f=g&h")==    Standards.URI("a://b:c@d:1/e?f=g&h"))   test_true(Standards.URI("A://b:c@D:01/e?f=g&h")==
pike.git/lib/modules/Standards.pmod/testsuite.in:429:    if(!m->verified || m->error_code!=Standards.X509.CERT_TOO_NEW)    return m+(["line":__LINE__]);       return 1;   ]], 1)      test_true(mappingp(Standards.X509.load_authorities()))      define(test_cert, ([[    test_true(Standards.X509.verify_certificate(Standards.PEM.Messages(#"$1")->parts->CERTIFICATE->body, ([]))) +  test_any([[ +  string der = Standards.PEM.Messages(#"$1")->parts->CERTIFICATE->body; +  object o = decode_value(encode_value(Standards.X509.decode_certificate(der))); +  /* TBS does not contain the full certificate... */ +  /* if( o->get_der() != der ) return -1; */ +  +  if( o->ext_basicConstraints != 1) return 2; +  if( !o->public_key->pkc ) return 3; +  return 1; +  ]], 1)   ]]))      dnl openssl req -x509 -nodes -days 365 -subj "/CN=PikeCert" -md5 -newkey rsa:2048 -out certfile.cer   test_cert(-----BEGIN CERTIFICATE-----   MIIC+TCCAeGgAwIBAgIJAK9S+nXAkU+DMA0GCSqGSIb3DQEBBAUAMBMxETAPBgNV   BAMMCFBpa2VDZXJ0MB4XDTEzMTEyMTIxMjM1MFoXDTE0MTEyMTIxMjM1MFowEzER   MA8GA1UEAwwIUGlrZUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB   AQDacxSu60OEhmtfBd+p9oaQ+4w13Cwp70dwRrjPb/y33sFWKN3YZ+rq/8aNXPUO   GLOyVF6z/BlOBS8t6KBI6lNvozVFqp5cwjA6vncbwMODqB8ZZffgA/dbSTM/xtbb   CSno4ylr4wLVk1tnwZIOS4F2mIR/po1QzwIqTAGdkMEvUkmknqEM2Ifqdb6pNjWh