@@ -121,7 +121,7 @@ static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl, const byte* buff,
121121 wolfSSL_d2i_X509_NAME (& crle -> issuer , (unsigned char * * )& dcrl -> issuer ,
122122 dcrl -> issuerSz );
123123 if (crle -> issuer == NULL ) {
124- return -1 ;
124+ return WOLFSSL_FATAL_ERROR ;
125125 }
126126#endif
127127#ifdef CRL_STATIC_REVOKED_LIST
@@ -141,13 +141,13 @@ static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl, const byte* buff,
141141 crle -> toBeSigned = (byte * )XMALLOC (crle -> tbsSz , heap ,
142142 DYNAMIC_TYPE_CRL_ENTRY );
143143 if (crle -> toBeSigned == NULL )
144- return -1 ;
144+ return WOLFSSL_FATAL_ERROR ;
145145 crle -> signature = (byte * )XMALLOC (crle -> signatureSz , heap ,
146146 DYNAMIC_TYPE_CRL_ENTRY );
147147 if (crle -> signature == NULL ) {
148148 XFREE (crle -> toBeSigned , heap , DYNAMIC_TYPE_CRL_ENTRY );
149149 crle -> toBeSigned = NULL ;
150- return -1 ;
150+ return WOLFSSL_FATAL_ERROR ;
151151 }
152152
153153 #ifdef WC_RSA_PSS
@@ -160,7 +160,7 @@ static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl, const byte* buff,
160160 crle -> toBeSigned = NULL ;
161161 XFREE (crle -> signature , heap , DYNAMIC_TYPE_CRL_ENTRY );
162162 crle -> signature = NULL ;
163- return -1 ;
163+ return WOLFSSL_FATAL_ERROR ;
164164 }
165165 XMEMCPY (crle -> sigParams , buff + dcrl -> sigParamsIndex ,
166166 crle -> sigParamsSz );
@@ -563,7 +563,7 @@ static int AddCRL(WOLFSSL_CRL* crl, DecodedCRL* dcrl, const byte* buff,
563563 WOLFSSL_ENTER ("AddCRL" );
564564
565565 if (crl == NULL )
566- return -1 ;
566+ return WOLFSSL_FATAL_ERROR ;
567567
568568 crle = crl -> currentEntry ;
569569
@@ -578,7 +578,7 @@ static int AddCRL(WOLFSSL_CRL* crl, DecodedCRL* dcrl, const byte* buff,
578578 if (InitCRL_Entry (crle , dcrl , buff , verified , crl -> heap ) < 0 ) {
579579 WOLFSSL_MSG ("Init CRL Entry failed" );
580580 CRL_Entry_free (crle , crl -> heap );
581- return -1 ;
581+ return WOLFSSL_FATAL_ERROR ;
582582 }
583583
584584 if (wc_LockRwLock_Wr (& crl -> crlLock ) != 0 ) {
@@ -625,7 +625,7 @@ int BufferLoadCRL(WOLFSSL_CRL* crl, const byte* buff, long sz, int type,
625625 else {
626626 WOLFSSL_MSG ("Pem to Der failed" );
627627 FreeDer (& der );
628- return -1 ;
628+ return WOLFSSL_FATAL_ERROR ;
629629 }
630630 #else
631631 ret = NOT_COMPILED_IN ;
@@ -1018,7 +1018,7 @@ static int SwapLists(WOLFSSL_CRL* crl)
10181018#ifdef WOLFSSL_SMALL_STACK
10191019 XFREE (tmp , NULL , DYNAMIC_TYPE_TMP_BUFFER );
10201020#endif
1021- return -1 ;
1021+ return WOLFSSL_FATAL_ERROR ;
10221022 }
10231023
10241024 if (crl -> monitors [0 ].path ) {
@@ -1029,7 +1029,7 @@ static int SwapLists(WOLFSSL_CRL* crl)
10291029#ifdef WOLFSSL_SMALL_STACK
10301030 XFREE (tmp , NULL , DYNAMIC_TYPE_TMP_BUFFER );
10311031#endif
1032- return -1 ;
1032+ return WOLFSSL_FATAL_ERROR ;
10331033 }
10341034 }
10351035
@@ -1041,7 +1041,7 @@ static int SwapLists(WOLFSSL_CRL* crl)
10411041#ifdef WOLFSSL_SMALL_STACK
10421042 XFREE (tmp , NULL , DYNAMIC_TYPE_TMP_BUFFER );
10431043#endif
1044- return -1 ;
1044+ return WOLFSSL_FATAL_ERROR ;
10451045 }
10461046 }
10471047
@@ -1051,7 +1051,7 @@ static int SwapLists(WOLFSSL_CRL* crl)
10511051#ifdef WOLFSSL_SMALL_STACK
10521052 XFREE (tmp , NULL , DYNAMIC_TYPE_TMP_BUFFER );
10531053#endif
1054- return -1 ;
1054+ return WOLFSSL_FATAL_ERROR ;
10551055 }
10561056
10571057 newList = tmp -> crlList ;
@@ -1103,7 +1103,7 @@ static int StopMonitor(wolfSSL_CRL_mfd_t mfd)
11031103 EV_SET (& change , CRL_CUSTOM_FD , EVFILT_USER , 0 , NOTE_TRIGGER , 0 , NULL );
11041104 if (kevent (mfd , & change , 1 , NULL , 0 , NULL ) < 0 ) {
11051105 WOLFSSL_MSG ("kevent trigger customer event failed" );
1106- return -1 ;
1106+ return WOLFSSL_FATAL_ERROR ;
11071107 }
11081108
11091109 return 0 ;
@@ -1235,7 +1235,7 @@ static int StopMonitor(wolfSSL_CRL_mfd_t mfd)
12351235 /* write to our custom event */
12361236 if (write (mfd , & w64 , sizeof (w64 )) < 0 ) {
12371237 WOLFSSL_MSG ("StopMonitor write failed" );
1238- return -1 ;
1238+ return WOLFSSL_FATAL_ERROR ;
12391239 }
12401240
12411241 return 0 ;
@@ -1378,7 +1378,7 @@ static int StopMonitor(wolfSSL_CRL_mfd_t mfd)
13781378{
13791379 if (SetEvent (mfd ) == 0 ) {
13801380 WOLFSSL_MSG ("SetEvent custom event trigger failed" );
1381- return -1 ;
1381+ return WOLFSSL_FATAL_ERROR ;
13821382 }
13831383 return 0 ;
13841384}
0 commit comments