diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-02 05:23:45 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-02 05:23:45 +0200 |
commit | 576b6208d6defe240bfa2477d6dd19f1ed83bfaf (patch) | |
tree | 7d54883f16cccc4cbd414398d7fec3c437b36b49 /net-ftp/bsdftpd-ssl/files/auth.sslftp | |
parent | fdd6b67a78a966f6a2131de8fe0e539316511083 (diff) | |
download | darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.gz darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.bz2 darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.xz darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.zip |
Cleaned most of outdated stuff
Diffstat (limited to 'net-ftp/bsdftpd-ssl/files/auth.sslftp')
-rw-r--r-- | net-ftp/bsdftpd-ssl/files/auth.sslftp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/net-ftp/bsdftpd-ssl/files/auth.sslftp b/net-ftp/bsdftpd-ssl/files/auth.sslftp deleted file mode 100644 index 539140d..0000000 --- a/net-ftp/bsdftpd-ssl/files/auth.sslftp +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/perl - -# Output must be at least 8 bytes - -sub return_error { - print STDOUT "200\r\n\r\n"; - exit; -} - -sub return_ok { - $user=@_[0]; - print STDOUT "100\r\n$user\r\n"; - exit; -} - -$/="\r\n"; -$user=<STDIN>;chomp($user); -$/="\n"; -$mode=0; -while (<>) { - if (($mode==0)&&($_ =~ /-----BEGIN CERTIFICATE-----/)) { $mode = 1; } - elsif (($mode==1)&&($_ =~ /-----END CERTIFICATE-----/)) { $mode = 2; } - if ($mode) { - $_ =~ /^(.*)[\n\r]+$/; - $cert.=$1; - } - if ($mode==2) { last; } -} - -#$cert=join "", @cert_lines; -$cert =~ m/-----BEGIN CERTIFICATE-----(.*)-----END CERTIFICATE-----/; -$client_cert = $1; - -open(ucf, "/opt/ssl/user_certs/$user.crt") or return_error(); -@cert_lines=<ucf>; -chomp(@cert_lines); -$cert=join "", @cert_lines; -close(ucf); -$cert =~ m/-----BEGIN CERTIFICATE-----(.*)-----END CERTIFICATE-----/; -$user_cert = $1; - -if (($user_cert cmp $client_cert) == 0) { return_ok($user); } -return_error(); |