mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Increase size of buffer for OpenSSL error messages
According to man 3 ERR_error_string, "buf must be at least 256 bytes long", therefore increase the buffer size to 256 everywhere.
This commit is contained in:
parent
64a49ee3a1
commit
3b37867d2e
@ -506,7 +506,7 @@ std::shared_ptr<X509> CreateCert(EVP_PKEY *pubkey, X509_NAME *subject, X509_NAME
|
||||
|
||||
String id = Utility::NewUniqueID();
|
||||
|
||||
char errbuf[120];
|
||||
char errbuf[256];
|
||||
SHA_CTX context;
|
||||
unsigned char digest[SHA_DIGEST_LENGTH];
|
||||
|
||||
@ -580,7 +580,7 @@ String GetIcingaCADir()
|
||||
|
||||
std::shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject)
|
||||
{
|
||||
char errbuf[120];
|
||||
char errbuf[256];
|
||||
|
||||
String cadir = GetIcingaCADir();
|
||||
|
||||
@ -680,7 +680,7 @@ String PBKDF2_SHA256(const String& password, const String& salt, int iterations)
|
||||
|
||||
String SHA1(const String& s, bool binary)
|
||||
{
|
||||
char errbuf[120];
|
||||
char errbuf[256];
|
||||
SHA_CTX context;
|
||||
unsigned char digest[SHA_DIGEST_LENGTH];
|
||||
|
||||
@ -720,7 +720,7 @@ String SHA1(const String& s, bool binary)
|
||||
|
||||
String SHA256(const String& s)
|
||||
{
|
||||
char errbuf[120];
|
||||
char errbuf[256];
|
||||
SHA256_CTX context;
|
||||
unsigned char digest[SHA256_DIGEST_LENGTH];
|
||||
|
||||
@ -767,7 +767,7 @@ String RandomString(int length)
|
||||
if (!RAND_bytes(bytes, length)) {
|
||||
delete [] bytes;
|
||||
|
||||
char errbuf[120];
|
||||
char errbuf[256];
|
||||
|
||||
Log(LogCritical, "SSL")
|
||||
<< "Error for RAND_bytes: " << ERR_peek_error() << ", \"" << ERR_error_string(ERR_peek_error(), errbuf) << "\"";
|
||||
|
Loading…
x
Reference in New Issue
Block a user