On Fri, May 19, 2000, Richard Levitte - VMS Whacker wrote:
> From: Claus Assmann <[EMAIL PROTECTED]>

> ca+ssl> ! According to the SSL/TLS standard, the first 2 bytes of that secret
> ca+ssl> ! should be the protocol version. Since CgatePro insists on TLSv0 (aka
> ca+ssl> ! SSL 3.0), the OpenSSL correctly switches to that protocol. But - forgets
> ca+ssl> ! about it in the premaster secret: the first 2 bytes there show "3" "1",
> ca+ssl> ! instead of "3" "0".

> To begin with, whic OpenSSL versoin was used?  You may have written
> that before, but I can't find that info.

0.9.5a (always the latest release...)

> Anyway, I'm a bit surprised you get that result, because looking at
> lines 567 and 568 in s3_pkt.c (in the current development snapshot),
> but the major and minor version number are copied from the SSL
> structure given to do_ssl3_write().  So basically, it would mean that
> if the version number was correct before the key exchange, it was
> somehow changed to 0x0300 sometime before that.
> 
> What you can do, if you'd like, is to debug the program and look at
> the SSL structure that is passed to do_ssl3_write(), or trace all

At that place, the version number is 3 0 (as it should be).

> BTW, the starttls command is unknown to me, but then again, I may have
> missed something...

It's a patch by someone (sorry, forget his name) to emulate SMTP
STARTTLS. It is very handy... Here's the log (I haven't yet figured
out where the pre-master secret is).

depth=0 /O=Stalker Software 
[EMAIL PROTECTED]
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /O=Stalker Software 
[EMAIL PROTECTED]
verify error:num=27:certificate not trusted
verify return:1
depth=0 /O=Stalker Software 
[EMAIL PROTECTED]
verify error:num=21:unable to verify the first certificate
verify return:1
63218:error:140943F2:SSL routines:SSL3_READ_BYTES:sslv3 alert unexpected 
message:s3_pkt.c:956:SSL alert number 10
63218:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:216:
CONNECTED(00000004)
read from 0810D1C0 [08119000] (8192 bytes => 50 (0x32))
0000 - 32 32 30 20 6d 61 69 6c-2e 73 74 61 6c 6b 65 72   220 mail.stalker
0010 - 2e 63 6f 6d 20 45 53 4d-54 50 20 43 6f 6d 6d 75   .com ESMTP Commu
0020 - 6e 69 47 61 74 65 20 50-72 6f 20 33 2e 33 62 36   niGate Pro 3.3b6
0030 - 0d 0a                                             ..
write to 0810D1C0 [BFBFC96C] (10 bytes => 10 (0xA))
0000 - 53 54 41 52 54 54 4c 53-0d 0a                     STARTTLS..
read from 0810D1C0 [08117000] (8192 bytes => 35 (0x23))
0000 - 32 32 30 20 70 6c 65 61-73 65 20 73 74 61 72 74   220 please start
0010 - 20 61 20 54 4c 53 20 63-6f 6e 6e 65 63 74 69 6f    a TLS connectio
0020 - 6e 0d 0a                                          n..
write to 0810D1C0 [08123000] (114 bytes => 114 (0x72))
0000 - 80 70 01 03 01 00 57 00-00 00 10 00 00 16 00 00   .p....W.........
0010 - 13 00 00 0a 07 00 c0 00-00 66 00 00 07 00 00 05   .........f......
0020 - 00 00 04 05 00 80 03 00-80 01 00 80 08 00 80 00   ................
0030 - 00 65 00 00 64 00 00 63-00 00 62 00 00 61 00 00   .e..d..c..b..a..
0040 - 60 00 00 15 00 00 12 00-00 09 06 00 40 00 00 14   `...........@...
0050 - 00 00 11 00 00 08 00 00-06 00 00 03 04 00 80 02   ................
0060 - 00 80 40 5c e8 86 c5 f4-9e d7 bb 83 a3 51 34 b6   ..@\.........Q4.
0070 - ed 5a                                             .Z
read from 0810D1C0 [08129000] (7 bytes => 7 (0x7))
0000 - 16 03 00 00 4a 02                                 ....J.
0007 - <SPACES/NULS>
read from 0810D1C0 [08129007] (72 bytes => 72 (0x48))
0000 - 00 46 03 00 39 48 6c 5b-30 30 30 30 60 a0 d1 e9   .F..9Hl[0000`...
0010 - b8 a0 d1 39 aa 41 d0 10-0f 0f 0f 9c 9b af e2 e0   ...9.A..........
0020 - 17 e9 41 41 20 39 21 6c-5b 55 55 55 55 55 55 55   ..AA 9!l[UUUUUUU
0030 - 55 55 55 55 55 55 55 55-55 55 55 55 55 55 55 55   UUUUUUUUUUUUUUUU
0040 - 55 55 55 55 55 00 05                              UUUUU..
0048 - <SPACES/NULS>
read from 0810D1C0 [08129000] (5 bytes => 5 (0x5))
0000 - 16 03 00 02 27                                    ....'
read from 0810D1C0 [08129005] (551 bytes => 551 (0x227))
0000 - 0b 00 02 23 00 02 20 00-02 1d 30 82 02 19 30 82   ...#.. ...0...0.
0010 - 01 c3 02 04 1c 8f f6 ee-30 0d 06 09 2a 86 48 86   ........0...*.H.
0020 - f7 0d 01 01 04 05 00 30-81 a9 31 1f 30 1d 06 03   .......0..1.0...
0030 - 55 04 0a 13 16 53 74 61-6c 6b 65 72 20 53 6f 66   U....Stalker Sof
0040 - 74 77 61 72 65 2c 20 49-6e 63 2e 31 0b 30 09 06   tware, Inc.1.0..
0050 - 03 55 04 06 13 02 55 53-31 0b 30 09 06 03 55 04   .U....US1.0...U.
0060 - 08 13 02 43 41 31 14 30-12 06 03 55 04 07 13 0b   ...CA1.0...U....
0070 - 4d 69 6c 6c 20 56 61 6c-6c 65 79 31 18 30 16 06   Mill Valley1.0..
0080 - 03 55 04 0b 13 0f 43 6f-6d 6d 75 6e 69 47 61 74   .U....CommuniGat
0090 - 65 20 50 72 6f 31 14 30-12 06 03 55 04 03 13 0b   e Pro1.0...U....
00a0 - 73 74 61 6c 6b 65 72 2e-63 6f 6d 31 26 30 24 06   stalker.com1&0$.
00b0 - 09 2a 86 48 86 f7 0d 01-09 01 16 17 63 67 70 2d   .*.H........cgp-
00c0 - 73 75 70 70 6f 72 74 40-73 74 61 6c 6b 65 72 2e   support@stalker.
00d0 - 63 6f 6d 30 1e 17 0d 30-30 30 35 31 35 31 32 33   com0...000515123
00e0 - 30 32 31 5a 17 0d 30 30-30 36 31 34 31 32 33 30   021Z..0006141230
00f0 - 32 31 5a 30 81 81 31 22-30 20 06 03 55 04 0a 13   21Z0..1"0 ..U...
0100 - 19 53 74 61 6c 6b 65 72-20 53 6f 66 74 77 61 72   .Stalker Softwar
0110 - 65 20 43 75 73 74 6f 6d-65 72 31 14 30 12 06 03   e Customer1.0...
0120 - 55 04 0b 13 0b 42 65 74-61 2d 74 65 73 74 65 72   U....Beta-tester
0130 - 31 19 30 17 06 03 55 04-03 13 10 6d 61 69 6c 2e   1.0...U....mail.
0140 - 73 74 61 6c 6b 65 72 2e-63 6f 6d 31 2a 30 28 06   stalker.com1*0(.
0150 - 09 2a 86 48 86 f7 0d 01-09 01 16 1b 70 6f 73 74   .*.H........post
0160 - 6d 61 73 74 65 72 40 6d-61 69 6c 2e 73 74 61 6c   [EMAIL PROTECTED]
0170 - 6b 65 72 2e 63 6f 6d 30-5c 30 0d 06 09 2a 86 48   ker.com0\0...*.H
0180 - 86 f7 0d 01 01 01 05 00-03 4b 00 30 48 02 41 00   .........K.0H.A.
0190 - be fe 6a dc b7 4b 58 81-03 ff b2 c6 3c 6f e2 ad   ..j..KX.....<o..
01a0 - 4c 51 37 75 92 33 70 2f-89 58 29 ba 73 ce 59 82   LQ7u.3p/.X).s.Y.
01b0 - e5 b7 9a 41 77 90 d9 19-86 31 35 d4 fa 60 ef ba   ...Aw....15..`..
01c0 - a2 2d 8d 51 ce 2b 70 ef-3c ae e5 4d c4 86 7e d5   .-.Q.+p.<..M..~.
01d0 - 02 03 01 00 01 30 0d 06-09 2a 86 48 86 f7 0d 01   .....0...*.H....
01e0 - 01 04 05 00 03 41 00 72-ed ad ff b9 c6 b0 3a 4e   .....A.r......:N
01f0 - 8d 99 24 e3 94 56 49 33-66 11 6b a3 12 f1 5d d4   ..$..VI3f.k...].
0200 - 0c 20 75 5b 26 02 78 f8-7f e4 b3 fb b4 dc 1d cb   . u[&.x.........
0210 - 8a 8b b9 c2 3f 25 87 18-ef 24 4c 3b 38 57 66 d6   ....?%...$L;8Wf.
0220 - af 05 ab c9 a6 3e 97                              .....>.
read from 0810D1C0 [08129000] (5 bytes => 5 (0x5))
0000 - 16 03 00 00 04                                    .....
read from 0810D1C0 [08129005] (4 bytes => 4 (0x4))
0000 - 0e                                                .
0004 - <SPACES/NULS>
write to 0810D1C0 [0811C800] (73 bytes => 73 (0x49))
0000 - 16 03 00 00 44 10 00 00-40 99 6d d2 4f b5 06 68   ....D...@.m.O..h
0010 - d6 25 7b 85 44 b6 6a 21-dc 38 1a 01 b8 e8 ee 39   .%{.D.j!.8.....9
0020 - 2f 23 b9 a7 b5 82 5b 5e-f8 c8 93 22 f9 dd ae 4b   /#....[^..."...K
0030 - 0d aa 9b a9 13 a4 8d db-6e 91 90 3e 5f 77 80 60   ........n..>_w.`
0040 - 41 d5 b3 cb 8c 57 a5 79-3f                        A....W.y?
write to 0810D1C0 [0811C800] (6 bytes => 6 (0x6))
0000 - 14 03 00 00 01 01                                 ......
write to 0810D1C0 [0811C800] (65 bytes => 65 (0x41))
0000 - 16 03 00 00 3c 11 ab 34-4f c9 31 2d 61 b8 57 55   ....<..4O.1-a.WU
0010 - a0 39 47 e3 70 73 8c 68-bd ec 82 cc 7e d7 ac db   .9G.ps.h....~...
0020 - 1a 6b 31 55 a1 d6 88 28-b6 23 d9 10 72 e5 87 6d   .k1U...(.#..r..m
0030 - b5 23 a3 27 45 63 63 81-93 20 ac 3c 9e 3c cb 3a   .#.'Ecc.. .<.<.:
0040 - 79                                                y
read from 0810D1C0 [08129000] (5 bytes => 5 (0x5))
0000 - 15 03 00 00 02                                    .....
read from 0810D1C0 [08129005] (2 bytes => 2 (0x2))
0000 - 02 0a                                             ..

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to