Inconsisten declaration of ssh_aes_ctr_iv()

Iain Morgan imorgan at nas.nasa.gov
Tue Jan 15 05:55:48 EST 2013


Hi,

The 20130110 snapshot fails to build against OpenSSL 0.9.8 and 1.0.0
with the following error:

gcc -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -fno-builtin-memset -fstack-protector-all  -I. -I.  -DSSHDIR=\"/tmp/foo/etc\" -D_PATH_SSH_PROGRAM=\"/tmp/foo/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/tmp/foo/libexec/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/tmp/foo/libexec/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/tmp/foo/libexec/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/tmp/foo/libexec/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\"  -DHAVE_CONFIG_H -c cipher-ctr.c
cipher-ctr.c:38: error: conflicting types for ‘ssh_aes_ctr_iv’
openbsd-compat/openssl-compat.h:71: note: previous declaration of ‘ssh_aes_ctr_iv’ was here
cipher-ctr.c:117: error: conflicting types for ‘ssh_aes_ctr_iv’
openbsd-compat/openssl-compat.h:71: note: previous declaration of ‘ssh_aes_ctr_iv’ was here
cipher-ctr.c: In function ‘evp_aes_128_ctr’:
cipher-ctr.c:141: warning: assignment from incompatible pointer type
make: *** [cipher-ctr.o] Error 1

The following trivial patch addresses the compilation error, but does
not address an the incompatible pointer warning which is encountered at
line 141. (Note that there are similar warnings with cipher-bf1.c and
cipher-3des.c.)

Index: openbsd-compat/openssl-compat.h
===================================================================
RCS file: /cvs/openssh/openbsd-compat/openssl-compat.h,v
retrieving revision 1.21
diff -u -r1.21 openssl-compat.h
--- openbsd-compat/openssl-compat.h	9 Jan 2013 05:42:49 -0000	1.21
+++ openbsd-compat/openssl-compat.h	14 Jan 2013 18:39:27 -0000
@@ -68,7 +68,7 @@
 #define EVP_aes_192_ctr evp_aes_128_ctr
 #define EVP_aes_256_ctr evp_aes_128_ctr
 extern const EVP_CIPHER *evp_aes_128_ctr(void);
-extern void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
+extern void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
 #endif
 
 /* Avoid some #ifdef. Code that uses these is unreachable without GCM */

-- 
Iain Morgan


More information about the openssh-unix-dev mailing list