Skip to content

Commit

Permalink
Return the correct return code for client APIs when the EST context p…
Browse files Browse the repository at this point in the history
…ointer is not passed in
  • Loading branch information
pbeal committed May 15, 2014
1 parent 5eaff37 commit e5d20dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/est/est_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,7 @@ static EST_ERROR est_client_enroll_cn (EST_CTX *ctx, SSL *ssl, char *cn,
char *tls_uid;

if (!ctx) {
return (EST_ERR_NO_SSL_CTX);
return (EST_ERR_NO_CTX);
}

/*
Expand Down Expand Up @@ -2987,7 +2987,7 @@ EST_ERROR est_client_copy_enrolled_cert (EST_CTX *ctx, unsigned char *pkcs7)
{

if (!ctx) {
return (EST_ERR_NO_SSL_CTX);
return (EST_ERR_NO_CTX);
}

if (!ctx->est_client_initialized) {
Expand Down Expand Up @@ -3044,7 +3044,7 @@ EST_ERROR est_client_get_cacerts (EST_CTX *ctx, int *ca_certs_len)
SSL *ssl = NULL;

if (!ctx) {
return (EST_ERR_NO_SSL_CTX);
return (EST_ERR_NO_CTX);
}

if (!ctx->est_client_initialized) {
Expand Down Expand Up @@ -3099,7 +3099,7 @@ EST_ERROR est_client_copy_cacerts (EST_CTX *ctx, unsigned char *ca_certs)
{

if (!ctx) {
return (EST_ERR_NO_SSL_CTX);
return (EST_ERR_NO_CTX);
}

if (!ctx->est_client_initialized) {
Expand Down Expand Up @@ -3607,7 +3607,7 @@ EST_ERROR est_client_copy_retry_after (EST_CTX *ctx, int *retry_delay,
{

if (!ctx) {
return (EST_ERR_NO_SSL_CTX);
return (EST_ERR_NO_CTX);
}

if (!ctx->est_client_initialized) {
Expand Down

0 comments on commit e5d20dd

Please sign in to comment.