Skip to content

Commit

Permalink
Update to 6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sonertari committed Dec 20, 2020
1 parent 19d5dd2 commit 80fbeae
Show file tree
Hide file tree
Showing 19 changed files with 798 additions and 702 deletions.
11 changes: 7 additions & 4 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Doxyfile 1.8.16
# Doxyfile 1.8.20

#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "PF Rule Editor"
PROJECT_NUMBER = 6.6
PROJECT_NUMBER = 6.8
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = ./docs
Expand Down Expand Up @@ -36,19 +36,19 @@ JAVADOC_AUTOBRIEF = YES
JAVADOC_BANNER = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
PYTHON_DOCSTRING = YES
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
OPTIMIZE_OUTPUT_SLICE = NO
EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 5
TOC_INCLUDE_HEADINGS = 0
AUTOLINK_SUPPORT = YES
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
Expand All @@ -61,6 +61,7 @@ INLINE_GROUPED_CLASSES = NO
INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 1
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
Expand Down Expand Up @@ -200,8 +201,10 @@ GENERATE_TREEVIEW = YES
ENUM_VALUES_PER_LINE = 4
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
HTML_FORMULA_FORMAT = png
FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
FORMULA_MACROFILE =
USE_MATHJAX = NO
MATHJAX_FORMAT = HTML-CSS
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
Expand Down
43 changes: 21 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ A couple of notes about the requirements, design decisions, and implementation o

Here are the basic steps to obtain a working PFRE installation:

- Install OpenBSD 6.7, perhaps on a VM.
- Install PHP 7.4.5, php-pcntl, and php-cgi.
- Install OpenBSD 6.8, perhaps on a VM.
- Install PHP 7.4.10, php-pcntl, and php-cgi.
- Copy the files in PFRE src folder to /var/www/htdocs/pfre/.
- Configure httpd.conf for PFRE.
- Create admin and user users, and set their passwords.
Expand All @@ -66,7 +66,7 @@ The OpenBSD installation guide is at [faq4](http://www.openbsd.org/faq/faq4.html

Here are a couple of guidelines:

- You can download install67.iso available at OpenBSD mirrors.
- You can download install68.iso available at OpenBSD mirrors.
- It may be easier to install a PFRE test system on a VM of your choice, e.g. VMware or VirtualBox, rather than bare hardware.
- 512MB RAM and 8GB HD should be more than enough.
- If you want to obtain a packet filtering firewall, make sure the VM has at least 2 ethernet interfaces:
Expand All @@ -90,19 +90,19 @@ Set the $PKG\_PATH env variable to the cache folder you have just created:

Download the required packages from an OpenBSD mirror and copy them to $PKG\_PATH. The following is the list of files you should have under $PKG\_PATH:

argon2-20171227.tgz
argon2-20190702.tgz
bzip2-1.0.8.tgz
femail-1.0p1.tgz
femail-chroot-1.0p3.tgz
gettext-runtime-0.20.1p1.tgz
gettext-runtime-0.21.tgz
libiconv-1.16p0.tgz
libsodium-1.0.18.tgz
libxml-2.9.10p0.tgz
oniguruma-6.9.5pl1.tgz
pcre2-10.34.tgz
php-7.4.5p0.tgz
php-cgi-7.4.5p0.tgz
php-pcntl-7.4.5p0.tgz
libsodium-1.0.18p1.tgz
libxml-2.9.10p2.tgz
oniguruma-6.9.5pl1p0.tgz
pcre2-10.35.tgz
php-7.4.10.tgz
php-cgi-7.4.10.tgz
php-pcntl-7.4.10.tgz
xz-5.2.5.tgz

Install PHP, php-pcntl, and php-cgi by running the following commands, which should install their dependencies as well:
Expand All @@ -117,19 +117,19 @@ If you want to see if all required packages are installed successfully, run the

Here is the expected output of that command:

argon2-20171227 C implementation of Argon2 - password hashing function
argon2-20190702 C implementation of Argon2 - password hashing function
bzip2-1.0.8 block-sorting file compressor, unencumbered
femail-1.0p1 simple SMTP client
femail-chroot-1.0p3 simple SMTP client for chrooted web servers
gettext-runtime-0.20.1p1 GNU gettext runtime libraries and programs
gettext-runtime-0.21 GNU gettext runtime libraries and programs
libiconv-1.16p0 character set conversion library
libsodium-1.0.18 library for network communications and cryptography
libxml-2.9.10p0 XML parsing library
oniguruma-6.9.5pl1 regular expressions library
pcre2-10.34 perl-compatible regular expression library, version 2
php-7.4.5p0 server-side HTML-embedded scripting language
php-cgi-7.4.5p0 php CGI binary
php-pcntl-7.4.5p0 PCNTL extensions for php
libsodium-1.0.18p1 library for network communications and cryptography
libxml-2.9.10p2 XML parsing library
oniguruma-6.9.5pl1p0 regular expressions library
pcre2-10.35 perl-compatible regular expression library, version 2
php-7.4.10 server-side HTML-embedded scripting language
php-cgi-7.4.10 php CGI binary
php-pcntl-7.4.10 PCNTL extensions for php
xz-5.2.5 LZMA compression and decompression tools

### Install PFRE
Expand Down Expand Up @@ -286,4 +286,3 @@ Now you can either reboot the system or start the php cgi server and the web ser
# /usr/sbin/httpd

Finally, if you point your web browser to the IP address of PFRE, you should see the login page. And you should be able to log in by entering admin:soner123 as user and password.

10 changes: 5 additions & 5 deletions src/View/lib/phpseclib/Crypt/RSA.php
Original file line number Diff line number Diff line change
Expand Up @@ -1609,12 +1609,12 @@ function. As is, the definitive authority on this encoding scheme isn't the IET
&$components['primes'][2]
);

foreach ($values as &$value) {
for ($i = 0; $i < count($values); $i++) {
extract(unpack('Nlength', $this->_string_shift($paddedKey, 4)));
if (strlen($paddedKey) < $length) {
return false;
}
$value = new Math_BigInteger($this->_string_shift($paddedKey, $length), -256);
$values[$i] = new Math_BigInteger($this->_string_shift($paddedKey, $length), -256);
}

extract(unpack('Nlength', $this->_string_shift($paddedKey, 4)));
Expand Down Expand Up @@ -2852,7 +2852,7 @@ function _emsa_pss_verify($m, $em, $emBits)
// if $m is larger than two million terrabytes and you're using sha1, PKCS#1 suggests a "Label too long" error
// be output.

$emLen = ($emBits + 1) >> 3; // ie. ceil($emBits / 8);
$emLen = ($emBits + 7) >> 3; // ie. ceil($emBits / 8);
$sLen = $this->sLen !== null ? $this->sLen : $this->hLen;

$mHash = $this->hash->hash($m);
Expand Down Expand Up @@ -2930,15 +2930,15 @@ function _rsassa_pss_verify($m, $s)

// RSA verification

$modBits = 8 * $this->k;
$modBits = strlen($this->modulus->toBits());

$s2 = $this->_os2ip($s);
$m2 = $this->_rsavp1($s2);
if ($m2 === false) {
user_error('Invalid signature');
return false;
}
$em = $this->_i2osp($m2, $modBits >> 3);
$em = $this->_i2osp($m2, $this->k);
if ($em === false) {
user_error('Invalid signature');
return false;
Expand Down
5 changes: 4 additions & 1 deletion src/View/lib/phpseclib/Crypt/Random.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ function crypt_random_string($length)
$fp = @fopen('/dev/urandom', 'rb');
}
if ($fp !== true && $fp !== false) { // surprisingly faster than !is_bool() or is_resource()
return fread($fp, $length);
$temp = fread($fp, $length);
if (strlen($temp) == $length) {
return $temp;
}
}
// method 3. pretty much does the same thing as method 2 per the following url:
// https://github.com/php/php-src/blob/7014a0eb6d1611151a286c0ff4f2238f92c120d6/ext/mcrypt/mcrypt.c#L1391
Expand Down
Loading

0 comments on commit 80fbeae

Please sign in to comment.