From ff54899588617c5e223d1df2cc72153ad0a82885 Mon Sep 17 00:00:00 2001 From: psychon Date: Thu, 18 Feb 2010 20:41:56 +0000 Subject: [PATCH] Generate stronger certificates in --makepem Idea and patch by Reed Loden on the bug tracker, thanks a lot. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1774 726aef4b-f618-498e-8847-2d620e286838 --- Utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utils.cpp b/Utils.cpp index 77aa86b0..918fb969 100644 --- a/Utils.cpp +++ b/Utils.cpp @@ -45,7 +45,7 @@ void CUtils::GenerateCert(FILE *pOut, const CString& sHost) { u_int iSeed = time(NULL); int serial = (rand_r(&iSeed) % 9999); - RSA *pRSA = RSA_generate_key(1024, 0x10001, NULL, NULL); + RSA *pRSA = RSA_generate_key(2048, 0x10001, NULL, NULL); if ((pKey = EVP_PKEY_new())) { if (!EVP_PKEY_assign_RSA(pKey, pRSA)) { EVP_PKEY_free(pKey); @@ -101,7 +101,7 @@ void CUtils::GenerateCert(FILE *pOut, const CString& sHost) { X509_set_subject_name(pCert, pName); X509_set_issuer_name(pCert, pName); - if (!X509_sign(pCert, pKey, EVP_md5())) { + if (!X509_sign(pCert, pKey, EVP_sha1())) { X509_free(pCert); EVP_PKEY_free(pKey); return;