Diff for /rpl/src/instructions_c8.c between versions 1.6 and 1.7

version 1.6, 2013/02/27 17:11:41 version 1.7, 2013/03/20 17:11:44
Line 43  instruction_cipher(struct_processus *s_e Line 43  instruction_cipher(struct_processus *s_e
   
     int                             longueur_clef;      int                             longueur_clef;
   
       integer8                        longueur_clef_binaire;
       integer8                        longueur_iv_binaire;
       integer8                        longueur_message;
       integer8                        longueur_message_chiffre;
     integer8                        nombre_cycles;      integer8                        nombre_cycles;
   
     logical1                        encodage;      logical1                        encodage;
Line 51  instruction_cipher(struct_processus *s_e Line 55  instruction_cipher(struct_processus *s_e
   
     logical8                        sel;      logical8                        sel;
   
     long                            longueur_clef_binaire;  
     long                            longueur_iv_binaire;  
     long                            longueur_message;  
   
     struct_liste_chainee            *l_element_courant;      struct_liste_chainee            *l_element_courant;
   
     struct_objet                    *s_objet_argument_1;      struct_objet                    *s_objet_argument_1;
Line 75  instruction_cipher(struct_processus *s_e Line 75  instruction_cipher(struct_processus *s_e
     unsigned char                   *message_chiffre;      unsigned char                   *message_chiffre;
     unsigned char                   *tampon;      unsigned char                   *tampon;
   
     unsigned int                    longueur_message_chiffre;  
   
     if ((*s_etat_processus).affichage_arguments == 'Y')      if ((*s_etat_processus).affichage_arguments == 'Y')
     {      {
         printf("\n  CIPHER ");          printf("\n  CIPHER ");
Line 1474  instruction_cipher(struct_processus *s_e Line 1472  instruction_cipher(struct_processus *s_e
   
     if (generation_clef == d_vrai)      if (generation_clef == d_vrai)
     {      {
         if ((iv = malloc(EVP_CIPHER_iv_length(EVP_chiffrement)          if ((iv = malloc(((size_t) EVP_CIPHER_iv_length(EVP_chiffrement))
                 * sizeof(unsigned char))) == NULL)                  * sizeof(unsigned char))) == NULL)
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
             return;              return;
         }          }
   
         if ((clef = malloc(EVP_CIPHER_key_length(EVP_chiffrement)          if ((clef = malloc(((size_t) EVP_CIPHER_key_length(EVP_chiffrement))
                 * sizeof(unsigned char))) == NULL)                  * sizeof(unsigned char))) == NULL)
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
Line 1490  instruction_cipher(struct_processus *s_e Line 1488  instruction_cipher(struct_processus *s_e
   
         longueur_clef = EVP_BytesToKey(EVP_chiffrement, EVP_sum,          longueur_clef = EVP_BytesToKey(EVP_chiffrement, EVP_sum,
                 (unsigned char *) &sel, (unsigned char *)                  (unsigned char *) &sel, (unsigned char *)
                 (*s_objet_argument_2).objet, longueur_chaine(s_etat_processus,                  (*s_objet_argument_2).objet,
                   (int) longueur_chaine(s_etat_processus,
                 (unsigned char *) (*s_objet_argument_2).objet),                  (unsigned char *) (*s_objet_argument_2).objet),
                 nombre_cycles, clef, iv);                  (int) nombre_cycles, clef, iv);
   
         if (longueur_clef != EVP_CIPHER_key_length(EVP_chiffrement))          if (longueur_clef != EVP_CIPHER_key_length(EVP_chiffrement))
         {          {

Removed from v.1.6  
changed lines
  Added in v.1.7


CVSweb interface <joel.bertrand@systella.fr>