openssl 1.1.1 debugging

2021-06-24 Thread david raingeard
hello

is it possible to have some kind of debug server which will always use the
same data, so i can debug the code ?

i mean i have openssl working with tls 1.3 and ssl3 on unbuntu, which i
could compare the logs with the ones on the sparc, so i can find out where
it goes wrong ?

thank you


Re: openssl 1.1.1k on solaris 2.6 sparc

2021-06-24 Thread Jeff Wieland

Michael Wojcik wrote:

From: openssl-users  On Behalf Of david 
raingeard
Sent: Thursday, 24 June, 2021 07:06
I compiled it using sun compiler, with some modifications to the source code.

If memory serves, OpenSSL doesn't work on Solaris SPARC if built using the Sun 
compiler. You have to use GCC. I'm pretty sure we discovered this in our SPARC 
product builds.

This, and some other platform issues (there's one with GCC optimization on x86 
64-bit, the details of which escape me now), are things I keep hoping to find 
time to dig into, but more-pressing work never seems to ease up.

--
Michael Wojcik


You can build it on Solaris 10 SPARC, using Studio 12.2 for 32 bit, and
Studio 12.4 for 64 bit.  Make sure that these are fully patched up.

--
Jeff Wieland, UNIX Systems Administrator
Purdue University IT Infrastructure Services UNIX Platforms



RE: openssl 1.1.1k on solaris 2.6 sparc

2021-06-24 Thread Michael Wojcik
> From: openssl-users  On Behalf Of david 
> raingeard
> Sent: Thursday, 24 June, 2021 07:06

> I compiled it using sun compiler, with some modifications to the source code.

If memory serves, OpenSSL doesn't work on Solaris SPARC if built using the Sun 
compiler. You have to use GCC. I'm pretty sure we discovered this in our SPARC 
product builds.

This, and some other platform issues (there's one with GCC optimization on x86 
64-bit, the details of which escape me now), are things I keep hoping to find 
time to dig into, but more-pressing work never seems to ease up.

--
Michael Wojcik


openssl 1.1.1k on solaris 2.6 sparc

2021-06-24 Thread david raingeard
Hello,

I compiled it using sun compiler, with some modifications to the source
code.

However :)

 openssl s_client -connect google.com:443 -tls1_2

works fine !

But
  openssl s_client -connect google.com:443 -tls1_3

fails on CRYPTO_memcmp.

For easy debugging, I have made a copy of  CRYPTO_memcmp in gcm128,
called CRYPTO_gcm128_memcmp.

Here is what I get (added some log 😅). As you can see, ctx->Xi.c and tag
don't match.

I have looked for hours to find why, with no luck yet.
Any idea how to debug this ? Some tests to run to check if everything is ok
?


crypto/modes/gcm128.c:1931 ctx->EK0.u[0]=a2e1d0203e9a02ca
crypto/modes/gcm128.c:1932 ctx->EK0.u[1]=9fc11c97afde22db
crypto/modes/gcm128.c:1933 ctx->Xi.u[0]=a22699a2cb77c69d
crypto/modes/gcm128.c:1934 ctx->Xi.u[1]=5af190e82eeffaf3
crypto/modes/gcm128.c:1937 after xor:
crypto/modes/gcm128.c:1938 ctx->Xi.u[0]=c74982f5edc457
crypto/modes/gcm128.c:1939 ctx->Xi.u[1]=c5308c7f8131d828
crypto/modes/gcm128.c:1941
crypto/modes/gcm128.c:1834 CRYPTO_gcm128_memcmp
len=16
00^a7
c7^c1
49^4d
82^51
f5^0b
ed^25
c4^ae
57^26
c5^d2
30^66
8c^33
7f^82
81^0f
31^75
d8^a4
28^e0
crypto/modes/gcm128.c:1842 CRYPTO_gcm128_memcmp
crypto/modes/gcm128.c:1957 ret = 255