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

version» Context lines:

pike.git/lib/modules/Standards.pmod/testsuite.in:274:   ]],[[ ([    "version" : 1,    "serial" : "5",    "algorithm": "Standards.ASN1.Types.Identifier(1.2.840.113549.1.1.5)",    "issuer" : "Test",    "subject" : "Test",    "extensions" : 0,    "public_key": 1,   ]) ]])    + test_any([[ +  Crypto.DSA dsa = Crypto.DSA(); +  dsa->generate_parameters(1024); +  dsa->generate_key(); +  +  string s=Standards.X509.make_selfsigned_certificate(dsa, 3600, ([ "commonName":"*" ])); +  return Standards.X509.verify_certificate(s, ([])) && 1; + ]], 1) +  + test_any([[ +  Crypto.RSA rsa = Crypto.RSA(); +  rsa->generate_key(4096); +  +  string s=Standards.X509.make_selfsigned_certificate(rsa, 3600, ([ "commonName":"*" ])); +  return Standards.X509.verify_certificate(s, ([])) && 1; + ]], 1) +  +    define(test_cert, ([[    test_true(Standards.X509.verify_certificate(Standards.PEM.Messages(#"$1")->parts->CERTIFICATE->body, ([])))   ]]))      dnl openssl req -x509 -nodes -days 365 -subj "/CN=PikeCert" -sha256 -newkey rsa:2048 -out certfile.cer   test_cert(-----BEGIN CERTIFICATE-----   MIIC+TCCAeGgAwIBAgIJANOmQYB8BiA6MA0GCSqGSIb3DQEBCwUAMBMxETAPBgNV   BAMMCFBpa2VDZXJ0MB4XDTEzMTExOTEzNDQxOVoXDTE0MTExOTEzNDQxOVowEzER   MA8GA1UEAwwIUGlrZUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB   AQC8sZtnnq7b8tBSZIM9MC5h9in8zF5jerv1JmS5aU85O3GYfN/862GxR4i6sxhM