Changeset 4126


Ignore:
Timestamp:
2006-07-11T11:52:20+02:00 (12 years ago)
Author:
florian
Message:

Update OpenVPN webif module and fix management feature in Makefile. Closes #625

Location:
branches/whiterussian/openwrt/package/openvpn
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/whiterussian/openwrt/package/openvpn/Config.in

    r3818 r4126  
    5151        bool "Enable password saving" 
    5252        default y 
    53         depends BR2_PACKAGE_OPENPVN 
     53        depends BR2_PACKAGE_OPENVPN 
    5454 
    5555config BR2_PACKAGE_OPENVPN_MANAGEMENT 
  • branches/whiterussian/openwrt/package/openvpn/Makefile

    r3933 r4126  
    7979                  --disable-debug \ 
    8080                  --disable-plugins \ 
    81                   --disable-management \ 
    8281                  --disable-socks \ 
    8382                  $(DISABLE_LZO) \ 
  • branches/whiterussian/openwrt/package/openvpn/files/S50openvpn

    r3818 r4126  
    2222                case "$(nvram get openvpn_cli_auth)" in 
    2323                        cert) 
    24                                 AUTH_OPTION="--pkcs12" 
     24                                AUTH_OPTION="--ns-cert-type server --pkcs12" 
    2525                                AUTH_FILE="/etc/openvpn/certificate.p12" 
     26                                PKCS12PASS="$(nvram get openvpn_cli_pkcs12pass)" 
     27                                [ "$PKCS12PASS" ] && { 
     28                                        echo -n "$PKCS12PASS" > /etc/openvpn/pkcs12pass.tmp 
     29                                        chmod 600 /etc/openvpn/pkcs12pass.tmp 
     30                                        AUTH_OPTION="--askpass /etc/openvpn/pkcs12pass.tmp $AUTH_OPTION" 
     31                                } 
    2632                        ;; 
    2733                        psk) 
  • branches/whiterussian/openwrt/package/openvpn/files/openvpn.sh

    r3818 r4126  
    66. /usr/lib/webif/webif.sh 
    77load_settings "openvpn" 
     8 
     9openvpn_cli_pkcs12pass=${openvpn_cli_pkcs12pass:-$(nvram get openvpn_cli_pkcs12pass)} 
     10openvpn_cli_pkcs12pass=${openvpn_cli_pkcs12pass:+"-@@-"} 
    811 
    912if empty "$FORM_submit"; then 
     
    2225else 
    2326        [ -d /etc/openvpn ] || mkdir /etc/openvpn 
    24         [ -f "$FORM_openvpn_pkcs12file" ] && { 
    25                 cp "$FORM_openvpn_pkcs12file" /etc/openvpn/certificate.p12 && 
     27        [ -f "$FORM_openvpn_cli_pkcs12file" ] && { 
     28                cp "$FORM_openvpn_cli_pkcs12file" /etc/openvpn/certificate.p12 && 
    2629                        UPLOAD_CERT=1 
    2730        } 
    28         [ -f "$FORM_openvpn_pskfile" ] && { 
    29                 cp "$FORM_openvpn_pskfile" /etc/openvpn/shared.key && 
     31        [ -f "$FORM_openvpn_cli_pskfile" ] && { 
     32                cp "$FORM_openvpn_cli_pskfile" /etc/openvpn/shared.key && 
    3033                        UPLOAD_PSK=1 
    3134        } 
     35        [ "$FORM_openvpn_cli_pkcs12pass" != "-@@-" ] && { 
     36                [ "$FORM_openvpn_cli_pkcs12pass" != "$openvpn_cli_pkcs12pass" ] && { 
     37                        save_setting openvpn openvpn_cli_pkcs12pass $FORM_openvpn_cli_pkcs12pass 
     38                        openvpn_cli_pkcs12pass=${FORM_openvpn_cli_pkcs12pass:+"-@@-"} 
     39                } 
     40        } 
     41 
    3242        save_setting openvpn openvpn_cli $FORM_openvpn_cli 
    3343        save_setting openvpn openvpn_cli_server $FORM_openvpn_cli_server 
     
    5868        set_visible('certificate_status', v); 
    5969        set_visible('certificate', v); 
     70        set_visible('pkcs12pass', v); 
    6071 
    6172        hide('save'); 
     
    99110$(empty "$NOPSK" && echo 'string|@TR<<Found Installed Keyfile>>') 
    100111field|@TR<<Upload Preshared Key>>|psk|hidden 
    101 upload|openvpn_pskfile 
     112upload|openvpn_cli_pskfile 
    102113 
    103114field|@TR<<Certificate Status>>|certificate_status|hidden 
     
    106117$(empty "$NOCERT" && echo 'string|@TR<<Found Installed Certificate.>>') 
    107118field|@TR<<Upload PKCS12 Certificate>>|certificate|hidden 
    108 upload|openvpn_pkcs12file 
     119upload|openvpn_cli_pkcs12file 
     120field|@TR<<PKCS12 Container Password>>|pkcs12pass|hidden 
     121password|openvpn_cli_pkcs12pass|$openvpn_cli_pkcs12pass 
    109122end_form 
    110123 
     
    114127?> 
    115128<!-- 
    116 ##WEBIF:name:Network:10:OpenVPN 
     129##WEBIF:name:VPN:1:OpenVPN 
    117130--> 
Note: See TracChangeset for help on using the changeset viewer.