I read through the wapbox.c and found I needed a group called wtls where I 
needed the following parameters in the kannel.conf file

group = wtls
certificate-file = "/usr/local/kannel/etc/my-wap.cert"
privatekey-file =  "/usr/local/kannel/etc/my-wap.key"
privatekey-password = "[xxxx]"


I added this in an UDP ports 9202 and 9203 were up. However when I try to make 
a secure connection I get a coredump.. look at the debug log below (at end of 
message).


What I am doing wrong?

Is there any documentation on how to set-up WTLS on Kannel?

Regards,

Faisal




$ ./wapbox.exe ../kannel/etc/wapkannel.conf
2005-06-21 12:02:55 [248] [0] INFO: Debug_lvl = -1, log_file = <none>, log_lvl 
= 0
2005-06-21 12:02:55 [248] [0] DEBUG: Kannel wapbox version `1.4.0'.
Build `Jun 20 2005 17:19:17', compiler `3.4.4 (cygming special) (gdc 0.12, 
using dmd 0.125)'.
System CYGWIN_NT-5.1, release 1.5.17(0.129/4/2), version 2005-05-25 19:38, 
machine i686.
Hostname ZUK02-5664, IP 192.168.0.6.
Libxml version 2.6.16.
Using WTLS library OpenSSL 0.9.7g 11 Apr 2005.
Using native malloc.

2005-06-21 12:02:55 [248] [0] DEBUG: Dumping Cfg 0x1010e0d0
2005-06-21 12:02:55 [248] [0] DEBUG:   filename = <../kannel/etc/wapkannel.conf>
2005-06-21 12:02:55 [248] [0] DEBUG:   dumping group (wapbox):
2005-06-21 12:02:55 [248] [0] DEBUG:     <log-level> = <0>
2005-06-21 12:02:55 [248] [0] DEBUG:     <log-file> = </tmp/wapbox.log>
2005-06-21 12:02:55 [248] [0] DEBUG:     <bearerbox-host> = <localhost>
2005-06-21 12:02:55 [248] [0] DEBUG:     <group> = <wapbox>
2005-06-21 12:02:55 [248] [0] DEBUG:     <access-log> = </tmp/wapaccess.log>
2005-06-21 12:02:55 [248] [0] DEBUG:     <syslog-level> = <none>
2005-06-21 12:02:55 [248] [0] DEBUG:   dumping group (core):
2005-06-21 12:02:55 [248] [0] DEBUG:     <wapbox-port> = <13002>
2005-06-21 12:02:55 [248] [0] DEBUG:     <log-level> = <1>
2005-06-21 12:02:55 [248] [0] DEBUG:     <log-file> = </tmp/bearerbox.log>
2005-06-21 12:02:55 [248] [0] DEBUG:     <box-allow-ip> = <127.0.0.1>
2005-06-21 12:02:55 [248] [0] DEBUG:     <admin-password> = <bar>
2005-06-21 12:02:55 [248] [0] DEBUG:     <box-deny-ip> = <*.*.*.*>
2005-06-21 12:02:55 [248] [0] DEBUG:     <group> = <core>
2005-06-21 12:02:55 [248] [0] DEBUG:     <wdp-interface-name> = <*>
2005-06-21 12:02:55 [248] [0] DEBUG:     <admin-port> = <13000>
2005-06-21 12:02:55 [248] [0] DEBUG:   dumping group (wtls):
2005-06-21 12:02:55 [248] [0] DEBUG:     <privatekey-file> = 
</usr/local/kannel/etc/my-wap.key>
2005-06-21 12:02:55 [248] [0] DEBUG:     <group> = <wtls>
2005-06-21 12:02:55 [248] [0] DEBUG:     <certificate-file> = 
</usr/local/kannel/etc/my-wap.cert>
2005-06-21 12:02:55 [248] [0] DEBUG:     <privatekey-password> = <XXXX>
2005-06-21 12:02:55 [248] [0] DEBUG: Dump ends.
2005-06-21 12:02:55 [248] [0] DEBUG: map_url_max = -1
2005-06-21 12:02:55 [248] [0] INFO: Added logfile `/tmp/wapbox.log' with level 
`0'.
2005-06-21 12:02:55 [248] [0] INFO: Starting to log to file /tmp/wapbox.log 
level 0
2005-06-21 12:02:55 [248] [0] DEBUG: syslog parameter is none
2005-06-21 12:02:55 [248] [0] INFO: Logging accesses to '/tmp/wapaccess.log'.
2005-06-21 12:02:55 [248] [0] INFO: Started access logfile `/tmp/wapaccess.log'.
2005-06-21 12:02:55 [248] [0] DEBUG: certificate parameter is °#◄►!
2005-06-21 12:02:55 [248] [0] DEBUG: certificate parameter is °#◄►
2005-06-21 12:02:55 [248] [0] INFO: 
------------------------------------------------------------
2005-06-21 12:02:55 [248] [0] INFO: Kannel wapbox version 1.4.0 starting up.
2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 1 
(wap/wsp_session.c:main_thread)
2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 2 
(wap/wsp_unit.c:main_thread)
2005-06-21 12:02:55 [248] [1] DEBUG: Thread 1 (wap/wsp_session.c:main_thread) 
maps to pid 248.
2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 3 
(wap/wsp_push_client.c:main_thread)2005-06-21
12:02:55 [248] [2] DEBUG: Thread 2 (wap/wsp_unit.c:main_thread) maps to pid 248.
2005-06-21 12:02:55 [248] [3] DEBUG: Thread 3 
(wap/wsp_push_client.c:main_thread) maps to pid 248.

2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 4 
(wap/timers.c:watch_timers)
2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 5 
(wap/wtp_resp.c:main_thread)2005-06-21 12:02:5
5 [248] [4] DEBUG: Thread 4 (wap/timers.c:watch_timers) maps to pid 248.
2005-06-21 12:02:55 [248] [5] DEBUG: Thread 5 (wap/wtp_resp.c:main_thread) maps 
to pid 248.

2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 6 
(gw/wap-appl.c:main_thread)
2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 7 
(gw/wap-appl.c:return_replies_thread)2005-06-2
1 12:02:55 [248] [6] DEBUG: Thread 6 (gw/wap-appl.c:main_thread) maps to pid 
248.
2005-06-21 12:02:55 [248] [7] DEBUG: Thread 7 
(gw/wap-appl.c:return_replies_thread) maps to pid 248.


2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 8 
(wap/wtls-secmgr.c:main_thread)
2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 9 
(wap/wtls.c:main_thread)2005-06-21 12:02:55 [2
48] [8] DEBUG: Thread 8 (wap/wtls-secmgr.c:main_thread) maps to pid 248.
2005-06-21 12:02:55 [248] [9] DEBUG: Thread 9 (wap/wtls.c:main_thread) maps to 
pid 248.

2005-06-21 12:02:55 [248] [0] INFO: Connected to bearerbox at localhost port 
13002.
2005-06-21 12:02:55 [248] [0] DEBUG: Started thread 10 
(gw/heartbeat.c:heartbeat_thread)
2005-06-21 12:02:55 [248] [10] DEBUG: Thread 10 
(gw/heartbeat.c:heartbeat_thread) maps to pid 248.
2005-06-21 12:06:26 [248] [0] DEBUG: Msg object at 0x101261c8:
2005-06-21 12:06:26 [248] [0] DEBUG:  type: wdp_datagram
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.source_address:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x10126280:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  9
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 10
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 31 32 37 2e 30 2e 30 2e 31        
                127.
0.0.1
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.source_port: 1938
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.destination_address:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x10126298:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  7
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 8
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 30 2e 30 2e 30 2e 30              
                0.0.
0.0
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.destination_port: 9203
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.user_data:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x101262c0:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  55
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 56
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: c3 00 00 00 32 01 00 2f 01 42 b7 
f4 b2 44 00 dc   ....
2../.B...D..
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 72 57 15 65 ed 44 06 eb 4e 00 00 
06 04 02 00 03   rW.e
.D..N.......
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 01 00 00 00 0e 06 03 06 01 06 02 
05 03 05 02 05   ....
............
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 01 00 03 01 00 02 10              
                ....
...
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:26 [248] [0] DEBUG: Msg object ends.
2005-06-21 12:06:26 [248] [0] INFO: Event created
2005-06-21 12:06:26 [248] [0] INFO: Set address and stuff
2005-06-21 12:06:26 [248] [0] DEBUG: Offset is now : 0
2005-06-21 12:06:26 [248] [0] DEBUG: Finished, found 1 PDUs
2005-06-21 12:06:26 [248] [0] INFO: Datagram unpacked!
2005-06-21 12:06:26 [248] [9] DEBUG: event->type = 0
2005-06-21 12:06:26 [248] [9] DEBUG: WTLS: Created WTLSMachine 0x10126570 (0)
2005-06-21 12:06:26 [248] [9] DEBUG: WTLS: wtls_machine 0, state NULL_STATE, 
event T-Unitdata.ind.
2005-06-21 12:06:26 [248] [9] DEBUG: listLen = 2
2005-06-21 12:06:26 [248] [9] DEBUG: Key 0
2005-06-21 12:06:26 [248] [9] DEBUG: Key Exchange Id:
2005-06-21 12:06:26 [248] [9] DEBUG:  Key Exch Suite: 4
2005-06-21 12:06:26 [248] [9] DEBUG:  ParameterSpecifier:
2005-06-21 12:06:26 [248] [9] DEBUG:   Parameter Index: 2
2005-06-21 12:06:26 [248] [9] DEBUG:  Identifier:
2005-06-21 12:06:26 [248] [9] DEBUG:   Ident type: 0
2005-06-21 12:06:26 [248] [9] DEBUG: Key 1
2005-06-21 12:06:26 [248] [9] DEBUG: Key Exchange Id:
2005-06-21 12:06:26 [248] [9] DEBUG:  Key Exch Suite: 3
2005-06-21 12:06:26 [248] [9] DEBUG:  ParameterSpecifier:
2005-06-21 12:06:26 [248] [9] DEBUG:   Parameter Index: 1
2005-06-21 12:06:26 [248] [9] DEBUG:  Identifier:
2005-06-21 12:06:26 [248] [9] DEBUG:   Ident type: 0
2005-06-21 12:06:26 [248] [9] DEBUG: Dispatching SEC_Create_Res event
2005-06-21 12:06:26 [248] [9] DEBUG: WTLS 0: New state CREATING
2005-06-21 12:06:26 [248] [9] DEBUG: You need to create wtls_pdulist_destroy!
2005-06-21 12:06:26 [248] [9] DEBUG: event->type = 5
2005-06-21 12:06:26 [248] [9] DEBUG: WTLS: wtls_machine 0, state CREATING, 
event SEC-Create.res.
2005-06-21 12:06:26 [248] [9] DEBUG: Setting msg size to : 24
2005-06-21 12:06:26 [248] [9] DEBUG: Packed PDU Length: 27
2005-06-21 12:06:26 [248] [9] DEBUG: Dispatching SEC_Exchange_Req event
2005-06-21 12:06:26 [248] [9] DEBUG: WTLS 0: New state CREATED
2005-06-21 12:06:26 [248] [9] DEBUG: event->type = 6
2005-06-21 12:06:26 [248] [9] DEBUG: WTLS: wtls_machine 0, state CREATED, event 
SEC-Exchange.req.
2005-06-21 12:06:26 [248] [9] DEBUG: Going to get the RSA public key...
2005-06-21 12:06:26 [248] [9] DEBUG: ...got it.
2005-06-21 12:06:26 [248] [9] DEBUG: Packing ServerKeyExchange
2005-06-21 12:06:26 [248] [9] DEBUG: Setting msg size to : 136
2005-06-21 12:06:26 [248] [9] DEBUG: Packed PDU Length: 139
2005-06-21 12:06:26 [248] [9] DEBUG: in CREATED - just added pdu...
2005-06-21 12:06:26 [248] [9] DEBUG: Setting msg size to : 0
2005-06-21 12:06:26 [248] [9] DEBUG: Packed PDU Length: 3
2005-06-21 12:06:26 [248] [9] DEBUG: adding address
2005-06-21 12:06:26 [248] [9] DEBUG: WTLS 0: New state EXCHANGE
2005-06-21 12:06:26 [248] [0] DEBUG: Msg object at 0x10128248:
2005-06-21 12:06:26 [248] [0] DEBUG:  type: wdp_datagram
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.source_address:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x10128680:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  9
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 10
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 31 32 37 2e 30 2e 30 2e 31        
                127.
0.0.1
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.source_port: 1938
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.destination_address:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x10129218:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  7
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 8
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 30 2e 30 2e 30 2e 30              
                0.0.
0.0
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.destination_port: 9203
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.user_data:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x10129200:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  11
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 12
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: c2 00 01 00 06 02 32 49 d9 ab cc  
                ....
..2I...
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:26 [248] [0] DEBUG: Msg object ends.
2005-06-21 12:06:26 [248] [0] INFO: Event created
2005-06-21 12:06:26 [248] [0] INFO: Set address and stuff
2005-06-21 12:06:26 [248] [0] DEBUG: Offset is now : 0
2005-06-21 12:06:26 [248] [0] DEBUG: Finished, found 1 PDUs
2005-06-21 12:06:26 [248] [0] INFO: Datagram unpacked!
2005-06-21 12:06:26 [248] [9] DEBUG: event->type = 0
2005-06-21 12:06:26 [248] [9] DEBUG: WTLS: wtls_machine 0, state EXCHANGE, 
event T-Unitdata.ind.2005
-06-21 12:06:26 [248] [0] DEBUG: Msg object at 0x10128248:

2005-06-21 12:06:26 [248] [0] DEBUG:  type: wdp_datagram
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.source_address:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x10129218:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  9
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 10
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 31 32 37 2e 30 2e 30 2e 31        
                127.
0.0.1
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.source_port: 1938
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.destination_address:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x10128680:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  7
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 8
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: 30 2e 30 2e 30 2e 30              
                0.0.
0.0
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.destination_port: 9203
2005-06-21 12:06:26 [248] [0] DEBUG:  wdp_datagram.user_data:
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string at 0x10128470:
2005-06-21 12:06:26 [248] [0] DEBUG:    len:  11
2005-06-21 12:06:26 [248] [0] DEBUG:    size: 12
2005-06-21 12:06:26 [248] [0] DEBUG:    immutable: 0
2005-06-21 12:06:26 [248] [0] DEBUG:    data: c2 00 02 00 06 02 32 49 d9 ab cc  
                ....
..2I...
2005-06-21 12:06:26 [248] [0] DEBUG:  Octet string dump ends.
2005-06-21 12:06:27 [248] [0] DEBUG: Msg object ends.
2005-06-21 12:06:27 [248] [0] INFO: Event created
2005-06-21 12:06:27 [248] [0] INFO: Set address and stuff
2005-06-21 12:06:27 [248] [0] DEBUG: Offset is now : 0
2005-06-21 12:06:27 [248] [0] DEBUG: Finished, found 1 PDUs
2005-06-21 12:06:27 [248] [0] INFO: Datagram unpacked!
Segmentation fault (core dumped)


-----Original Message-----
From: Gareth Reakes [mailto:[EMAIL PROTECTED] 
Sent: 21 June 2005 11:26
To: Nazir Faisal-NZRF001
Cc: users@kannel.org
Subject: Re: WTLS and Kannel 1.4 - Query - Does it Work?

Hi,

Nazir Faisal-NZRF001 wrote:

> *FYI both the key and cert file are in the same directory as the conf file.*

Its relative to the directory the kannel is started in, not the conf file.

> *Can anyone help? Has anyone got the WTLS stuff to work?*

Yep.

> *Has anyone instructions on how to generate appropiate private/public 
> keys and certificates (self-signed)?*


#create keys with
#openssl genrsa -out private.pem
#openssl req -new -x509 -key private.pem -out public.pem -days 365


Change the parameters if you need different behavior. Be warned though, 
if you use self signed then lots of things won't talk to you!


Cheers,

Gareth



-- 
Gareth Reakes, Managing Director      Parthenon Computing
+44-1865-811184                  http://www.parthcomp.com

Reply via email to