@@ -62,6 +62,10 @@ int wc_falcon_sign_msg(const byte* in, word32 inLen,
6262 falcon_key * key , WC_RNG * rng )
6363{
6464 int ret = 0 ;
65+ #ifdef HAVE_LIBOQS
66+ OQS_SIG * oqssig = NULL ;
67+ size_t localOutLen = 0 ;
68+ #endif
6569
6670 /* sanity check on arguments */
6771 if ((in == NULL ) || (out == NULL ) || (outLen == NULL ) || (key == NULL )) {
@@ -83,9 +87,6 @@ int wc_falcon_sign_msg(const byte* in, word32 inLen,
8387#endif
8488
8589#ifdef HAVE_LIBOQS
86- OQS_SIG * oqssig = NULL ;
87- size_t localOutLen = 0 ;
88-
8990 if ((ret == 0 ) && (!key -> prvKeySet )) {
9091 ret = BAD_FUNC_ARG ;
9192 }
@@ -161,6 +162,9 @@ int wc_falcon_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
161162 word32 msgLen , int * res , falcon_key * key )
162163{
163164 int ret = 0 ;
165+ #ifdef HAVE_LIBOQS
166+ OQS_SIG * oqssig = NULL ;
167+ #endif
164168
165169 if (key == NULL || sig == NULL || msg == NULL || res == NULL ) {
166170 return BAD_FUNC_ARG ;
@@ -181,8 +185,6 @@ int wc_falcon_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
181185#endif
182186
183187#ifdef HAVE_LIBOQS
184- OQS_SIG * oqssig = NULL ;
185-
186188 if ((ret == 0 ) && (!key -> pubKeySet )) {
187189 ret = BAD_FUNC_ARG ;
188190 }
@@ -708,12 +710,12 @@ int wc_falcon_export_key(falcon_key* key, byte* priv, word32 *privSz,
708710 */
709711int wc_falcon_check_key (falcon_key * key )
710712{
713+ int ret = 0 ;
714+
711715 if (key == NULL ) {
712716 return BAD_FUNC_ARG ;
713717 }
714718
715- int ret = 0 ;
716-
717719 /* The public key is also decoded and stored within the private key buffer
718720 * behind the private key. Hence, we can compare both stored public keys. */
719721 if (key -> level == 1 ) {
0 commit comments