@@ -6762,6 +6762,10 @@ void wolfSSL_EVP_init(void)
67626762 if (enc == 0 || enc == 1 )
67636763 ctx -> enc = enc ? 1 : 0 ;
67646764 if (key ) {
6765+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
6766+ if (ret != 0 )
6767+ return WOLFSSL_FAILURE ;
6768+
67656769 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
67666770 iv , ctx -> enc ? AES_ENCRYPTION : AES_DECRYPTION , 0 );
67676771 if (ret != 0 )
@@ -7034,6 +7038,10 @@ void wolfSSL_EVP_init(void)
70347038 if (enc == 0 || enc == 1 )
70357039 ctx -> enc = enc ? 1 : 0 ;
70367040 if (key ) {
7041+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7042+ if (ret != 0 )
7043+ return WOLFSSL_FAILURE ;
7044+
70377045 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
70387046 iv , AES_ENCRYPTION , 0 );
70397047 if (ret != 0 )
@@ -7058,6 +7066,10 @@ void wolfSSL_EVP_init(void)
70587066 if (enc == 0 || enc == 1 )
70597067 ctx -> enc = enc ? 1 : 0 ;
70607068 if (key ) {
7069+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7070+ if (ret != 0 )
7071+ return WOLFSSL_FAILURE ;
7072+
70617073 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
70627074 iv , AES_ENCRYPTION , 0 );
70637075 if (ret != 0 )
@@ -7082,6 +7094,10 @@ void wolfSSL_EVP_init(void)
70827094 if (enc == 0 || enc == 1 )
70837095 ctx -> enc = enc ? 1 : 0 ;
70847096 if (key ) {
7097+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7098+ if (ret != 0 )
7099+ return WOLFSSL_FAILURE ;
7100+
70857101 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
70867102 iv , AES_ENCRYPTION , 0 );
70877103 if (ret != 0 ){
@@ -7110,6 +7126,10 @@ void wolfSSL_EVP_init(void)
71107126 if (enc == 0 || enc == 1 )
71117127 ctx -> enc = enc ? 1 : 0 ;
71127128 if (key ) {
7129+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7130+ if (ret != 0 )
7131+ return WOLFSSL_FAILURE ;
7132+
71137133 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
71147134 iv , AES_ENCRYPTION , 0 );
71157135 if (ret != 0 )
@@ -7134,6 +7154,10 @@ void wolfSSL_EVP_init(void)
71347154 if (enc == 0 || enc == 1 )
71357155 ctx -> enc = enc ? 1 : 0 ;
71367156 if (key ) {
7157+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7158+ if (ret != 0 )
7159+ return WOLFSSL_FAILURE ;
7160+
71377161 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
71387162 iv , AES_ENCRYPTION , 0 );
71397163 if (ret != 0 )
@@ -7158,6 +7182,10 @@ void wolfSSL_EVP_init(void)
71587182 if (enc == 0 || enc == 1 )
71597183 ctx -> enc = enc ? 1 : 0 ;
71607184 if (key ) {
7185+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7186+ if (ret != 0 )
7187+ return WOLFSSL_FAILURE ;
7188+
71617189 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
71627190 iv , AES_ENCRYPTION , 0 );
71637191 if (ret != 0 ){
@@ -7186,6 +7214,10 @@ void wolfSSL_EVP_init(void)
71867214 if (enc == 0 || enc == 1 )
71877215 ctx -> enc = enc ? 1 : 0 ;
71887216 if (key ) {
7217+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7218+ if (ret != 0 )
7219+ return WOLFSSL_FAILURE ;
7220+
71897221 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
71907222 iv , AES_ENCRYPTION , 0 );
71917223 if (ret != 0 )
@@ -7210,6 +7242,10 @@ void wolfSSL_EVP_init(void)
72107242 if (enc == 0 || enc == 1 )
72117243 ctx -> enc = enc ? 1 : 0 ;
72127244 if (key ) {
7245+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7246+ if (ret != 0 )
7247+ return WOLFSSL_FAILURE ;
7248+
72137249 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
72147250 iv , AES_ENCRYPTION , 0 );
72157251 if (ret != 0 )
@@ -7234,6 +7270,10 @@ void wolfSSL_EVP_init(void)
72347270 if (enc == 0 || enc == 1 )
72357271 ctx -> enc = enc ? 1 : 0 ;
72367272 if (key ) {
7273+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7274+ if (ret != 0 )
7275+ return WOLFSSL_FAILURE ;
7276+
72377277 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
72387278 iv , AES_ENCRYPTION , 0 );
72397279 if (ret != 0 ){
@@ -7264,6 +7304,10 @@ void wolfSSL_EVP_init(void)
72647304 if (enc == 0 || enc == 1 )
72657305 ctx -> enc = enc ? 1 : 0 ;
72667306 if (key ) {
7307+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7308+ if (ret != 0 )
7309+ return WOLFSSL_FAILURE ;
7310+
72677311 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
72687312 iv , AES_ENCRYPTION , 0 );
72697313 if (ret != 0 )
@@ -7288,6 +7332,10 @@ void wolfSSL_EVP_init(void)
72887332 if (enc == 0 || enc == 1 )
72897333 ctx -> enc = enc ? 1 : 0 ;
72907334 if (key ) {
7335+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7336+ if (ret != 0 )
7337+ return WOLFSSL_FAILURE ;
7338+
72917339 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
72927340 iv , AES_ENCRYPTION , 0 );
72937341 if (ret != 0 )
@@ -7312,6 +7360,10 @@ void wolfSSL_EVP_init(void)
73127360 if (enc == 0 || enc == 1 )
73137361 ctx -> enc = enc ? 1 : 0 ;
73147362 if (key ) {
7363+ ret = wc_AesInit (& ctx -> cipher .aes , NULL , INVALID_DEVID );
7364+ if (ret != 0 )
7365+ return WOLFSSL_FAILURE ;
7366+
73157367 ret = AesSetKey_ex (& ctx -> cipher .aes , key , (word32 )ctx -> keyLen ,
73167368 iv , AES_ENCRYPTION , 0 );
73177369 if (ret != 0 ){
0 commit comments