Skip to content

Commit

Permalink
Merge pull request #4 from denpavl/master
Browse files Browse the repository at this point in the history
Update docs, add libs (PHP 7.3/7.4)
  • Loading branch information
Andrew Svirin authored Mar 23, 2020
2 parents 4dc1c23 + e71290e commit 9cc6372
Show file tree
Hide file tree
Showing 91 changed files with 97 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/EUSPHPE/Modules/Linux/32/eusphpei.5.5.9.tar
Binary file not shown.
Binary file added docs/EUSPHPE/Modules/Linux/32/eusphpei.5.6.9.tar
Binary file not shown.
Binary file added docs/EUSPHPE/Modules/Linux/32/eusphpei.7.0.5.tar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,40 @@ function bool_to_string($val) {

//----------------------------------------------------------------------------------------

/* Sign file internal */

$bExternal = false;

$iResult = euspe_signfile(
$sFileWithData, $sFileWithSigData, $bExternal, $iErrorCode);
if (!handle_result("SignFile (internal)", $iResult, $iErrorCode))
Exit;

print_result('Signed file', $sFileWithSigData);

$iResult = euspe_verifyfile(
$sFileWithSigData, $sFileWithVerData,
$sSignTime, $bIsTSPUse,
$spIssuer, $spIssuerCN, $spSerial,
$spSubject, $spSubjCN,
$spSubjOrg, $spSubjOrgUnit,
$spSubjTitle, $spSubjState,
$spSubjLocality, $spSubjFullName,
$spSubjAddress, $spSubjPhone,
$spSubjEMail, $spSubjDNS,
$spSubjEDRPOUCode, $spSubjDRFOCode,
$iErrorCode);
if (!handle_result("VerifyFile (internal)", $iResult, $iErrorCode))
Exit;

print_result('Verified file', $sFileWithVerData);
print_result('Signer info', '');
print_result($sTAB.'subject', $spSubjCN);
print_result($sTAB.'serial', $spSerial);
print_result($sTAB.'issuer', $spIssuerCN);

//----------------------------------------------------------------------------------------

/* Raw sign hash */

$sHash = '';
Expand Down Expand Up @@ -1677,6 +1711,69 @@ function ctx_test_hash_itterative($context, $iHashAlgo, $sData, $sCertificate) {

//----------------------------------------------------------------------------------------

/* Make internal sign from external sign */

$sSign = '';
$sSigner = '';
$sPreviousSign = '';
$signerInfo = null;
$sSignerCert = null;

$iResult = euspe_signcreateext(
$sData, $sSign, $iErrorCode);
if (!handle_result("SignData (external)", $iResult, $iErrorCode))
Exit;

$iResult = euspe_getsigner(
0, $sSign, $sSigner, $iErrorCode);
if (!handle_result("GetSigner", $iResult, $iErrorCode))
Exit;

$iResult = euspe_getsignerinfoex(
0, $sSign, $signerInfo, $sSignerCert, $iErrorCode);
if (!handle_result("GetSignerInfoEx", $iResult, $iErrorCode))
Exit;

$iResult = euspe_appendvalidationdatatosigner(
$sSigner, $sSignerCert, $sSigner, $iErrorCode);
if (!handle_result("AppendValidationDataToSigner", $iResult, $iErrorCode))
Exit;

$iResult = euspe_createemptysign(
$sData, $sPreviousSign, $iErrorCode);
if (!handle_result("CreateEmptySign", $iResult, $iErrorCode))
Exit;

$iResult = euspe_appendsigner(
$sSigner, $sSignerCert, $sPreviousSign, $sSign, $iErrorCode);
if (!handle_result("AppendSigner", $iResult, $iErrorCode))
Exit;

print_result('Sign', $sSign);

$iResult = euspe_signverify(
$sSign, $sSignTime, $bIsTSPUse,
$spIssuer, $spIssuerCN, $spSerial,
$spSubject, $spSubjCN,
$spSubjOrg, $spSubjOrgUnit,
$spSubjTitle, $spSubjState,
$spSubjLocality, $spSubjFullName,
$spSubjAddress, $spSubjPhone,
$spSubjEMail, $spSubjDNS,
$spSubjEDRPOUCode, $spSubjDRFOCode,
$sVerData,
$iErrorCode);
if (!handle_result("VerifySign (internal)", $iResult, $iErrorCode))
Exit;

print_result('Verified data', $sVerData);
print_result('Signer info', '');
print_result($sTAB.'subject', $spSubjCN);
print_result($sTAB.'serial', $spSerial);
print_result($sTAB.'issuer', $spIssuerCN);

//----------------------------------------------------------------------------------------

/* Finalize */

euspe_finalize();
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 9cc6372

Please sign in to comment.