help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [Help-gnu-radius] authentication with Scheme


From: Pavel A. Ivanov
Subject: Re[2]: [Help-gnu-radius] authentication with Scheme
Date: Fri, 27 Jun 2003 16:50:03 +0400

Hello Sergey,

Tuesday, June 24, 2003, 4:25:21 PM, you wrote:

>> Please could anybody post a simple example of scheme procedure that
>> checks username and password?

SP> See test/raddb/auth.scm (for versions <= 0.96.4) or
SP> radiusd/testsuite/raddb/auth.scm (for version 1.0). It doesn't check
SP> the password, to be exact, but you can easily add this check yourself.

I saw this example and used it as a guide (my knowledge of scheme is
not well). But the problem is that Password attribute is passed to
scheme procedure encrypted. I am using radius 0.96.4. Maybe in 1.0
Password is decrypted before it is passed to scheme procedure?

Here is my code:

(define (auth req check reply)
(define sock (socket AF_INET SOCK_STREAM 0))
(connect (sock AF_INET (inet-aton "127.0.0.1") 4000)
(display req sock)
(newline sock)
(close-port sock))

and the process that listens on port 4000 gets something like this
when I try to authenticate:
((User-Name . test) (Password . Ts4ърyУЪЕУ) (NAS-Port-Id . 0))

the shared secret is correct, because when I use external
authentication script (Exec-Program-Wait) password is decrypted and
correct.

How can I decrypt password in scheme?

-- 
Best regards,
 Pavel                            mailto:address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]