[OpenSSL-1.0.2] TNF local patch - integer type portability and backward compatibility

Issue #157 wontfix
Takehiko NOZAKI repo owner created an issue

original commit messages - TBD

Comments (4)

  1. Takehiko NOZAKI reporter
    diff --exclude=CVS -upNr openssl-1.0.2k/crypto/rc2/rc2.h src/crypto/external/bsd/openssl/dist/crypto/rc2/rc2.h
    --- openssl-1.0.2k/crypto/rc2/rc2.h     2017-01-26 22:22:03.000000000 +0900
    +++ src/crypto/external/bsd/openssl/dist/crypto/rc2/rc2.h       2015-03-23 19:22:48.000000000 +0900
    @@ -70,6 +70,8 @@
     # define RC2_BLOCK       8
     # define RC2_KEY_LENGTH  16
    
    +# include <sys/types.h>
    +
     #ifdef  __cplusplus
     extern "C" {
     #endif
    @@ -85,8 +87,8 @@ void private_RC2_set_key(RC2_KEY *key, i
     void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits);
     void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out,
                          RC2_KEY *key, int enc);
    -void RC2_encrypt(unsigned long *data, RC2_KEY *key);
    -void RC2_decrypt(unsigned long *data, RC2_KEY *key);
    +void RC2_encrypt(uint32_t *data, RC2_KEY *key);
    +void RC2_decrypt(uint32_t *data, RC2_KEY *key);
     void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
                          RC2_KEY *ks, unsigned char *iv, int enc);
     void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out,
    

    this change breaks source level compatibility with other operating system, NAK.

  2. Takehiko NOZAKI reporter
    diff --exclude=CVS -upNr openssl-1.0.2k/crypto/rc5/rc5.h src/crypto/external/bsd/openssl/dist/crypto/rc5/rc5.h
    --- openssl-1.0.2k/crypto/rc5/rc5.h     2017-01-26 22:22:03.000000000 +0900
    +++ src/crypto/external/bsd/openssl/dist/crypto/rc5/rc5.h       2015-03-23 19:22:48.000000000 +0900
    @@ -72,8 +72,13 @@ extern "C" {
     # define RC5_ENCRYPT     1
     # define RC5_DECRYPT     0
    
    +# ifndef __NetBSD__
     /* 32 bit.  For Alpha, things may get weird */
    -# define RC5_32_INT unsigned long
    +#  define RC5_32_INT unsigned long
    +# else
    +#  include <sys/types.h>
    +#  define RC5_32_INT uint32_t
    +# endif
    
     # define RC5_32_BLOCK            8
     # define RC5_32_KEY_LENGTH       16/* This is a default, max is 255 */
    @@ -96,8 +101,8 @@ void RC5_32_set_key(RC5_32_KEY *key, int
                         int rounds);
     void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out,
                             RC5_32_KEY *key, int enc);
    -void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key);
    -void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key);
    +void RC5_32_encrypt(RC5_32_INT *data, RC5_32_KEY *key);
    +void RC5_32_decrypt(RC5_32_INT *data, RC5_32_KEY *key);
     void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out,
                             long length, RC5_32_KEY *ks, unsigned char *iv,
                             int enc);
    

    same as RC2. this change breaks source level compatibility with other operating system, NAK.

  3. Takehiko NOZAKI reporter
    diff --exclude=CVS -upNr openssl-1.0.2k/crypto/idea/idea.h src/crypto/external/bsd/openssl/dist/crypto/idea/idea.h
    --- openssl-1.0.2k/crypto/idea/idea.h   2017-01-26 22:22:03.000000000 +0900
    +++ src/crypto/external/bsd/openssl/dist/crypto/idea/idea.h     2015-03-23 19:22:47.000000000 +0900
    @@ -65,6 +65,8 @@
     #  error IDEA is disabled.
     # endif
    
    +# include <sys/types.h>
    +
     # define IDEA_ENCRYPT    1
     # define IDEA_DECRYPT    0
    
    @@ -97,7 +99,7 @@ void idea_cfb64_encrypt(const unsigned c
     void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out,
                             long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,
                             int *num);
    -void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks);
    +void idea_encrypt(IDEA_INT *in, IDEA_KEY_SCHEDULE *ks);
     #ifdef  __cplusplus
     }
     #endif
    

    ditto, this change breaks source level compatibility with other operating system, NAK.

  4. Log in to comment