Yubico Forum
https://forum.yubico.com/

ykclient local validation server
https://forum.yubico.com/viewtopic.php?f=5&t=702
Page 1 of 1

Author:  molliver [ Wed Aug 24, 2011 10:08 am ]
Post subject:  ykclient local validation server

Hi,

I guess i am doing something wrong but i seem unable to get my key to authenticate with ykclient and a local authentication server correctly.

If i use my key which is synced with yubico and do:
ykclient 16 OTP
then it works fine,

However if i do:
ykclient 16 OTP --url "http://localhost:8000/waspi/2.0/verify/?id=%d&otp=%s"
which should validate against my local yubiserve running on that machine i get a glibc error.

Any ideas? (yubiserve knows about by other key and its local webpage validates it) I am testing ykclient as an intermediate step before trying to get pam_yubico to work.


Error output on ubuntu 10.04
ykclient 16 OTPID --url "http://localhost:8000/waspi/2.0/verify/?id=%d&otp=%s"
Input:
validation URL: http://localhost:8000/waspi/2.0/verify/?id=%d&otp=%s
client id: 16
token: OTPID
*** glibc detected *** ykclient: double free or corruption (out): 0x0853ccd8 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0xb7775591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0xb7776de8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xb7779ecd]
/usr/lib/libykclient.so.3(+0x105a)[0xb78ab05a]
/usr/lib/libykclient.so.3(ykclient_server_response_parse+0x308)[0xb78ab3d8]
/usr/lib/libykclient.so.3(ykclient_request+0x4e9)[0xb78aba89]
/usr/lib/libykclient.so.3(ykclient_verify_otp_v2+0xa5)[0xb78ac235]
ykclient[0x8048a1d]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0xb7720bd6]
ykclient[0x80486b1]
======= Memory map: ========
08048000-08049000 r-xp 00000000 fc:01 948390 /usr/local/bin/ykclient
08049000-0804a000 r--p 00000000 fc:01 948390 /usr/local/bin/ykclient
0804a000-0804b000 rw-p 00001000 fc:01 948390 /usr/local/bin/ykclient
0853b000-0855c000 rw-p 00000000 00:00 0 [heap]
b7000000-b7021000 rw-p 00000000 00:00 0
b7021000-b7100000 ---p 00000000 00:00 0
b71d9000-b71f6000 r-xp 00000000 fc:01 786488 /lib/libgcc_s.so.1
b71f6000-b71f7000 r--p 0001c000 fc:01 786488 /lib/libgcc_s.so.1
b71f7000-b71f8000 rw-p 0001d000 fc:01 786488 /lib/libgcc_s.so.1
b71f8000-b7202000 r-xp 00000000 fc:01 786460 /lib/tls/i686/cmov/libnss_files-2.11.1.so
b7202000-b7203000 r--p 00009000 fc:01 786460 /lib/tls/i686/cmov/libnss_files-2.11.1.so
b7203000-b7204000 rw-p 0000a000 fc:01 786460 /lib/tls/i686/cmov/libnss_files-2.11.1.so
b7204000-b7207000 rw-p 00000000 00:00 0
b7207000-b720a000 r-xp 00000000 fc:01 786756 /lib/libgpg-error.so.0.4.0
b720a000-b720b000 r--p 00002000 fc:01 786756 /lib/libgpg-error.so.0.4.0
b720b000-b720c000 rw-p 00003000 fc:01 786756 /lib/libgpg-error.so.0.4.0
b720c000-b721b000 r-xp 00000000 fc:01 924507 /usr/lib/libtasn1.so.3.1.7
b721b000-b721c000 r--p 0000e000 fc:01 924507 /usr/lib/libtasn1.so.3.1.7
b721c000-b721d000 rw-p 0000f000 fc:01 924507 /usr/lib/libtasn1.so.3.1.7
b721d000-b721f000 r-xp 00000000 fc:01 786745 /lib/libkeyutils-1.2.so
b721f000-b7220000 r--p 00001000 fc:01 786745 /lib/libkeyutils-1.2.so
b7220000-b7221000 rw-p 00002000 fc:01 786745 /lib/libkeyutils-1.2.so
b7221000-b7222000 rw-p 00000000 00:00 0
b7222000-b7224000 r-xp 00000000 fc:01 786454 /lib/tls/i686/cmov/libdl-2.11.1.so
b7224000-b7225000 r--p 00001000 fc:01 786454 /lib/tls/i686/cmov/libdl-2.11.1.so
b7225000-b7226000 rw-p 00002000 fc:01 786454 /lib/tls/i686/cmov/libdl-2.11.1.so
b7226000-b722c000 r-xp 00000000 fc:01 921157 /usr/lib/libkrb5support.so.0.1
b722c000-b722d000 r--p 00005000 fc:01 921157 /usr/lib/libkrb5support.so.0.1
b722d000-b722e000 rw-p 00006000 fc:01 921157 /usr/lib/libkrb5support.so.0.1
b722e000-b7230000 r-xp 00000000 fc:01 794747 /lib/libcom_err.so.2.1
b7230000-b7231000 r--p 00001000 fc:01 794747 /lib/libcom_err.so.2.1
b7231000-b7232000 rw-p 00002000 fc:01 794747 /lib/libcom_err.so.2.1
b7232000-b7254000 r-xp 00000000 fc:01 921140 /usr/lib/libk5crypto.so.3.1
b7254000-b7255000 r--p 00021000 fc:01 921140 /usr/lib/libk5crypto.so.3.1
b7255000-b7256000 rw-p 00022000 fc:01 921140 /usr/lib/libk5crypto.so.3.1
b7256000-b7300000 r-xp 00000000 fc:01 921151 /usr/lib/libkrb5.so.3.3
b7300000-b7301000 ---p 000aa000 fc:01 921151 /usr/lib/libkrb5.so.3.3
b7301000-b7306000 r--p 000aa000 fc:01 921151 /usr/lib/libkrb5.so.3.3
b7306000-b7307000 rw-p 000af000 fc:01 921151 /usr/lib/libkrb5.so.3.3
b7307000-b7308000 rw-p 00000000 00:00 0
b7308000-b731d000 r-xp 00000000 fc:01 786465 /lib/tls/i686/cmov/libpthread-2.11.1.so
b731d000-b731e000 r--p 00014000 fc:01 786465 /lib/tls/i686/cmov/libpthread-2.11.1.so
b731e000-b731f000 rw-p 00015000 fc:01 786465 /lib/tls/i686/cmov/libpthread-2.11.1.so
b731f000-b7321000 rw-p 00000000 00:00 0
b7321000-b7337000 r-xp 00000000 fc:01 924479 /usr/lib/libsasl2.so.2.0.23
b7337000-b7338000 r--p 00015000 fc:01 924479 /usr/lib/libsasl2.so.2.0.23
b7338000-b7339000 rw-p 00016000 fc:01 924479 /usr/lib/libsasl2.so.2.0.23
b7339000-b7349000 r-xp 00000000 fc:01 786466 /lib/tls/i686/cmov/libresolv-2.11.1.so
b7349000-b734a000 r--p 00010000 fc:01 786466 /lib/tls/i686/cmov/libresolv-2.11.1.so
b734a000-b734b000 rw-p 00011000 fc:01 786466 /lib/tls/i686/cmov/libresolv-2.11.1.so
b734b000-b734d000 rw-p 00000000 00:00 0
b734d000-b73bd000 r-xp 00000000 fc:01 786754 /lib/libgcrypt.so.11.5.2
b73bd000-b73be000 r--p 00070000 fc:01 786754 /lib/libgcrypt.so.11.5.2
b73be000-b73c0000 rw-p 00071000 fc:01 786754 /lib/libgcrypt.so.11.5.2
b73c0000-b7456000 r-xp 00000000 fc:01 922698 /usr/lib/libgnutls.so.26.14.12
b7456000-b745a000 r--p 00095000 fc:01 922698 /usr/lib/libgnutls.so.26.14.12
b745a000-b745b000 rw-p 00099000 fc:01 922698 /usr/lib/libgnutls.so.26.14.12
b745b000-b745c000 rw-p 00000000 00:00 0
b745c000-b746f000 r-xp 00000000 fc:01 786679 /lib/libz.so.1.2.3.3
b746f000-b7470000 r--p 00012000 fc:01 786679 /lib/libz.so.1.2.3.3
b7470000-b7471000 rw-p 00013000 fc:01 786679 /lib/libz.so.1.2.3.3
b7471000-b75a9000 r-xp 00000000 fc:01 790931 /lib/i686/cmov/libcrypto.so.0.9.8
b75a9000-b75b1000 r--p 00137000 fc:01 790931 /lib/i686/cmov/libcrypto.so.0.9.8
b75b1000-b75bf000 rw-p 0013f000 fc:01 790931 /lib/i686/cmov/libcrypto.so.0.9.8
b75bf000-b75c3000 rw-p 00000000 00:00 0
b75c3000-b7607000 r-xp 00000000 fc:01 790932 /lib/i686/cmov/libssl.so.0.9.8
b7607000-b7608000 r--p 00044000 fc:01 790932 /lib/i686/cmov/libssl.so.0.9.8
b7608000-b760b000 rw-p 00045000 fc:01 790932 /lib/i686/cmov/libssl.so.0.9.8
b760b000-b7638000 r-xp 00000000 fc:01 918391 /usr/lib/libgssapi_krb5.so.2.2
b7638000-b7639000 r--p 0002d000 fc:01 918391 /usr/lib/libgssapi_krb5.so.2.2
b7639000-b763a000 rw-p 0002e000 fc:01 918391 /usr/lib/libgssapi_krb5.so.2.2
b763a000-b7641000 r-xp 00000000 fc:01 786467 /lib/tls/i686/cmov/librt-2.11.1.so
b7641000-b7642000 r--p 00006000 fc:01 786467 /lib/tls/i686/cmov/librt-2.11.1.so
b7642000-b7643000 rw-p 00007000 fc:01 786467 /lib/tls/i686/cmov/librt-2.11.1.so
b7643000-b7644000 rw-p 00000000 00:00 0
b7644000-b7688000 r-xp 00000000 fc:01 921267 /usr/lib/libldap_r-2.4.so.2.5.4
b7688000-b7689000 r--p 00043000 fc:01 921267 /usr/lib/libldap_r-2.4.so.2.5.4
b7689000-b768a000 rw-p 00044000 fc:01 921267 /usr/lib/libldap_r-2.4.so.2.5.4
b768a000-b768b000 rw-p 00000000 00:00 0
b768b000-b7696000 r-xp 00000000 fc:01 921266 /usr/lib/liblber-2.4.so.2.5.4
b7696000-b7697000 r--p 0000a000 fc:01 921266 /usr/lib/liblber-2.4.so.2.5.4
b7697000-b7698000 rw-p 0000b000 fc:01 921266 /usr/lib/liblber-2.4.so.2.5.4
b7698000-b76c8000 r-xp 00000000 fc:01 922870 /usr/lib/libidn.so.11.5.44
b76c8000-b76c9000 r--p 0002f000 fc:01 922870 /usr/lib/libidn.so.11.5.44
b76c9000-b76ca000 rw-p 00030000 fc:01 922870 /usr/lib/libidn.so.11.5.44
b76ca000-b7708000 r-xp 00000000 fc:01 921930 /usr/lib/libcurl-gnutls.so.4.1.1Aborted

Author:  molliver [ Wed Aug 24, 2011 10:55 am ]
Post subject:  Re: ykclient local validation server

ok,

I have fixed the first abort error, looks like the url was incorrect, now i just get a Segmentation fault - any ideas?



ykclient --url "http://localhost:8000/wsapi/2.0/verify?otp=%s&id=%d" 16 lkkhubchrezzjvijnjnrdkdihtvnjcfhgvhbrctclvtt
Input:
validation URL: http://localhost:8000/wsapi/2.0/verify?otp=%s&id=%d
client id: 16
token: lkkhubchrezzjvijnjnrdkdihtvnjcfhgvhbrctclvtt
Segmentation fault

Also what does the client id:16 actually refer to?

Thanks

Mark

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/