mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
fix indentation -- no code changed.
This commit is contained in:
36
src/ssl.c
36
src/ssl.c
@@ -1797,8 +1797,8 @@ int CyaSSL_Init(void)
|
||||
if (type == CERT_TYPE || type == CA_TYPE) {
|
||||
XSTRNCPY(header, "-----BEGIN CERTIFICATE-----", sizeof(header));
|
||||
XSTRNCPY(footer, "-----END CERTIFICATE-----", sizeof(footer));
|
||||
dynamicType = (type == CA_TYPE) ? DYNAMIC_TYPE_CA :
|
||||
DYNAMIC_TYPE_CERT;
|
||||
dynamicType = (type == CA_TYPE) ? DYNAMIC_TYPE_CA
|
||||
: DYNAMIC_TYPE_CERT;
|
||||
} else if (type == CERTREQ_TYPE) {
|
||||
XSTRNCPY(header, "-----BEGIN CERTIFICATE REQUEST-----",
|
||||
sizeof(header));
|
||||
@@ -2061,8 +2061,7 @@ int CyaSSL_Init(void)
|
||||
CYASSL_MSG("Growing Tmp Chain Buffer");
|
||||
bufferSz = (word32)(sz - consumed);
|
||||
/* will shrink to actual size */
|
||||
chainBuffer = (byte*)XMALLOC(bufferSz, heap,
|
||||
DYNAMIC_TYPE_FILE);
|
||||
chainBuffer = (byte*)XMALLOC(bufferSz, heap, DYNAMIC_TYPE_FILE);
|
||||
if (chainBuffer == NULL) {
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
XFREE(info, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
@@ -2262,8 +2261,7 @@ int CyaSSL_Init(void)
|
||||
else if (type == CERT_TYPE) {
|
||||
if (ssl) {
|
||||
if (ssl->buffers.weOwnCert && ssl->buffers.certificate.buffer)
|
||||
XFREE(ssl->buffers.certificate.buffer, heap,
|
||||
dynamicType);
|
||||
XFREE(ssl->buffers.certificate.buffer, heap, dynamicType);
|
||||
ssl->buffers.certificate = der;
|
||||
ssl->buffers.weOwnCert = 1;
|
||||
}
|
||||
@@ -2376,8 +2374,6 @@ int CyaSSL_Init(void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* CA PEM file for verification, may have multiple/chain certs to process */
|
||||
static int ProcessChainBuffer(CYASSL_CTX* ctx, const unsigned char* buff,
|
||||
long sz, int format, int type, CYASSL* ssl)
|
||||
@@ -2774,7 +2770,8 @@ int ProcessFile(CYASSL_CTX* ctx, const char* fname, int format, int type,
|
||||
}
|
||||
|
||||
XFCLOSE(file);
|
||||
if (dynamic) XFREE(myBuffer, heapHint, DYNAMIC_TYPE_FILE);
|
||||
if (dynamic)
|
||||
XFREE(myBuffer, heapHint, DYNAMIC_TYPE_FILE);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2903,7 +2900,8 @@ int CyaSSL_CertManagerVerify(CYASSL_CERT_MANAGER* cm, const char* fname,
|
||||
ret = CyaSSL_CertManagerVerifyBuffer(cm, myBuffer, sz, format);
|
||||
|
||||
XFCLOSE(file);
|
||||
if (dynamic) XFREE(myBuffer, cm->heap, DYNAMIC_TYPE_FILE);
|
||||
if (dynamic)
|
||||
XFREE(myBuffer, cm->heap, DYNAMIC_TYPE_FILE);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -3418,7 +3416,8 @@ static int CyaSSL_SetTmpDH_file_wrapper(CYASSL_CTX* ctx, CYASSL* ssl,
|
||||
}
|
||||
|
||||
XFCLOSE(file);
|
||||
if (dynamic) XFREE(myBuffer, ctx->heap, DYNAMIC_TYPE_FILE);
|
||||
if (dynamic)
|
||||
XFREE(myBuffer, ctx->heap, DYNAMIC_TYPE_FILE);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -9789,24 +9788,21 @@ CYASSL_X509* CyaSSL_X509_load_certificate_file(const char* fname, int format)
|
||||
CYASSL_ENTER("CyaSSL_cmp_peer_cert_to_file");
|
||||
if (ssl != NULL && fname != NULL)
|
||||
{
|
||||
XFILE file = XBADFILE;
|
||||
long sz = 0;
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
EncryptedInfo* info;
|
||||
byte staticBuffer[1]; /* force heap usage */
|
||||
#else
|
||||
EncryptedInfo info[1];
|
||||
byte staticBuffer[FILE_BUFFER_SIZE];
|
||||
#endif
|
||||
byte* myBuffer = staticBuffer;
|
||||
int dynamic = 0;
|
||||
CYASSL_CTX* ctx = ssl->ctx;
|
||||
buffer fileDer;
|
||||
XFILE file = XBADFILE;
|
||||
long sz = 0;
|
||||
int eccKey = 0;
|
||||
CYASSL_CTX* ctx = ssl->ctx;
|
||||
CYASSL_X509* peer_cert = &ssl->peerCert;
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
EncryptedInfo* info;
|
||||
#else
|
||||
EncryptedInfo info[1];
|
||||
#endif
|
||||
buffer fileDer;
|
||||
|
||||
file = XFOPEN(fname, "rb");
|
||||
if (file == XBADFILE)
|
||||
|
Reference in New Issue
Block a user