forked from wolfSSL/wolfssl
ssl.c:EncryptDerKey(): use XSTRLCPY() and XSTRLCAT() to build up cipherInfo, and remove XSTRCPY() macro from wolfssl/wolfcrypt/types.h (clang-tidy hates on it, albeit frivolously).
This commit is contained in:
@ -26895,8 +26895,8 @@ int EncryptDerKey(byte *der, int *derSz, const EVP_CIPHER* cipher,
|
|||||||
#endif
|
#endif
|
||||||
return WOLFSSL_FAILURE;
|
return WOLFSSL_FAILURE;
|
||||||
}
|
}
|
||||||
XSTRCPY((char*)*cipherInfo, info->name);
|
XSTRLCPY((char*)*cipherInfo, info->name, cipherInfoSz);
|
||||||
XSTRNCAT((char*)*cipherInfo, ",", 2);
|
XSTRLCAT((char*)*cipherInfo, ",", cipherInfoSz);
|
||||||
|
|
||||||
idx = (word32)XSTRLEN((char*)*cipherInfo);
|
idx = (word32)XSTRLEN((char*)*cipherInfo);
|
||||||
cipherInfoSz -= idx;
|
cipherInfoSz -= idx;
|
||||||
|
@ -616,7 +616,6 @@ decouple library dependencies with standard string, memory and so on.
|
|||||||
|
|
||||||
#define XSTRLEN(s1) strlen((s1))
|
#define XSTRLEN(s1) strlen((s1))
|
||||||
#define XSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n))
|
#define XSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n))
|
||||||
#define XSTRCPY(s1,s2) strcpy((s1),(s2))
|
|
||||||
/* strstr, strncmp, strcmp, and strncat only used by wolfSSL proper,
|
/* strstr, strncmp, strcmp, and strncat only used by wolfSSL proper,
|
||||||
* not required for wolfCrypt only */
|
* not required for wolfCrypt only */
|
||||||
#define XSTRSTR(s1,s2) strstr((s1),(s2))
|
#define XSTRSTR(s1,s2) strstr((s1),(s2))
|
||||||
|
Reference in New Issue
Block a user