diff options
author | Remy <relst@relst.nl> | 2015-02-21 07:22:45 +0100 |
---|---|---|
committer | Remy <relst@relst.nl> | 2015-02-21 07:22:45 +0100 |
commit | f66fd749250f8b60ec78fcdd2f50026019836069 (patch) | |
tree | 6486487c928c2c8bb44764100afc48da06353c6a /functions | |
parent | b8dea0fbd433618bf026e36d5e7fb29492508017 (diff) | |
download | ssl-decoder-f66fd749250f8b60ec78fcdd2f50026019836069.zip ssl-decoder-f66fd749250f8b60ec78fcdd2f50026019836069.tar.gz ssl-decoder-f66fd749250f8b60ec78fcdd2f50026019836069.tar.bz2 |
license should not me html comment
Diffstat (limited to 'functions')
-rw-r--r-- | functions/connection.php | 26 | ||||
-rw-r--r-- | functions/crl.php | 26 | ||||
-rw-r--r-- | functions/numerical.php | 28 | ||||
-rw-r--r-- | functions/ocsp.php | 26 | ||||
-rw-r--r-- | functions/parse_certificate.php | 26 | ||||
-rw-r--r-- | functions/textual.php | 42 | ||||
-rw-r--r-- | functions/variables.php | 28 | ||||
-rw-r--r-- | functions/verify_certifitcate.php | 27 |
8 files changed, 114 insertions, 115 deletions
diff --git a/functions/connection.php b/functions/connection.php index 33af1ad..7fcae27 100644 --- a/functions/connection.php +++ b/functions/connection.php @@ -1,20 +1,18 @@ -<!-- -Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function fixed_gethostbyname($host) { $ip = gethostbyname($host); diff --git a/functions/crl.php b/functions/crl.php index 7e477b2..959a6a4 100644 --- a/functions/crl.php +++ b/functions/crl.php @@ -1,20 +1,18 @@ -<!-- - Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function crl_verify($raw_cert_data, $verbose=true) { global $random_blurp; diff --git a/functions/numerical.php b/functions/numerical.php index a363374..00c9ade 100644 --- a/functions/numerical.php +++ b/functions/numerical.php @@ -1,20 +1,19 @@ -<!-- - Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php function bcdechex($dec) { $hex = ''; @@ -24,7 +23,6 @@ function bcdechex($dec) { $dec = bcdiv(bcsub($dec, $last), 16); } while($dec>0); return $hex; - } } ?>
\ No newline at end of file diff --git a/functions/ocsp.php b/functions/ocsp.php index 21b03d7..98947c7 100644 --- a/functions/ocsp.php +++ b/functions/ocsp.php @@ -1,20 +1,18 @@ -<!-- -Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function ocsp_stapling($host, $port){ $result = ""; diff --git a/functions/parse_certificate.php b/functions/parse_certificate.php index 1bdfedd..ddd4dfa 100644 --- a/functions/parse_certificate.php +++ b/functions/parse_certificate.php @@ -1,20 +1,18 @@ -<!-- - Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function cert_parse($raw_cert_data, $raw_next_cert_data=null, $csr=false, $host=null, $port=null, $is_issuer=false) { diff --git a/functions/textual.php b/functions/textual.php index 4287283..cf17e23 100644 --- a/functions/textual.php +++ b/functions/textual.php @@ -1,20 +1,18 @@ -<!-- - Copyright (C) 2015 Remy van Elst - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> <?php +// Copyright (C) 2015 Remy van Elst + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. function startsWith($haystack, $needle) { // search backwards starting from haystack length characters from the end @@ -27,4 +25,16 @@ function endsWith($haystack, $needle) { } } + +function get_current_folder(){ + $url = $_SERVER['REQUEST_URI']; + $parts = explode('/',$url); + $folder = ''; + for ($i = 0; $i < count($parts) - 1; $i++) { + $folder .= $parts[$i] . "/"; + } + return $folder; +} + + ?>
\ No newline at end of file diff --git a/functions/variables.php b/functions/variables.php index 479dccd..5b020fa 100644 --- a/functions/variables.php +++ b/functions/variables.php @@ -1,24 +1,24 @@ -<!-- - Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. $random_blurp = rand(1000,99999); # 2014-11-10 (nov) from wikipedia $ev_oids = array("1.3.6.1.4.1.34697.2.1", "1.3.6.1.4.1.34697.2.2", "1.3.6.1.4.1.34697.2.3", "1.3.6.1.4.1.34697.2.4", "1.2.40.0.17.1.22", "2.16.578.1.26.1.3.3", "1.3.6.1.4.1.17326.10.14.2.1.2", "1.3.6.1.4.1.17326.10.8.12.1.2", "1.3.6.1.4.1.6449.1.2.1.5.1", "2.16.840.1.114412.2.1", "2.16.840.1.114412.1.3.0.2", "2.16.528.1.1001.1.1.1.12.6.1.1.1", "2.16.840.1.114028.10.1.2", "0.4.0.2042.1.4", "0.4.0.2042.1.5", "1.3.6.1.4.1.13177.10.1.3.10", "1.3.6.1.4.1.14370.1.6", "1.3.6.1.4.1.4146.1.1", "2.16.840.1.114413.1.7.23.3", "1.3.6.1.4.1.14777.6.1.1", "2.16.792.1.2.1.1.5.7.1.9", "1.3.6.1.4.1.22234.2.5.2.3.1", "1.3.6.1.4.1.782.1.2.1.8.1", "1.3.6.1.4.1.8024.0.2.100.1.2", "1.2.392.200091.100.721.1", "2.16.840.1.114414.1.7.23.3", "1.3.6.1.4.1.23223.2", "1.3.6.1.4.1.23223.1.1.1", "2.16.756.1.83.21.0", "2.16.756.1.89.1.2.1.1", "2.16.840.1.113733.1.7.48.1", "2.16.840.1.114404.1.1.2.4.1", "2.16.840.1.113733.1.7.23.6", "1.3.6.1.4.1.6334.1.100.1", "2.16.840.1.114171.500.9", "1.3.6.1.4.1.36305.2"); +$current_folder = get_current_folder(); + ?>
\ No newline at end of file diff --git a/functions/verify_certifitcate.php b/functions/verify_certifitcate.php index 95a4a9f..ccb2ac9 100644 --- a/functions/verify_certifitcate.php +++ b/functions/verify_certifitcate.php @@ -1,20 +1,19 @@ -<!-- -Copyright (C) 2015 Remy van Elst +<?php +// Copyright (C) 2015 Remy van Elst -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. ---> -<?php function verify_certificate_hostname($raw_cert, $host, $port) { $cert_data = openssl_x509_parse($raw_cert); if ($cert_data['subject']['CN']) { |