| 381 | | pw_utils::printDebug("X509Certificate: " . pw_utils::printBinary("X509Certificate", $X509Certificate) . "<br/>"); |
|---|
| | 381 | $escapedcert = ""; |
|---|
| | 382 | $tok = strtok($X509Certificate, "\n"); |
|---|
| | 383 | while ($tok !== false) { |
|---|
| | 384 | //pw_utils::printDebug("TOK: " . $tok . "<br/>"); |
|---|
| | 385 | $escapedcert .= $tok; |
|---|
| | 386 | $tok = strtok("\n"); |
|---|
| | 387 | } |
|---|
| | 388 | if ( $X509Certificate !== $escapedcert) |
|---|
| | 389 | { |
|---|
| | 390 | pw_utils::printDebug("Warning! newlines returned from X509 Certificate <br/>"); |
|---|
| | 391 | $X509Certificate = $escapedcert; |
|---|
| | 392 | } |
|---|
| | 393 | //pw_utils::printDebug("X509Certificate: " . pw_utils::printBinary("X509Certificate", $X509Certificate) . "<br/>"); |
|---|
| 404 | | //if (array_key_exists("parsedVariables", $_POST)){ |
|---|
| 405 | | pw_utils::printDebug("<br/> CalculatedDigest:$locallyCalculatedDigest <br/>" |
|---|
| 406 | | . " Modulus:$modulus <br/>" |
|---|
| 407 | | . " Exponent: " . pw_utils::printBinary("Exponent",$exponent)." <br/>" |
|---|
| 408 | | . " Signature: ".pw_utils::printBinary("Signature",$SignatureValue)." <br/>"); |
|---|
| 409 | | |
|---|
| 410 | | pw_utils::printDebug(" X509 Certificate: " . pw_utils::printBinary('X509 Cert', $X509Certificate)." <br/><br/>"); |
|---|
| 411 | | //} |
|---|
| | 416 | pw_utils::printDebug("CalculatedDigest: " . htmlspecialchars($locallyCalculatedDigest) . "<br />"); |
|---|
| | 417 | pw_utils::printDebug( pw_utils::printBinary( "Modulus", $modulus ) |
|---|
| | 418 | . pw_utils::printBinary( "Exponent", $exponent ) |
|---|
| | 419 | . pw_utils::printBinary( "Signature", $SignatureValue )); |
|---|
| | 420 | |
|---|
| | 421 | pw_utils::printDebug(pw_utils::printBinary('X509 Certificate', $X509Certificate)); |
|---|