VirtualBox

Changeset 86549 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Oct 12, 2020 11:59:53 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140868
Message:

SUPHardNt,IPRT: If there are nested signatures (i.e. more than one signature), don't get grumpy if there are time or cert path issues with some of them, as long as one or more checks out perfectly. (Mind, all the signature data must check out, it's just the cert path or signing time we're relaxing here.) ticketref:19743 bugref:3103

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/ldr.h

    r85121 r86549  
    12081208
    12091209/**
     1210 * Signature information provided by FNRTLDRVALIDATESIGNEDDATA.
     1211 */
     1212typedef struct RTLDRSIGNATUREINFO
     1213{
     1214    /** The signature number (0-based). */
     1215    uint16_t            iSignature;
     1216    /** The total number of signatures. */
     1217    uint16_t            cSignatures;
     1218    /** Sginature format type. */
     1219    RTLDRSIGNATURETYPE  enmType;
     1220    /** The signature data (formatted according to enmType). */
     1221    void const         *pvSignature;
     1222    /** The size of the buffer pvSignature points to. */
     1223    size_t              cbSignature;
     1224    /** Pointer to the signed data, if external.
     1225     * NULL if the data is internal to the signature structure. */
     1226    void const         *pvExternalData;
     1227    /** Size of the signed data, if external.
     1228     * 0 if internal to the signature structure. */
     1229    size_t              cbExternalData;
     1230} RTLDRSIGNATUREINFO;
     1231/** Pointer to a signature structure. */
     1232typedef RTLDRSIGNATUREINFO *PRTLDRSIGNATUREINFO;
     1233/** Pointer to a const signature structure. */
     1234typedef RTLDRSIGNATUREINFO const *PCRTLDRSIGNATUREINFO;
     1235
     1236/**
    12101237 * Callback used by RTLdrVerifySignature to verify the signature and associated
    12111238 * certificates.
    12121239 *
    1213  * @returns IPRT status code.
     1240 * This is called multiple times when the executable contains more than one
     1241 * signature (PE only at the moment).  The RTLDRSIGNATUREINFO::cSignatures gives
     1242 * the total number of signatures (and thereby callbacks) and
     1243 * RTLDRSIGNATUREINFO::iSignature indicates the current one.
     1244 *
     1245 * @returns IPRT status code.  A status code other than VINF_SUCCESS will
     1246 *          prevent callbacks the remaining signatures (if any).
    12141247 * @param   hLdrMod         The module handle.
    12151248 * @param   enmSignature    The signature format.
    1216  * @param   pvSignature     The signature data. Format given by @a enmSignature.
    1217  * @param   cbSignature     The size of the buffer @a pvSignature points to.
    1218  * @param   pvExternalData  Pointer to the signed data, if external. NULL if the
    1219  *                          data is internal to the signature structure.
    1220  * @param   cbExternalData Size of the signed data, if external.  0 if
    1221  *                          internal to the signature structure.
     1249 * @param   pInfo           Signature information.
    12221250 * @param   pErrInfo        Pointer to an error info buffer, optional.
    12231251 * @param   pvUser          User argument.
    12241252 *
    12251253 */
    1226 typedef DECLCALLBACKTYPE(int, FNRTLDRVALIDATESIGNEDDATA,(RTLDRMOD hLdrMod, RTLDRSIGNATURETYPE enmSignature,
    1227                                                          void const *pvSignature, size_t cbSignature,
    1228                                                          void const *pvExternalData, size_t cbExternalData,
     1254typedef DECLCALLBACKTYPE(int, FNRTLDRVALIDATESIGNEDDATA,(RTLDRMOD hLdrMod, PCRTLDRSIGNATUREINFO pInfo,
    12291255                                                         PRTERRINFO pErrInfo, void *pvUser));
    12301256/** Pointer to a signature verification callback. */
Note: See TracChangeset for help on using the changeset viewer.

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