Latest update.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/asn1t.h>
|
||||
#include <openssl/ocsp.h>
|
||||
#include "ocsp_lcl.h"
|
||||
#include "ocsp_local.h"
|
||||
|
||||
ASN1_SEQUENCE(OCSP_SIGNATURE) = {
|
||||
ASN1_EMBED(OCSP_SIGNATURE, signatureAlgorithm, X509_ALGOR),
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/ocsp.h>
|
||||
#include "ocsp_lcl.h"
|
||||
#include "ocsp_local.h"
|
||||
|
||||
/*
|
||||
* Utility functions related to sending OCSP requests and extracting relevant
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/ocsp.h>
|
||||
#include "ocsp_lcl.h"
|
||||
#include "ocsp_local.h"
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "e_os.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "internal/ctype.h"
|
||||
#include "crypto/ctype.h"
|
||||
#include <string.h>
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/ocsp.h>
|
||||
@@ -142,7 +142,7 @@ int OCSP_REQ_CTX_http(OCSP_REQ_CTX *rctx, const char *op, const char *path)
|
||||
{
|
||||
static const char http_hdr[] = "%s %s HTTP/1.0\r\n";
|
||||
|
||||
if (!path)
|
||||
if (path == NULL)
|
||||
path = "/";
|
||||
|
||||
if (BIO_printf(rctx->mem, http_hdr, op, path) <= 0)
|
||||
@@ -211,7 +211,7 @@ static int parse_http_line1(char *line)
|
||||
|
||||
for (p = line; *p && !ossl_isspace(*p); p++)
|
||||
continue;
|
||||
if (!*p) {
|
||||
if (*p == '\0') {
|
||||
OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
|
||||
return 0;
|
||||
}
|
||||
@@ -220,7 +220,7 @@ static int parse_http_line1(char *line)
|
||||
while (*p && ossl_isspace(*p))
|
||||
p++;
|
||||
|
||||
if (!*p) {
|
||||
if (*p == '\0') {
|
||||
OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
|
||||
return 0;
|
||||
}
|
||||
@@ -229,7 +229,7 @@ static int parse_http_line1(char *line)
|
||||
for (q = p; *q && !ossl_isspace(*q); q++)
|
||||
continue;
|
||||
|
||||
if (!*q) {
|
||||
if (*q == '\0') {
|
||||
OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
|
||||
return 0;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ static int parse_http_line1(char *line)
|
||||
}
|
||||
if (retcode != 200) {
|
||||
OCSPerr(OCSP_F_PARSE_HTTP_LINE1, OCSP_R_SERVER_RESPONSE_ERROR);
|
||||
if (!*q)
|
||||
if (*q == '\0')
|
||||
ERR_add_error_data(2, "Code=", p);
|
||||
else
|
||||
ERR_add_error_data(4, "Code=", p, ",Reason=", q);
|
||||
|
||||
+7
-10
@@ -14,7 +14,7 @@
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/ocsp.h>
|
||||
#include "ocsp_lcl.h"
|
||||
#include "ocsp_local.h"
|
||||
#include <openssl/asn1t.h>
|
||||
|
||||
/* Convert a certificate and its issuer to an OCSP_CERTID */
|
||||
@@ -132,8 +132,7 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
|
||||
|
||||
/* Check for initial colon */
|
||||
p = strchr(buf, ':');
|
||||
|
||||
if (!p)
|
||||
if (p == NULL)
|
||||
goto parse_err;
|
||||
|
||||
*(p++) = '\0';
|
||||
@@ -156,10 +155,8 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
|
||||
host = p;
|
||||
|
||||
/* Check for trailing part of path */
|
||||
|
||||
p = strchr(p, '/');
|
||||
|
||||
if (!p)
|
||||
if (p == NULL)
|
||||
*ppath = OPENSSL_strdup("/");
|
||||
else {
|
||||
*ppath = OPENSSL_strdup(p);
|
||||
@@ -167,7 +164,7 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
if (!*ppath)
|
||||
if (*ppath == NULL)
|
||||
goto mem_err;
|
||||
|
||||
p = host;
|
||||
@@ -175,7 +172,7 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
|
||||
/* ipv6 literal */
|
||||
host++;
|
||||
p = strchr(host, ']');
|
||||
if (!p)
|
||||
if (p == NULL)
|
||||
goto parse_err;
|
||||
*p = '\0';
|
||||
p++;
|
||||
@@ -188,12 +185,12 @@ int OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath,
|
||||
}
|
||||
|
||||
*pport = OPENSSL_strdup(port);
|
||||
if (!*pport)
|
||||
if (*pport == NULL)
|
||||
goto mem_err;
|
||||
|
||||
*phost = OPENSSL_strdup(host);
|
||||
|
||||
if (!*phost)
|
||||
if (*phost == NULL)
|
||||
goto mem_err;
|
||||
|
||||
OPENSSL_free(buf);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/ocsp.h>
|
||||
#include "ocsp_lcl.h"
|
||||
#include "ocsp_local.h"
|
||||
#include "internal/cryptlib.h"
|
||||
#include <openssl/pem.h>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/ocsp.h>
|
||||
#include "ocsp_lcl.h"
|
||||
#include "ocsp_local.h"
|
||||
|
||||
/*
|
||||
* Utility functions related to sending OCSP responses and extracting
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <openssl/ocsp.h>
|
||||
#include "ocsp_lcl.h"
|
||||
#include "ocsp_local.h"
|
||||
#include <openssl/err.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# include <openssl/conf.h>
|
||||
# include <openssl/asn1.h>
|
||||
# include <openssl/ocsp.h>
|
||||
# include "ocsp_lcl.h"
|
||||
# include "ocsp_local.h"
|
||||
# include <openssl/x509v3.h>
|
||||
# include "../x509/ext_dat.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user