pike.git
/
lib
/
modules
/
Standards.pmod
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Standards.pmod/testsuite.in:309:
#endif }), object h) { string s=Standards.X509.make_selfsigned_certificate(rsa, 3600, ([ "commonName":"*" ]), 0, h); if( !Standards.X509.verify_certificate(s, ([])) ) return h; } return 1; ]], 1)
+
cond_resolv( Crypto.ECC, [[
+
test_any([[
+
Crypto.Sign key = Crypto.ECC.SECP_521R1.ECDSA()->generate_key();
-
+
foreach( ({ 0,
+
Crypto.SHA1,
+
#if constant(Crypto.SHA224)
+
Crypto.SHA224,
+
#endif
+
Crypto.SHA256,
+
#if constant(Crypto.SHA384)
+
Crypto.SHA384,
+
#endif
+
#if constant(Crypto.SHA512)
+
Crypto.SHA512,
+
#endif
+
}), object h)
+
{
+
string s = Standards.X509.make_selfsigned_certificate(key, 3600, ([ "commonName":"*" ]), 0, h);
+
if( !Standards.X509.verify_certificate(s, ([])) )
+
return h;
+
}
+
return 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" -md5 -newkey rsa:2048 -out certfile.cer test_cert(-----BEGIN CERTIFICATE----- MIIC+TCCAeGgAwIBAgIJAK9S+nXAkU+DMA0GCSqGSIb3DQEBBAUAMBMxETAPBgNV BAMMCFBpa2VDZXJ0MB4XDTEzMTEyMTIxMjM1MFoXDTE0MTEyMTIxMjM1MFowEzER MA8GA1UEAwwIUGlrZUNlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB AQDacxSu60OEhmtfBd+p9oaQ+4w13Cwp70dwRrjPb/y33sFWKN3YZ+rq/8aNXPUO