VirtualBox

Changeset 51823 in vbox for trunk/src


Ignore:
Timestamp:
Jul 2, 2014 10:29:20 PM (11 years ago)
Author:
vboxsync
Message:

Better error message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/crypto/x509-certpaths.cpp

    r51770 r51823  
    270270    /** An object identifier initialized to anyPolicy. */
    271271    RTASN1OBJID                         AnyPolicyObjId;
     272
     273    /** Temporary scratch space. */
     274    char                                szTmp[1024];
    272275} RTCRX509CERTPATHSINT;
    273276typedef RTCRX509CERTPATHSINT *PRTCRX509CERTPATHSINT;
     
    19631966     * 6.1.3.a.2 - Verify that the certificate is valid at the specified time.
    19641967     */
     1968    AssertCompile(sizeof(pThis->szTmp) >= 36 * 3);
    19651969    if (!RTCrX509Validity_IsValidAtTimeSpec(&pNode->pCert->TbsCertificate.Validity, &pThis->ValidTime))
    1966         return rtCrX509CpvFailed(pThis, VERR_CR_X509_CPV_NOT_VALID_AT_TIME, "Certificate is not valid");
     1970        return rtCrX509CpvFailed(pThis, VERR_CR_X509_CPV_NOT_VALID_AT_TIME,
     1971                                 "Certificate is not valid (ValidTime=%s Validity=[%s...%s])",
     1972                                 RTTimeSpecToString(&pThis->ValidTime, &pThis->szTmp[0], 36),
     1973                                 RTTimeToString(&pNode->pCert->TbsCertificate.Validity.NotBefore.Time, &pThis->szTmp[36], 36),
     1974                                 RTTimeToString(&pNode->pCert->TbsCertificate.Validity.NotAfter.Time,  &pThis->szTmp[2*36], 36) );
    19671975
    19681976    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette