VirtualBox

Ignore:
Timestamp:
Sep 4, 2014 10:59:00 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
95876
Message:

IPRT: Added support for microsoft timestamp counter signatures. This required making the PKCS #7 code accept some of the CMS (RFC-5652) stuff.

Location:
trunk/src/VBox/Runtime/common/asn1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/asn1/asn1-cursor.cpp

    r52533 r52600  
    2828*   Header Files                                                               *
    2929*******************************************************************************/
     30#define RT_STRICT
    3031#include "internal/iprt.h"
    3132#include <iprt/asn1.h>
     
    4748 *
    4849 * For reference, 'RTSignTool verify-exe RTSignTool.exe', requires a value of 15
    49  * to work without hitting the limit.
     50 * to work without hitting the limit for signatures with simple timestamps, and
     51 * 23 (amd64/rel = ~3KB) for the new microsoft timestamp counter signatures.
    5052 */
    5153#ifdef IN_RING3
  • trunk/src/VBox/Runtime/common/asn1/asn1-dump.cpp

    r51858 r52600  
    8484static void rtAsn1DumpPrintIdent(PRTASN1DUMPDATA pData, uint32_t uDepth)
    8585{
    86     uint32_t i = 0;
    87     uDepth *= 2;
    88     while (i < uDepth)
     86    uint32_t cchLeft = uDepth * 2;
     87    while (cchLeft > 0)
    8988    {
    9089        static char const s_szSpaces[] = "                                        ";
    91         uint32_t cch = RT_MIN(uDepth, sizeof(s_szSpaces) - 1);
     90        uint32_t cch = RT_MIN(cchLeft, sizeof(s_szSpaces) - 1);
    9291        rtAsn1DumpPrintf(pData, &s_szSpaces[sizeof(s_szSpaces) - 1 - cch]);
    93         i += cch;
     92        cchLeft -= cch;
    9493    }
    9594}
  • trunk/src/VBox/Runtime/common/asn1/asn1-ut-time-decode.cpp

    r51770 r52600  
    178178     * Check the dot.
    179179     */
    180     if (*pchFraction == '.')
     180    if (*pchFraction != '.')
    181181        return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_INVALID_GENERALIZED_TIME_ENCODING,
    182182                                   "%s: Expected GeneralizedTime fraction dot, found: '%c' ('%.*s')",
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