Premaknjena koda za squalo iz modulov v classes
This commit is contained in:
parent
e9e30fdbfa
commit
89b861119b
@ -10,9 +10,9 @@ ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
include_once '../../definition.php';
|
||||
include_once '../../../../function.php';
|
||||
include_once '../../../../vendor/autoload.php';
|
||||
include_once '../../../definition.php';
|
||||
include_once '../../../../../function.php';
|
||||
include_once '../../../../../vendor/autoload.php';
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ class SurveyInvitationsSqualo {
|
||||
global $admin_type;
|
||||
global $squalo_user;
|
||||
global $squalo_key;
|
||||
|
||||
return true;
|
||||
// Zaenkrat imajo squalo samo admini
|
||||
if($admin_type != 0)
|
||||
return false;
|
32
composer.lock
generated
32
composer.lock
generated
@ -66,16 +66,16 @@
|
||||
},
|
||||
{
|
||||
"name": "fgrosse/phpasn1",
|
||||
"version": "v2.2.0",
|
||||
"version": "v2.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fgrosse/PHPASN1.git",
|
||||
"reference": "d1978f7abd580f3fc33561e7f71d4c12c7531fad"
|
||||
"reference": "20299033c35f4300eb656e7e8e88cf52d1d6694e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/d1978f7abd580f3fc33561e7f71d4c12c7531fad",
|
||||
"reference": "d1978f7abd580f3fc33561e7f71d4c12c7531fad",
|
||||
"url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/20299033c35f4300eb656e7e8e88cf52d1d6694e",
|
||||
"reference": "20299033c35f4300eb656e7e8e88cf52d1d6694e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -133,7 +133,7 @@
|
||||
"x509",
|
||||
"x690"
|
||||
],
|
||||
"time": "2020-10-11 16:28:18"
|
||||
"time": "2021-04-24 19:01:55"
|
||||
},
|
||||
{
|
||||
"name": "geoip2/geoip2",
|
||||
@ -2085,16 +2085,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
|
||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
|
||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2118,7 +2118,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for logging libraries",
|
||||
@ -2128,7 +2128,7 @@
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"time": "2020-03-23 09:12:05"
|
||||
"time": "2021-05-03 11:20:27"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
@ -2261,16 +2261,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.21",
|
||||
"version": "v4.4.22",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806"
|
||||
"reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/0da0e174f728996f5d5072d6a9f0a42259dbc806",
|
||||
"reference": "0da0e174f728996f5d5072d6a9f0a42259dbc806",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
|
||||
"reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2329,7 +2329,7 @@
|
||||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"time": "2021-03-27 19:49:03"
|
||||
"time": "2021-04-19 13:36:17"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
4
vendor/composer/autoload_classmap.php
vendored
4
vendor/composer/autoload_classmap.php
vendored
@ -684,7 +684,7 @@ return array(
|
||||
'Sonata\\GoogleAuthenticator\\GoogleQrUrl' => $vendorDir . '/sonata-project/google-authenticator/src/GoogleQrUrl.php',
|
||||
'Sonata\\GoogleAuthenticator\\RuntimeException' => $vendorDir . '/sonata-project/google-authenticator/src/RuntimeException.php',
|
||||
'SpremenljivkaSkala' => $baseDir . '/admin/survey/classes/objects/obj.SpremenljivkaSkala.php',
|
||||
'SqualoApi' => $baseDir . '/admin/survey/modules/mod_squalo/class.SqualoApi.php',
|
||||
'SqualoApi' => $baseDir . '/admin/survey/classes/surveyEmails/squalo/class.SqualoApi.php',
|
||||
'SteviloLatex' => $baseDir . '/admin/survey/export/latexclasses/Vprasanja/SteviloLatex.php',
|
||||
'SteviloXml' => $baseDir . '/admin/survey/export/xmlClasses/Vprasanja/SteviloXml.php',
|
||||
'Stripe\\Account' => $vendorDir . '/stripe/stripe-php/lib/Account.php',
|
||||
@ -948,7 +948,7 @@ return array(
|
||||
'SurveyInfo' => $baseDir . '/admin/survey/classes/class.SurveyInfo.php',
|
||||
'SurveyInspect' => $baseDir . '/admin/survey/classes/class.SurveyInpect.php',
|
||||
'SurveyInvitationsNew' => $baseDir . '/admin/survey/classes/surveyEmails/class.SurveyInvitationsNew.php',
|
||||
'SurveyInvitationsSqualo' => $baseDir . '/admin/survey/modules/mod_squalo/class.SurveyInvitationsSqualo.php',
|
||||
'SurveyInvitationsSqualo' => $baseDir . '/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php',
|
||||
'SurveyJsonSurveyData' => $baseDir . '/admin/survey/modules/mod_json_survey_export/class.SurveyJsonSurveyData.php',
|
||||
'SurveyKakovost' => $baseDir . '/admin/survey/modules/mod_kakovost/class.SurveyKakovost.php',
|
||||
'SurveyLanguageTechnology' => $baseDir . '/admin/survey/classes/class.SurveyLanguageTechnology.php',
|
||||
|
4
vendor/composer/autoload_static.php
vendored
4
vendor/composer/autoload_static.php
vendored
@ -888,7 +888,7 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
|
||||
'Sonata\\GoogleAuthenticator\\GoogleQrUrl' => __DIR__ . '/..' . '/sonata-project/google-authenticator/src/GoogleQrUrl.php',
|
||||
'Sonata\\GoogleAuthenticator\\RuntimeException' => __DIR__ . '/..' . '/sonata-project/google-authenticator/src/RuntimeException.php',
|
||||
'SpremenljivkaSkala' => __DIR__ . '/../..' . '/admin/survey/classes/objects/obj.SpremenljivkaSkala.php',
|
||||
'SqualoApi' => __DIR__ . '/../..' . '/admin/survey/modules/mod_squalo/class.SqualoApi.php',
|
||||
'SqualoApi' => __DIR__ . '/../..' . '/admin/survey/classes/surveyEmails/squalo/class.SqualoApi.php',
|
||||
'SteviloLatex' => __DIR__ . '/../..' . '/admin/survey/export/latexclasses/Vprasanja/SteviloLatex.php',
|
||||
'SteviloXml' => __DIR__ . '/../..' . '/admin/survey/export/xmlClasses/Vprasanja/SteviloXml.php',
|
||||
'Stripe\\Account' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Account.php',
|
||||
@ -1152,7 +1152,7 @@ class ComposerStaticInit6b03163c371c5541881b55b762b8c779
|
||||
'SurveyInfo' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyInfo.php',
|
||||
'SurveyInspect' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyInpect.php',
|
||||
'SurveyInvitationsNew' => __DIR__ . '/../..' . '/admin/survey/classes/surveyEmails/class.SurveyInvitationsNew.php',
|
||||
'SurveyInvitationsSqualo' => __DIR__ . '/../..' . '/admin/survey/modules/mod_squalo/class.SurveyInvitationsSqualo.php',
|
||||
'SurveyInvitationsSqualo' => __DIR__ . '/../..' . '/admin/survey/classes/surveyEmails/squalo/class.SurveyInvitationsSqualo.php',
|
||||
'SurveyJsonSurveyData' => __DIR__ . '/../..' . '/admin/survey/modules/mod_json_survey_export/class.SurveyJsonSurveyData.php',
|
||||
'SurveyKakovost' => __DIR__ . '/../..' . '/admin/survey/modules/mod_kakovost/class.SurveyKakovost.php',
|
||||
'SurveyLanguageTechnology' => __DIR__ . '/../..' . '/admin/survey/classes/class.SurveyLanguageTechnology.php',
|
||||
|
146
vendor/composer/installed.json
vendored
146
vendor/composer/installed.json
vendored
@ -182,79 +182,6 @@
|
||||
"url"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fgrosse/phpasn1",
|
||||
"version": "v2.2.0",
|
||||
"version_normalized": "2.2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fgrosse/PHPASN1.git",
|
||||
"reference": "d1978f7abd580f3fc33561e7f71d4c12c7531fad"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/d1978f7abd580f3fc33561e7f71d4c12c7531fad",
|
||||
"reference": "d1978f7abd580f3fc33561e7f71d4c12c7531fad",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"satooshi/php-coveralls": "~2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "BCmath is the fallback extension for big integer calculations",
|
||||
"ext-curl": "For loading OID information from the web if they have not bee defined statically",
|
||||
"ext-gmp": "GMP is the preferred extension for big integer calculations",
|
||||
"phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available"
|
||||
},
|
||||
"time": "2020-10-11 16:28:18",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"FG\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Friedrich Große",
|
||||
"email": "friedrich.grosse@gmail.com",
|
||||
"homepage": "https://github.com/FGrosse",
|
||||
"role": "Author"
|
||||
},
|
||||
{
|
||||
"name": "All contributors",
|
||||
"homepage": "https://github.com/FGrosse/PHPASN1/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.",
|
||||
"homepage": "https://github.com/FGrosse/PHPASN1",
|
||||
"keywords": [
|
||||
"DER",
|
||||
"asn.1",
|
||||
"asn1",
|
||||
"ber",
|
||||
"binary",
|
||||
"decoding",
|
||||
"encoding",
|
||||
"x.509",
|
||||
"x.690",
|
||||
"x509",
|
||||
"x690"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "web-token/jwt-core",
|
||||
"version": "v1.3.10",
|
||||
@ -1961,5 +1888,78 @@
|
||||
"uri",
|
||||
"url"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fgrosse/phpasn1",
|
||||
"version": "v2.3.0",
|
||||
"version_normalized": "2.3.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fgrosse/PHPASN1.git",
|
||||
"reference": "20299033c35f4300eb656e7e8e88cf52d1d6694e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/20299033c35f4300eb656e7e8e88cf52d1d6694e",
|
||||
"reference": "20299033c35f4300eb656e7e8e88cf52d1d6694e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~6.3",
|
||||
"satooshi/php-coveralls": "~2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "BCmath is the fallback extension for big integer calculations",
|
||||
"ext-curl": "For loading OID information from the web if they have not bee defined statically",
|
||||
"ext-gmp": "GMP is the preferred extension for big integer calculations",
|
||||
"phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available"
|
||||
},
|
||||
"time": "2021-04-24 19:01:55",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"FG\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Friedrich Große",
|
||||
"email": "friedrich.grosse@gmail.com",
|
||||
"homepage": "https://github.com/FGrosse",
|
||||
"role": "Author"
|
||||
},
|
||||
{
|
||||
"name": "All contributors",
|
||||
"homepage": "https://github.com/FGrosse/PHPASN1/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.",
|
||||
"homepage": "https://github.com/FGrosse/PHPASN1",
|
||||
"keywords": [
|
||||
"DER",
|
||||
"asn.1",
|
||||
"asn1",
|
||||
"ber",
|
||||
"binary",
|
||||
"decoding",
|
||||
"encoding",
|
||||
"x.509",
|
||||
"x.690",
|
||||
"x509",
|
||||
"x690"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
4
vendor/fgrosse/phpasn1/CHANGELOG.md
vendored
4
vendor/fgrosse/phpasn1/CHANGELOG.md
vendored
@ -1,3 +1,7 @@
|
||||
#### v2.3.0 (2021-04)
|
||||
* Allow creating an unsigned CSR and adding the signature later
|
||||
https://github.com/fgrosse/PHPASN1/pull/82
|
||||
|
||||
#### v2.2.0 (2020-08)
|
||||
* support polyfills for bcmath and gmp, and add a composer.json
|
||||
suggestion for the `phpseclib/bcmath_polyfill` for servers unable
|
||||
|
1
vendor/fgrosse/phpasn1/lib/ASN1/OID.php
vendored
1
vendor/fgrosse/phpasn1/lib/ASN1/OID.php
vendored
@ -15,6 +15,7 @@ class OID
|
||||
const RSA_ENCRYPTION = '1.2.840.113549.1.1.1';
|
||||
const MD5_WITH_RSA_ENCRYPTION = '1.2.840.113549.1.1.4';
|
||||
const SHA1_WITH_RSA_SIGNATURE = '1.2.840.113549.1.1.5';
|
||||
const SHA256_WITH_RSA_SIGNATURE = '1.2.840.113549.1.1.11';
|
||||
const PKCS9_EMAIL = '1.2.840.113549.1.9.1';
|
||||
const PKCS9_UNSTRUCTURED_NAME = '1.2.840.113549.1.9.2';
|
||||
const PKCS9_CONTENT_TYPE = '1.2.840.113549.1.9.3';
|
||||
|
24
vendor/fgrosse/phpasn1/lib/X509/CSR/CSR.php
vendored
24
vendor/fgrosse/phpasn1/lib/X509/CSR/CSR.php
vendored
@ -41,7 +41,7 @@ class CSR extends Sequence
|
||||
* @param string $signature
|
||||
* @param string $signatureAlgorithm
|
||||
*/
|
||||
public function __construct($commonName, $email, $organization, $locality, $state, $country, $organizationalUnit, $publicKey, $signature, $signatureAlgorithm = OID::SHA1_WITH_RSA_SIGNATURE)
|
||||
public function __construct($commonName, $email, $organization, $locality, $state, $country, $organizationalUnit, $publicKey, $signature = null, $signatureAlgorithm = OID::SHA1_WITH_RSA_SIGNATURE)
|
||||
{
|
||||
$this->subject = new CertificateSubject(
|
||||
$commonName,
|
||||
@ -56,8 +56,10 @@ class CSR extends Sequence
|
||||
$this->signature = $signature;
|
||||
$this->signatureAlgorithm = $signatureAlgorithm;
|
||||
|
||||
if (isset($signature)) {
|
||||
$this->createCSRSequence();
|
||||
}
|
||||
}
|
||||
|
||||
protected function createCSRSequence()
|
||||
{
|
||||
@ -68,11 +70,31 @@ class CSR extends Sequence
|
||||
|
||||
$certRequestInfo = new Sequence($versionNr, $this->subject, $publicKey);
|
||||
|
||||
// Clear the underlying Construct
|
||||
$this->rewind();
|
||||
$this->children = [];
|
||||
$this->addChild($certRequestInfo);
|
||||
$this->addChild($signatureAlgorithm);
|
||||
$this->addChild($signature);
|
||||
}
|
||||
|
||||
public function getSignatureSubject()
|
||||
{
|
||||
$versionNr = new Integer(self::CSR_VERSION_NR);
|
||||
$publicKey = new PublicKey($this->publicKey);
|
||||
|
||||
$certRequestInfo = new Sequence($versionNr, $this->subject, $publicKey);
|
||||
return $certRequestInfo->getBinary();
|
||||
}
|
||||
|
||||
public function setSignature($signature, $signatureAlgorithm = OID::SHA1_WITH_RSA_SIGNATURE)
|
||||
{
|
||||
$this->signature = $signature;
|
||||
$this->signatureAlgorithm = $signatureAlgorithm;
|
||||
|
||||
$this->createCSRSequence();
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
$tmp = base64_encode($this->getBinary());
|
||||
|
Loading…
x
Reference in New Issue
Block a user