2014-03-08
2014-03-08 15:05:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
11410bc5ede76b687112e484d3ade98cd344216e
(11 lines)
(+7/-4)
[
Show
| Annotate
]
Branch: 8.0
SSL.https: Use add_cert().
197: Inside #if defined(HTTPS_CLIENT)
client(con);
return -17;
#else
+ Crypto.Sign key;
+
#ifdef ECDSA_MODE
#if constant(Crypto.ECC.Curve)
- ecdsa = Crypto.ECC.SECP_521R1.ECDSA()->
+ key = Crypto.ECC.SECP_521R1.ECDSA()->
set_random(Crypto.Random.random_string)->generate_key();
my_certificate =
- Standards.X509.make_selfsigned_certificate(ecdsa, 3600*4, ([
+ Standards.X509.make_selfsigned_certificate(key, 3600*4, ([
"organizationName" : "Test",
"commonName" : "*",
]));
231:
rsa->set_private_key(d);
#else /* !0 */
// FIXME: Is this correct?
- rsa = Standards.PKCS.RSA.parse_private_key(my_key);
+ key = Standards.PKCS.RSA.parse_private_key(my_key);
#endif /* 0 */
// Make sure all cipher suites are available.
rsa_mode();
#endif
SSL3_DEBUG_MSG("Cipher suites:\n%s", fmt_cipher_suites(preferred_suites));
- certificates = ({ my_certificate });
+ add_cert(key, ({ my_certificate }));
random = no_random()->read;
werror("Starting\n");
if (!bind(PORT, my_accept_callback))