src/LLC/x509_cert.cpp
bool X509Cert::Init_SSL(SSL *ssl)
    {
        /* Check for null data. */
        if(ssl == nullptr)
            return debug::error(FUNCTION, "SSL object is null.");
        if(px509 == nullptr)
            return debug::error(FUNCTION, "certificate is null.");
        if(pkey == nullptr)
            return debug::error(FUNCTION, "private key is null.");

        /* Assign the certiicate to the SSL object. */
        if(SSL_use_certificate(ssl, px509) != 1)
            return debug::error(FUNCTION, "Failed to initialize SSL with certificate.");

        /* Assign the private key to the SSL object. */
        if(SSL_use_PrivateKey(ssl, pkey) != 1)
            return debug::error(FUNCTION, "Failed to initialize SSL with private key.");

        return true;
    }
/*  Modifies the SSL internal state with certificate and key information. */
Modifies the SSL internal state with certificate and key information.
Modifies the SSL internal state with certificate and key information .
bool X509Cert::Init_SSL(SSL *ssl)
    {
        if(ssl == nullptr)
            return debug::error(FUNCTION, "SSL object is null.");
        if(px509 == nullptr)
            return debug::error(FUNCTION, "certificate is null.");
        if(pkey == nullptr)
            return debug::error(FUNCTION, "private key is null.");
        if(SSL_use_certificate(ssl, px509) != 1)
            return debug::error(FUNCTION, "Failed to initialize SSL with certificate.");
        if(SSL_use_PrivateKey(ssl, pkey) != 1)
            return debug::error(FUNCTION, "Failed to initialize SSL with private key.");
        return true;
    }
bool X509Cert :: Init_SSL ( SSL * ssl ) { if ( ssl == nullptr ) return debug :: error ( FUNCTION , " " ) ; if ( px509 == nullptr ) return debug :: error ( FUNCTION , " " ) ; if ( pkey == nullptr ) return debug :: error ( FUNCTION , " " ) ; if ( SSL_use_certificate ( ssl , px509 ) != 1 ) return debug :: error ( FUNCTION , " " ) ; if ( SSL_use_PrivateKey ( ssl , pkey ) != 1 ) return debug :: error ( FUNCTION , " " ) ; return true ; }
Modifies the SSL internal state with certificate and key information.
Modifies the SSL internal state with certificate and key information .
/* Check for null data. */ /* Assign the certiicate to the SSL object. */ /* Assign the private key to the SSL object. */