Merge branch 'master' of github.com:cyassl/cyassl
This commit is contained in:
commit
78c1d592cc
@ -123,7 +123,6 @@ int pbkdf2_test(void);
|
|||||||
int ecc_test(void);
|
int ecc_test(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int PemToDer(const char* inName, const char* outName);
|
|
||||||
|
|
||||||
|
|
||||||
static void err_sys(const char* msg, int es)
|
static void err_sys(const char* msg, int es)
|
||||||
|
@ -895,6 +895,7 @@ int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify)
|
|||||||
char* headerEnd;
|
char* headerEnd;
|
||||||
char* footerEnd;
|
char* footerEnd;
|
||||||
char* consumedEnd;
|
char* consumedEnd;
|
||||||
|
char* bufferEnd = (char*)(buff + longSz);
|
||||||
long neededSz;
|
long neededSz;
|
||||||
int pkcs8 = 0;
|
int pkcs8 = 0;
|
||||||
int pkcs8Enc = 0;
|
int pkcs8Enc = 0;
|
||||||
@ -965,7 +966,7 @@ int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify)
|
|||||||
}
|
}
|
||||||
headerEnd += XSTRLEN(header);
|
headerEnd += XSTRLEN(header);
|
||||||
|
|
||||||
/* get next line */
|
/* eat end of line */
|
||||||
if (headerEnd[0] == '\n')
|
if (headerEnd[0] == '\n')
|
||||||
headerEnd++;
|
headerEnd++;
|
||||||
else if (headerEnd[1] == '\n')
|
else if (headerEnd[1] == '\n')
|
||||||
@ -1023,13 +1024,15 @@ int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify)
|
|||||||
|
|
||||||
consumedEnd = footerEnd + XSTRLEN(footer);
|
consumedEnd = footerEnd + XSTRLEN(footer);
|
||||||
|
|
||||||
/* get next line */
|
if (consumedEnd < bufferEnd) { /* handle no end of line on last line */
|
||||||
|
/* eat end of line */
|
||||||
if (consumedEnd[0] == '\n')
|
if (consumedEnd[0] == '\n')
|
||||||
consumedEnd++;
|
consumedEnd++;
|
||||||
else if (consumedEnd[1] == '\n')
|
else if (consumedEnd[1] == '\n')
|
||||||
consumedEnd += 2;
|
consumedEnd += 2;
|
||||||
else
|
else
|
||||||
return SSL_BAD_FILE;
|
return SSL_BAD_FILE;
|
||||||
|
}
|
||||||
|
|
||||||
if (info)
|
if (info)
|
||||||
info->consumed = (long)(consumedEnd - (char*)buff);
|
info->consumed = (long)(consumedEnd - (char*)buff);
|
||||||
|
Loading…
Reference in New Issue
Block a user