int SSL_use_certificate(SSL *ssl, X509 *x) { if (x == NULL) { OPENSSL_PUT_ERROR(SSL, ERR_R_PASSED_NULL_PARAMETER); return 0; } return ssl_set_cert(ssl->cert, x); }
int SSL_use_certificate(SSL *ssl, X509 *x) { if (x == NULL) { SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER); return (0); } return (ssl_set_cert(ssl->cert, x)); }
int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) { if (x == NULL) { SSLerrorx(ERR_R_PASSED_NULL_PARAMETER); return (0); } return (ssl_set_cert(ctx->internal->cert, x)); }
int SSL_use_certificate_ASN1(SSL *ssl, const uint8_t *der, size_t der_len) { CRYPTO_BUFFER *buffer = CRYPTO_BUFFER_new(der, der_len, NULL); if (buffer == NULL) { return 0; } const int ok = ssl_set_cert(ssl->cert, buffer); CRYPTO_BUFFER_free(buffer); return ok; }
int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) { if (x == NULL) { SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE, ERR_R_PASSED_NULL_PARAMETER); return (0); } if (!ssl_cert_inst(&ctx->cert)) { SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE, ERR_R_MALLOC_FAILURE); return (0); } return (ssl_set_cert(ctx->cert, x)); }
int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) { int rv; if (x == NULL) { SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE, ERR_R_PASSED_NULL_PARAMETER); return (0); } rv = ssl_security_cert(NULL, ctx, x, 0, 1); if (rv != 1) { SSLerr(SSL_F_SSL_CTX_USE_CERTIFICATE, rv); return 0; } return (ssl_set_cert(ctx->cert, x)); }
int SSL_use_certificate(SSL *ssl, X509 *x) { if (x == NULL) { OPENSSL_PUT_ERROR(SSL, ERR_R_PASSED_NULL_PARAMETER); return 0; } CRYPTO_BUFFER *buffer = x509_to_buffer(x); if (buffer == NULL) { return 0; } const int ok = ssl_set_cert(ssl->cert, buffer); CRYPTO_BUFFER_free(buffer); return ok; }
int SSL_use_certificate(SSL *ssl, X509 *x) { //sgx_debug("1\n"); if (x == NULL) { sgx_debug("c 1\n"); SSLerr(SSL_F_SSL_USE_CERTIFICATE, ERR_R_PASSED_NULL_PARAMETER); return (0); } if (!ssl_cert_inst(&ssl->cert)) { sgx_debug("c 2\n"); SSLerr(SSL_F_SSL_USE_CERTIFICATE, ERR_R_MALLOC_FAILURE); return (0); } return (ssl_set_cert(ssl->cert, x)); }
int SSL_use_certificate(SSL *ssl, X509 *x) { int rv; if (x == NULL) { SSLerr(SSL_F_SSL_USE_CERTIFICATE,ERR_R_PASSED_NULL_PARAMETER); return(0); } rv = ssl_security_cert(ssl, NULL, x, 0, 1); if (rv != 1) { SSLerr(SSL_F_SSL_USE_CERTIFICATE, rv); return 0; } if (!ssl_cert_inst(&ssl->cert)) { SSLerr(SSL_F_SSL_USE_CERTIFICATE,ERR_R_MALLOC_FAILURE); return(0); } return(ssl_set_cert(ssl->cert,x)); }