@@ -40,8 +40,8 @@ int wolfCLU_genKey_ED25519(WC_RNG* rng, char* fOutNm, int directive, int format)
4040 int fOutNmSz ; /* file name without append */
4141 int fOutNmAppendSz = 6 ; /* # of bytes to append to file name */
4242 int flagOutputPub = 0 ; /* set if outputting both priv/pub */
43- char privAppend [6 ] = ".priv\0" ; /* last part of the priv file name */
44- char pubAppend [6 ] = ".pub\0\0" ; /* last part of the pub file name*/
43+ char privAppend [6 ] = ".priv" ; /* last part of the priv file name */
44+ char pubAppend [6 ] = ".pub" ; /* last part of the pub file name*/
4545 byte privKeyBuf [ED25519_KEY_SIZE * 2 ]; /* will hold public & private parts */
4646 byte pubKeyBuf [ED25519_KEY_SIZE ]; /* holds just the public key part */
4747 word32 privKeySz ; /* size of private key */
@@ -611,8 +611,8 @@ int wolfCLU_GenAndOutput_ECC(WC_RNG* rng, char* fName, int directive,
611611#ifdef HAVE_ECC
612612 int fNameSz ;
613613 int fExtSz = 6 ;
614- char fExtPriv [6 ] = ".priv\0 " ;
615- char fExtPub [6 ] = ".pub\0\0 " ;
614+ char fExtPriv [6 ] = ".priv" ;
615+ char fExtPub [6 ] = ".pub" ;
616616 char * fOutNameBuf = NULL ;
617617
618618 WOLFSSL_BIO * bioPub = NULL ;
@@ -790,8 +790,8 @@ int wolfCLU_genKey_RSA(WC_RNG* rng, char* fName, int directive, int fmt, int
790790 int ret = WOLFCLU_SUCCESS ; /* return value */
791791 int fNameSz ; /* file name without append */
792792 int fExtSz = 6 ; /* number of bytes to append to file name */
793- char fExtPriv [6 ] = ".priv\0" ; /* last part of the priv file name */
794- char fExtPub [6 ] = ".pub\0\0" ; /* last part of the pub file name*/
793+ char fExtPriv [6 ] = ".priv" ; /* last part of the priv file name */
794+ char fExtPub [6 ] = ".pub" ; /* last part of the pub file name*/
795795 char * fOutNameBuf = NULL ; /* file name + fExt */
796796 int flagOutputPub = 0 ; /* set if outputting both priv/pub */
797797 byte * derBuf = NULL ; /* buffer for DER format */
0 commit comments