mirror of https://github.com/wolfSSL/wolfssl.git
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).
parent
fbb6faaa2f
commit
088d378ba4
|
@ -26895,8 +26895,8 @@ int EncryptDerKey(byte *der, int *derSz, const EVP_CIPHER* cipher,
|
|||
#endif
|
||||
return WOLFSSL_FAILURE;
|
||||
}
|
||||
XSTRCPY((char*)*cipherInfo, info->name);
|
||||
XSTRNCAT((char*)*cipherInfo, ",", 2);
|
||||
XSTRLCPY((char*)*cipherInfo, info->name, cipherInfoSz);
|
||||
XSTRLCAT((char*)*cipherInfo, ",", cipherInfoSz);
|
||||
|
||||
idx = (word32)XSTRLEN((char*)*cipherInfo);
|
||||
cipherInfoSz -= idx;
|
||||
|
|
|
@ -616,7 +616,6 @@ decouple library dependencies with standard string, memory and so on.
|
|||
|
||||
#define XSTRLEN(s1) strlen((s1))
|
||||
#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,
|
||||
* not required for wolfCrypt only */
|
||||
#define XSTRSTR(s1,s2) strstr((s1),(s2))
|
||||
|
|
Loading…
Reference in New Issue