HEAD: an extra unit test for wvbase64 that I forgot to check in a while ago.
[wvapps.git] / wvdial / wvpapchap.h
blob8691abed30657aa4d0051cfd46d8a2c08ff92e97
1 /*
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2003 Net Integration Technologies, Inc.
5 * Re-write of wvpapsecrets.h. This one supports CHAP as well, and is also
6 * much safer.
7 */
9 #ifndef __WVPAPCHAP_H
10 #define __WVPAPCHAP_H
12 #include "wvconfemu.h"
13 #include "wvlinklist.h"
14 #include "wvstring.h"
16 #define PAP_SECRETS "/etc/ppp/pap-secrets"
17 #define CHAP_SECRETS "/etc/ppp/chap-secrets"
18 #define REMOTE_SECRET "wvdial"
20 class WvPapChap
21 /*************/
23 public:
24 WvPapChap()
25 : pap_success( true ), chap_success( true ) {}
26 ~WvPapChap() {}
28 void put_secret( WvString _username, WvString _password, WvString _remote );
29 bool isok_pap() const
30 { return( pap_success ); }
31 bool isok_chap() const
32 { return( chap_success ); }
34 private:
35 WvStringList contents;
36 bool pap_success;
37 bool chap_success;
39 bool load_file( char * filename );
40 bool write_file( char * filename );
41 void do_secret( const char * username, const char * password,
42 const char * remote );
45 #endif // __WVPAPCHAP_H