blob: 6fa92898e10691621a5ff28a282112c2edc05a51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
diff -aurN a/CHAP.php b/CHAP.php
--- a/CHAP.php 1970-01-01 04:13:08.000000000 -0500
+++ b/CHAP.php 2018-02-13 13:04:49.812389739 -0500
@@ -78,7 +78,19 @@
* @var integer
*/
var $chapid = 1;
-
+
+ /**
+ * Constructor
+ *
+ * Generates a random challenge
+ * @return void
+ */
+ function __construct()
+ {
+ parent::__construct();
+ $this->generateChallenge();
+ }
+
/**
* Constructor
*
@@ -160,7 +172,19 @@
* @var bool
*/
var $flags = 1;
-
+
+ /**
+ * Constructor
+ *
+ * Loads the hash extension
+ * @return void
+ */
+ function __construct()
+ {
+ parent::__construct();
+ $this->loadExtension('hash');
+ }
+
/**
* Constructor
*
@@ -412,6 +436,19 @@
/**
* Constructor
*
+ * Generates the 16 Bytes peer and authentication challenge
+ * @return void
+ */
+ function __construct()
+ {
+ parent::__construct();
+ $this->generateChallenge('peerChallenge', 16);
+ $this->generateChallenge('authChallenge', 16);
+ }
+
+ /**
+ * Constructor
+ *
* Generates the 16 Bytes peer and authentication challenge
* @return void
*/
|