Sample code for 30+ languages & platforms
C++

Example: Crypt2.GetSignatureSigningTimeStr method

Demonstrates how to call the GetSignatureSigningTimeStr method.

Chilkat C++ Downloads

C++
#include <CkCrypt2.h>

void ChilkatSample(void)
    {
    bool success = false;

    CkCrypt2 crypt;

    success = crypt.VerifyP7M("qa_data/cades/CAdES-T/Signature-C-T-1.p7m","qa_output/out.dat");
    if (success == false) {
        std::cout << crypt.lastErrorText() << "\r\n";
        return;
    }

    int numSigners = crypt.get_NumSignerCerts();
    std::cout << "Num Signers = " << numSigners << "\r\n";

    int i = 0;
    while (i < numSigners) {
        if (crypt.HasSignatureSigningTime(i) == true) {
            std::cout << (i + 1) << ": " << crypt.getSignatureSigningTimeStr(i) << "\r\n";
        }
        else {
            std::cout << (i + 1) << ": has no signing time." << "\r\n";
        }

        i = i + 1;
    }

    //  Sample output:

    //  Num Signers = 1
    //  1: Sun, 03 Dec 2013 06:57:41 GMT
    }