Changeset 48bf314 for npl


Ignore:
Timestamp:
09/28/17 17:29:01 (8 years ago)
Author:
Edwin Eefting <edwin@datux.nl>
Branches:
master, perl-5.22
Children:
10bd92c
Parents:
0b780b4
Message:

fixed libreswan public key support. status fix

Location:
npl
Files:
1 added
16 edited

Legend:

Unmodified
Added
Removed
  • npl/internetserver/libreswan_conf/libreswan_conf.build

    r0b780b4 r48bf314  
    1 6552
     16554
  • npl/internetserver/libreswan_conf/libreswan_conf.md5

    r0b780b4 r48bf314  
    1 544cf91ec7a3987868055d7eeb063aed  ./libreswan_conf.pkg
     1122e8f14e19c0ec39d7bcf9c22f5eeb2  ./libreswan_conf.pkg
    2242016730303eef15aafe66cc3d793c8b  ./libreswan_conf.SlackBuild
    3 7dc0067eced4d98f26cb9b532dc61691  ./libreswan_conf.SlackBuild.log.gz
     3edea22bb9108a04249d6e45135bba47a  ./libreswan_conf.SlackBuild.log.gz
    44811bbe5f8db6bf1ffff4ed5b66fc05f2  ./root/etc/ipsec.conf
    5553d9d2008956917a02c0c670100165f6  ./root/etc/ipsec.secrets
    66f0188fc8f667dc97590f885fd1adfc7d  ./root/etc/pam.d/pluto
    7 c72a5d7a716724e4f8a2e4f28421f0ae  ./root/etc/postinst.d/post.libreswan
     71a5e15db17d1250abb2596361383d0d1  ./root/etc/postinst.d/post.libreswan
    8860ae7c5340247d26161043df4e361722  ./root/home/system/ipsec.d/policies/block
    999e6cbaea66c6f14c9f8e7a6e6b4d720e  ./root/home/system/ipsec.d/policies/clear
     
    131368b329da9893e34099c7d8ad5cb9c940  ./root/home/system/ipsec.d/tunnels/dummy.conf
    141487a28e77aef254bdb8259f4388b40d45  ./root/sbin/syn3-ipseccheck
     15a33b03980a28bb1ca9089298f0db1bcf  ./root/sbin/syn3-ipsecpubkey
    15169d6f0923366b4e95a8a9fcd85dcaaf56  ./root/service/ipsec/run
    1617e458545ffca980b0a2d4d8106680f4b0  ./root/service/ipsec/start
  • npl/internetserver/libreswan_conf/root/etc/postinst.d/post.libreswan

    r0b780b4 r48bf314  
    99
    1010
    11 KEY=/etc/ipsec.d/ipsec.pub
    12 if ! egrep '(ckaid|CKA_ID)' $KEY >/dev/null; then
    13     rm $KEY 2>/dev/null
     11if ! syn3-ipsecpubkey; then
     12    #obsolete
     13    rm /etc/ipsec.d/ipsec.pub 2>/dev/null
     14
    1415    echo Generating ipsec key
    15     ipsec newhostkey --bits 2192 --output $KEY || exit 1
    16     #previous command can fail without proper exit code, so check it:
    17     egrep '(ckaid|CKA_ID)' $KEY >/dev/null || exit 1
     16    ipsec newhostkey --bits 2192 || exit 1
     17    syn3-ipsecpubkey || exit 1
    1818fi
    1919depmod -a
  • npl/syn3/webint/src/vpn/lang_de.php

    r0b780b4 r48bf314  
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { return (
    131         "Starten des VPN ist fehlgeschlagen. Linux Fehlerbericht: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { return (
    135         "VPN Systeme neu gestartet"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { return (
    139131        "VPN Tunnel $Name gelöscht"
  • npl/syn3/webint/src/vpn/lang_deD.php

    r0b780b4 r48bf314  
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { LangDebug("Starten des VPN ist fehlgeschlagen. Linux Fehlerbericht: $a", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=3915");return (
    131         "Starten des VPN ist fehlgeschlagen. Linux Fehlerbericht: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { LangDebug("VPN Systeme neu gestartet", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=4312");return (
    135         "VPN Systeme neu gestartet"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { LangDebug("VPN Tunnel $Name gelöscht", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=3888");return (
    139131        "VPN Tunnel $Name gelöscht"
  • npl/syn3/webint/src/vpn/lang_en.php

    r0b780b4 r48bf314  
    6565
    6666function _EnterValidKey($a='',$b='') { return (
    67         "Enter the public key of the other server"
     67        "Enter a valid public key."
    6868);}
    6969
     
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { return (
    131         "Starting of VPN failed.  Linux error report: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { return (
    135         "VPN systems restarted"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { return (
    139131        "VPN tunnel $name removed"
  • npl/syn3/webint/src/vpn/lang_enD.php

    r0b780b4 r48bf314  
    6464);}
    6565
    66 function _EnterValidKey($a='',$b='') { LangDebug("Enter the public key of the other server", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=1361");return (
    67         "Enter the public key of the other server"
     66function _EnterValidKey($a='',$b='') { LangDebug("Enter a valid public key.", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=8325");return (
     67        "Enter a valid public key."
    6868);}
    6969
     
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { LangDebug("Starting of VPN failed.  Linux error report: $a", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=1380");return (
    131         "Starting of VPN failed.  Linux error report: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { LangDebug("VPN systems restarted", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=1382");return (
    135         "VPN systems restarted"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { LangDebug("VPN tunnel $name removed", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=1379");return (
    139131        "VPN tunnel $name removed"
  • npl/syn3/webint/src/vpn/lang_nl.php

    r0b780b4 r48bf314  
    6565
    6666function _EnterValidKey($a='',$b='') { return (
    67         "Voer de publieke sleutel van de andere server in"
     67        "Voer een geldige publieke sleutel in."
    6868);}
    6969
     
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { return (
    131         "Starten van VPN mislukt. Linux foutmelding: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { return (
    135         "VPN systeem opnieuw starten"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { return (
    139131        "VPN tunnel $name verwijderd"
  • npl/syn3/webint/src/vpn/lang_nlD.php

    r0b780b4 r48bf314  
    6464);}
    6565
    66 function _EnterValidKey($a='',$b='') { LangDebug("Voer de publieke sleutel van de andere server in", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=397");return (
    67         "Voer de publieke sleutel van de andere server in"
     66function _EnterValidKey($a='',$b='') { LangDebug("Voer een geldige publieke sleutel in.", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=8324");return (
     67        "Voer een geldige publieke sleutel in."
    6868);}
    6969
     
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { LangDebug("Starten van VPN mislukt. Linux foutmelding: $a", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=416");return (
    131         "Starten van VPN mislukt. Linux foutmelding: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { LangDebug("VPN systeem opnieuw starten", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=418");return (
    135         "VPN systeem opnieuw starten"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { LangDebug("VPN tunnel $name verwijderd", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=415");return (
    139131        "VPN tunnel $name verwijderd"
  • npl/syn3/webint/src/vpn/lang_pl.php

    r0b780b4 r48bf314  
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { return (
    131         "Uruchamianie VPN niepowiod&#322;o si&#281;. System linux zg&#322;osi&#322; bl&#261;d: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { return (
    135         "System VPN(wirtualna sieÊ prywatna)zrestartowany"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { return (
    139131        "Tunel VPN $name usuni&#281;ty"
  • npl/syn3/webint/src/vpn/lang_plD.php

    r0b780b4 r48bf314  
    126126function _LogVPNSettingsChanged($name) { LangDebug("Zmiana nazwy tunelu VPN", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=4780");return (
    127127        "Zmiana nazwy tunelu VPN"
    128 );}
    129 
    130 function _LogVPNstartErrors($a='',$b='') { LangDebug("Uruchamianie VPN niepowiod&#322;o si&#281;. System linux zg&#322;osi&#322; bl&#261;d: $a", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=4706");return (
    131         "Uruchamianie VPN niepowiod&#322;o si&#281;. System linux zg&#322;osi&#322; bl&#261;d: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { LangDebug("System VPN(wirtualna sieÊ prywatna)zrestartowany", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?edit_ID=2506");return (
    135         "System VPN(wirtualna sieÊ prywatna)zrestartowany"
    136128);}
    137129
  • npl/syn3/webint/src/vpn/lang_pt.php

    r0b780b4 r48bf314  
    6565
    6666function _EnterValidKey($a='',$b='') { return (
    67         "Enter the public key of the other server"
     67        "Enter a valid public key."
    6868);}
    6969
     
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { return (
    131         "Starting of VPN failed.  Linux error report: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { return (
    135         "VPN systems restarted"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { return (
    139131        "VPN tunnel $name removed"
  • npl/syn3/webint/src/vpn/lang_ptD.php

    r0b780b4 r48bf314  
    6464);}
    6565
    66 function _EnterValidKey($a='',$b='') { LangDebug("Enter the public key of the other server", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=pt&add_labelID=_EnterValidKey");return (
    67         "Enter the public key of the other server"
     66function _EnterValidKey($a='',$b='') { LangDebug("Enter a valid public key.", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=pt&add_labelID=_EnterValidKey");return (
     67        "Enter a valid public key."
    6868);}
    6969
     
    128128);}
    129129
    130 function _LogVPNstartErrors($a='',$b='') { LangDebug("Starting of VPN failed.  Linux error report: $a", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=pt&add_labelID=_LogVPNstartErrors");return (
    131         "Starting of VPN failed.  Linux error report: $a"
    132 );}
    133 
    134 function _LogVPNStarting($a='',$b='') { LangDebug("VPN systems restarted", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=pt&add_labelID=_LogVPNStarting");return (
    135         "VPN systems restarted"
    136 );}
    137 
    138130function _LogVPNTunnelDeleted($name) { LangDebug("VPN tunnel $name removed", "http://www.syn-3.nl/mosaddphp/translate/editlang.php?src_lang=en&add_langID=pt&add_labelID=_LogVPNTunnelDeleted");return (
    139131        "VPN tunnel $name removed"
  • npl/syn3/webint/src/vpn/openswan.php

    r0b780b4 r48bf314  
    2323
    2424        $VPN_IPSEC_DIR="/etc/ipsec.d";
    25         $VPN_PUB="$VPN_IPSEC_DIR/ipsec.pub";
    2625        $VPN_TUNNEL_DIR="$VPN_IPSEC_DIR/tunnels";
    2726        $VPN_LOG="/var/log/secure";
     
    236235                $key=vpn_ReadableToPub($key);
    237236                return (
    238                         (strlen($key)==370) &&
     237                        // (strlen($key)==370) && //varieert nu?
    239238                        (substr($key,0,2)=='0s') &&
    240                         (!preg_match("/[^A-Za-z0-9+\/]/",substr($key,2)))
     239                        (!preg_match("/[^A-Za-z0-9+\/=]/",$key))
    241240                );
    242241        }
     
    252251        function vpn_ReadPubKey()
    253252        {
    254                 global $VPN_PUB;
    255                 $raw=FileReadMatches($VPN_PUB,"/#pubkey=/");
    256                 preg_match("/.*pubkey=(.*)/",$raw[0],$matches);
    257                 return ($matches[1]);
     253                return(safeExec("syn3-ipsecpubkey")[0]);
    258254        }
    259255
     
    348344
    349345                //ike v2
     346                'STATE_PARENT_I1'=>"Negotiating...",
    350347                'STATE_PARENT_I2'=>"Negotiating...",
    351348
     
    442439                                        $ret[$name]['info'][]=$line;
    443440                                        $state=vpn_LogToState($line);
    444                                         if ($state['phase1'])
     441                                        if ($state['phase1'] && !$ret[$name]['phase1_newest'])
     442                                        {
    445443                                                $ret[$name]['phase1']=$state['phase1'];
    446                                         if ($state['phase2'])
     444                                                if (preg_match('/ newest /', $line))
     445                                                        $ret[$name]['phase1_newest']=true;
     446
     447                                        }
     448                                        if ($state['phase2'] && !$ret[$name]['phase2_newest'])
     449                                        {
    447450                                                $ret[$name]['phase2']=$state['phase2'];
     451                                                if (preg_match('/ newest /', $line))
     452                                                        $ret[$name]['phase2_newest']=true;
     453                                        }
    448454
    449455                                }
Note: See TracChangeset for help on using the changeset viewer.