Skip to content

Commit

Permalink
null checks for sresp
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel40791765 committed Jul 31, 2024
1 parent 2325fd8 commit c69cfd8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crypto/ocsp/ocsp_extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *bs, int loc) {

int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *sresp, X509_EXTENSION *ex,
int loc) {
GUARD_PTR(sresp);
return (X509v3_add_ext(&sresp->singleExtensions, ex, loc) != NULL);
}

int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *sresp) {
GUARD_PTR(sresp);
return X509v3_get_ext_count(sresp->singleExtensions);
}

X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *sresp, int loc) {
GUARD_PTR(sresp);
return X509v3_get_ext(sresp->singleExtensions, loc);
}

Expand Down

0 comments on commit c69cfd8

Please sign in to comment.