~ubuntu-branches/ubuntu/quantal/wvdial/quantal

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Worldvisions Weaver Software:
 *   Copyright (C) 1997-2003 Net Integration Technologies, Inc.
 *
 * Little test program for WvPapChap.
 */

#include "wvpapchap.h"

int main( int argc, char * argv[] )
/*********************************/
{
    if( argc != 4 ) {
    	printf( "Usage:	papchaptest username remote password\n" );
    	return( -1 );
    }

    WvPapChap	papchap;

    papchap.put_secret( argv[1], argv[3], argv[2] );

    if( papchap.isok_pap() )
    	printf( "PAP successful.\n" );
    else
    	printf( "PAP failed.\n" );

    if( papchap.isok_chap() )
    	printf( "CHAP successful.\n" );
    else
    	printf( "CHAP failed.\n" );

    return( 0 );
}