@@ -105,11 +105,6 @@ THREAD_RETURN WOLFSSL_THREAD echoserver_test(void* args)
105105 int argc = ((func_args * )args )-> argc ;
106106 char * * argv = ((func_args * )args )-> argv ;
107107 char buffer [WOLFSSL_MAX_ERROR_SZ ];
108- #ifdef WOLFSSL_PEM_TO_DER
109- int filetype = WOLFSSL_FILETYPE_PEM ;
110- #else
111- int filetype = WOLFSSL_FILETYPE_ASN1 ;
112- #endif
113108#ifdef HAVE_TEST_SESSION_TICKET
114109 MyTicketCtx myTicketCtx ;
115110#endif
@@ -185,12 +180,12 @@ THREAD_RETURN WOLFSSL_THREAD echoserver_test(void* args)
185180 if (doPSK == 0 ) {
186181 #if defined(HAVE_ECC ) && !defined(WOLFSSL_SNIFFER )
187182 /* ecc */
188- if (wolfSSL_CTX_use_certificate_file (ctx , eccCertFile , filetype )
183+ if (wolfSSL_CTX_use_certificate_file (ctx , eccCertFile , CERT_FILETYPE )
189184 != WOLFSSL_SUCCESS )
190185 err_sys ("can't load server cert file, "
191186 "Please run from wolfSSL home dir" );
192187
193- if (wolfSSL_CTX_use_PrivateKey_file (ctx , eccKeyFile , filetype )
188+ if (wolfSSL_CTX_use_PrivateKey_file (ctx , eccKeyFile , CERT_FILETYPE )
194189 != WOLFSSL_SUCCESS )
195190 err_sys ("can't load server key file, "
196191 "Please run from wolfSSL home dir" );
@@ -201,7 +196,7 @@ THREAD_RETURN WOLFSSL_THREAD echoserver_test(void* args)
201196 err_sys ("can't load server cert file, "
202197 "Please run from wolfSSL home dir" );
203198
204- if (wolfSSL_CTX_use_PrivateKey_file (ctx , edKeyFile , filetype )
199+ if (wolfSSL_CTX_use_PrivateKey_file (ctx , edKeyFile , CERT_FILETYPE )
205200 != WOLFSSL_SUCCESS )
206201 err_sys ("can't load server key file, "
207202 "Please run from wolfSSL home dir" );
@@ -213,19 +208,19 @@ THREAD_RETURN WOLFSSL_THREAD echoserver_test(void* args)
213208 "Please run from wolfSSL home dir" );
214209
215210 if (wolfSSL_CTX_use_PrivateKey_file (ctx , ed448KeyFile ,
216- filetype ) != WOLFSSL_SUCCESS )
211+ CERT_FILETYPE ) != WOLFSSL_SUCCESS )
217212 err_sys ("can't load server key file, "
218213 "Please run from wolfSSL home dir" );
219214 #elif defined(NO_CERTS )
220215 /* do nothing, just don't load cert files */
221216 #else
222217 /* normal */
223- if (wolfSSL_CTX_use_certificate_file (ctx , svrCertFile , filetype )
218+ if (wolfSSL_CTX_use_certificate_file (ctx , svrCertFile , CERT_FILETYPE )
224219 != WOLFSSL_SUCCESS )
225220 err_sys ("can't load server cert file, "
226221 "Please run from wolfSSL home dir" );
227222
228- if (wolfSSL_CTX_use_PrivateKey_file (ctx , svrKeyFile , filetype )
223+ if (wolfSSL_CTX_use_PrivateKey_file (ctx , svrKeyFile , CERT_FILETYPE )
229224 != WOLFSSL_SUCCESS )
230225 err_sys ("can't load server key file, "
231226 "Please run from wolfSSL home dir" );
@@ -314,7 +309,7 @@ THREAD_RETURN WOLFSSL_THREAD echoserver_test(void* args)
314309 if (ssl == NULL ) err_sys ("SSL_new failed" );
315310 wolfSSL_set_fd (ssl , clientfd );
316311 #if !defined(NO_FILESYSTEM ) && !defined(NO_DH ) && !defined(NO_ASN )
317- wolfSSL_SetTmpDH_file (ssl , dhParamFile , filetype );
312+ wolfSSL_SetTmpDH_file (ssl , dhParamFile , CERT_FILETYPE );
318313 #elif !defined(NO_DH )
319314 SetDH (ssl ); /* will repick suites with DHE, higher than PSK */
320315 #endif
0 commit comments