Ok, I am officially stuck.  I have tried everything I can think of and on one 
Moxa
I still get a segmentation fault  when I run msmtp with tls=on.

ntlmdomain            = (not set)
tls                   = on
tls_starttls          = on
tls_trust_file        = (not set)
tls_crl_file          = (not set)
tls_fingerprint       = (not set)
tls_key_file          = (not set)
tls_cert_file         = (not set)
tls_certcheck         = off
tls_force_sslv3       = off
tls_min_dh_prime_bits = (not set)
tls_priorities        = (not set)
auto_from             = off
maildomain            = (not set)
from                  = default
dsn_notify            = (not set)
dsn_return            = (not set)
keepbcc               = off
logfile               = (not set)
syslog                = (not set)
aliases               = (not set)
reading recipients from the command line and the mail
Segmentation fault
root@Moxa:/usr/local/bin/logger# 

The problem Moxa unit was an upgrade to one that works Ok, I

have examined the locations of openssl files on the two machines and they look 
to be the same

location and same versions.

Figuring it to be an oepnssl problem I decided to try to cross compile openssl, 
I downloaded the latest version and then:
export PATH=$PATH:/usr/local/xscale_be/bin
export cross=xscale-linux-
./Configure dist
make CC="${cross}gcc" AR="${cross}ar r" RANLIB="${cross}ranlib"

That seems to configure and make / cross compile without errors and I get:
libcrypto.a
libssl.a
libcrypto.pc
libssl.pc

I edited the .pc files to point to the correct locations

-----------------------------------------------
prefix=/usr/local/xscale_be/ssl
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenSSL-libcrypto
Description: OpenSSL cryptography library
Version: 1.0.1c
Requires: 
Libs: -L${libdir} -lcrypto
Libs.private: 
Cflags: -I${includedir} 
-----------------------------------------------

Created the folders needed
# mkdir /usr/local/xscale_be/ssl
# mkdir /usr/local/xscale_be/ssl/lib
# mkdir /usr/local/xscale_be/ssl/include
# mkdir /usr/local/xscale_be/ssl/lib/pkgconfig

Copied the files to the new folders
# cp /home/bryan/Desktop/openssl-1.0.1c/libcrypto.a /usr/local/xscale_be/ssl
# cp /home/bryan/Desktop/openssl-1.0.1c/libssl.a /usr/local/xscale_be/ssl
# cp /home/bryan/Desktop/openssl-1.0.1c/libcrypto.pc 
/usr/local/xscale_be/ssl/lib/pkgconfig
# cp /home/bryan/Desktop/openssl-1.0.1c/libssl.pc 
/usr/local/xscale_be/ssl/lib/pkgconfig
# cp -r /home/bryan/Desktop/openssl-1.0.1c/include/openssl/* 
/usr/local/xscale_be/ssl/include

The bit I am stuck on is how to get msmtp configure to use the cross compiled 
openssl. 
I know that they haven't been used because msmtp file size is still around 225K.

This bit really shows the holes in my knowledge, I tried
./configure libssl_LIBS=-L/usr/local/xscale_be/ssl --with-ssl=openssl 
--with-libidn=no --host=xscale-linux

but that throws out all kinds of errors near the end of make.
  CC     md5-apps.o
  CCLD   msmtp
tls.o(.text+0x24): In function `seed_prng':
/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:96: undefined reference to 
`RAND_status'
tls.o(.text+0x50):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:98: undefined 
reference to `RAND_file_name'
tls.o(.text+0x68):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:104: undefined 
reference to `RAND_load_file'
tls.o(.text+0x90):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:117: undefined 
reference to `RAND_seed'
tls.o(.text+0x94):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:120: undefined 
reference to `RAND_status'
tls.o(.text+0xa0):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:131: undefined 
reference to `RAND_status'
tls.o(.text+0xb0):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:139: undefined 
reference to `RAND_write_file'
tls.o(.text+0xf0):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:126: undefined 
reference to `RAND_seed'
tls.o(.text+0xf4):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:127: undefined 
reference to `RAND_status'
tls.o(.text+0x188): In function `tls_lib_init':
/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:169: undefined reference to 
`SSL_load_error_strings'
tls.o(.text+0x18c):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:170: undefined 
reference to `SSL_library_init'
tls.o(.text+0x608): In function `tls_cert_info_get':
/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:489: undefined reference to 
`SSL_get_peer_certificate'
tls.o(.text+0x618):/home/bryan/Desktop/msmtp-1.4.28/src/tls.c:494: undefined 
reference to `X509_get_subject_name'
Plus a lot more

Can anybody give me a pointer to how to get msmtp to use the cross compiled 
libssl.a and libssl.a

Thanks

Bryan                                     
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
msmtp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msmtp-users

Reply via email to