Skip to content

Commit

Permalink
changing debug levels to make tracking easier
Browse files Browse the repository at this point in the history
  • Loading branch information
twoln committed Mar 25, 2024
1 parent ba23887 commit a252ed3
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 439 deletions.
2 changes: 1 addition & 1 deletion core/AbstractDeployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function __construct($idpObject, $deploymentIdRaw = NULL)
$this->idpAttributes = $idp->getAttributes();
$fedObject = new Federation($idp->federation);
$this->fedAttributes = $fedObject->getAttributes();
$this->loggerInstance->debug(3, "--- END Constructing new AbstractDeployment object ... ---\n");
$this->loggerInstance->debug(4, "--- END Constructing new AbstractDeployment object ... ---\n");
}

/**
Expand Down
6 changes: 3 additions & 3 deletions core/CertificationAuthorityEduPkiServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ public function sendRequestToCa($csr, $revocationPin, $expiryDays): int
// the wire, so re-encode it!
$soapCleartext = $soap->getRawRequest($soapReqnum);

$this->loggerInstance->debug(5, "Actual received SOAP response for getRawRequest was:\n\n");
$this->loggerInstance->debug(5, $soap->__getLastResponse());
$this->loggerInstance->debug(2, "Actual received SOAP response for getRawRequest was:\n\n");
$this->loggerInstance->debug(2, $soap->__getLastResponse());
// for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file
// rather than just using the string. Grr.
$tempdir = \core\common\Entity::createTemporaryDirectory("test");
Expand All @@ -206,7 +206,7 @@ public function sendRequestToCa($csr, $revocationPin, $expiryDays): int
// $raKey = openssl_pkey_get_private("file://" . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey");
// sign the data, using cmdline because openssl_pkcs7_sign produces strange results
// -binary didn't help, nor switch -md to sha1 sha256 or sha512
$this->loggerInstance->debug(5, "Actual content to be signed is this:\n $soapCleartext\n");
$this->loggerInstance->debug(2, "Actual content to be signed is this:\n $soapCleartext\n");
$execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY . " -signer " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT;
$this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n");
$output = [];
Expand Down
6 changes: 3 additions & 3 deletions core/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private function __construct()
{
$this->typeDb = [];
$this->loggerInstance = new \core\common\Logging();
$this->loggerInstance->debug(3, "--- BEGIN constructing Options instance ---\n");
$this->loggerInstance->debug(4, "--- BEGIN constructing Options instance ---\n");
$handle = DBConnection::handle(self::$databaseType);
$options = $handle->exec("SELECT name,type,flag from profile_option_dict ORDER BY name");
// SELECT -> resource, not boolean
Expand All @@ -135,7 +135,7 @@ private function __construct()
$this->typeDb["internal:realm"] = ["type" => "string", "flag" => NULL];
$this->typeDb["internal:use_anon_outer"] = ["type" => "boolean", "flag" => NULL];
$this->typeDb["internal:anon_local_value"] = ["type" => "string", "flag" => NULL];
$this->loggerInstance->debug(3, "--- END constructing Options instance ---\n");
$this->loggerInstance->debug(4, "--- END constructing Options instance ---\n");
}

/**
Expand All @@ -150,7 +150,7 @@ private function __construct()
public function availableOptions($className = 0)
{
$tempArray = [];
$this->loggerInstance->debug(3, "CLASSNAME IS $className\n");
$this->loggerInstance->debug(4, "CLASSNAME IS $className\n");

foreach (array_keys($this->typeDb) as $name) {
if ($className === 0) {
Expand Down
2 changes: 1 addition & 1 deletion core/ProfileRADIUS.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function __construct($profileId, $idpObject = NULL)
$this->attributes = array_merge($this->attributes, $this->addInternalAttributes([ "internal:openroaming" => TRUE ] ));
}

$this->loggerInstance->debug(3, "--- END Constructing new Profile object ... ---\n");
$this->loggerInstance->debug(4, "--- END Constructing new Profile object ... ---\n");
}

/**
Expand Down
2 changes: 1 addition & 1 deletion core/ProfileSilverbullet.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function __construct($profileId, $idpObject = NULL) {

$this->name = ProfileSilverbullet::PRODUCTNAME;

$this->loggerInstance->debug(3, "--- END Constructing new Profile object ... ---\n");
$this->loggerInstance->debug(4, "--- END Constructing new Profile object ... ---\n");

$product = \core\ProfileSilverbullet::PRODUCTNAME;
$nameIdP = \config\ConfAssistant::CONSORTIUM['nomenclature_idp'];
Expand Down
2 changes: 1 addition & 1 deletion core/common/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ abstract class Entity
public function __construct()
{
$this->loggerInstance = new Logging();
$this->loggerInstance->debug(3, "--- BEGIN constructing class " . get_class($this) . " .\n");
$this->loggerInstance->debug(4, "--- BEGIN constructing class " . get_class($this) . " .\n");
$this->languageInstance = new Language();
Entity::intoThePotatoes("core");
// some config elements are displayable. We need some dummies to
Expand Down
Loading

0 comments on commit a252ed3

Please sign in to comment.