Dear OpenSSL Users,
This is my first interaction in this community.
While am trying to build the latest openssl-1.0.2r code on CE-X86 platform, it fails with the below error:
rsa_pk1.c
.\crypto\rsa\rsa_pk1.c(296) : warning C4761: integral size mismatch in argument
conversion supplied
.\crypto\rsa\rsa_pk1.c(296) : error C2220: warning treated as error - no object
file generated
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
The below is the failing line (Line# 296) in rsa_pk1.c
to[i] = constant_time_select_8(mask, from[i], to[i]);
(Here the second parameter takes a unsigned char data type while the passed one is a
const unsigned char )
Can I fix this just by type casting to unsigned char using a Perl patch? Is there a better way to fix this?
NOTE:
- The above line doesn’t exist in older code (1.0.2.q) and so no issues on older builds.
- This new code builds fine on CE-Arm, CE-Shx, NT-VS10, NT-VS15 platforms however fails on CE-X86 platform alone and that too because of the warning.
- We need to fix this warning and can’t simply use something like Treat Warnings as Errors to No.
- There seems to be similar other occurrences in other files which could also flag warning (For instance, s3_cbc.c).
Please advise.
Thank you,
Ashwin