Changeset 52537 in vbox for trunk/include/iprt/crypto
- Timestamp:
- Aug 31, 2014 7:28:17 PM (10 years ago)
- Location:
- trunk/include/iprt/crypto
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/crypto/pkcs7.h
r52503 r52537 174 174 #define RTCR_PKCS9_ID_COUNTER_SIGNATURE_OID "1.2.840.113549.1.9.6" 175 175 /** @} */ 176 177 /** 178 * Get the (next) signing time attribute from the specfied SignerInfo or one of 179 * the immediate counter signatures. 180 * 181 * @returns Pointer to the signing time if found, NULL if not. 182 * @param pThis The SignerInfo to search. 183 * @param ppSignerInfo Pointer to variable keeping track of the 184 * enumeration, optional. 185 * 186 * If specified the input value is taken to the be 187 * SignerInfo of the previously returned signing 188 * time. The value pointed to is NULL, the 189 * search/enum restarts. 190 * 191 * On successful return this is set to the 192 * SignerInfo which we found the signing time in. 193 */ 194 RTDECL(PCRTASN1TIME) RTCrPkcs7SignerInfo_GetSigningTime(PCRTCRPKCS7SIGNERINFO pThis, PCRTCRPKCS7SIGNERINFO *ppSignerInfo); 195 176 196 177 197 … … 302 322 * This is NIL_RTCRX509CERTPATHS if the certificate 303 323 * is directly trusted. 324 * @param fFlags Mix of the RTCRPKCS7VCC_F_XXX flags. 304 325 * @param pvUser The user argument. 305 326 * @param pErrInfo Optional error info buffer. 306 327 */ 307 typedef DECLCALLBACK(int) RTCRPKCS7VERIFYCERTCALLBACK(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, 308 void *pvUser, PRTERRINFO pErrInfo); 309 /** Pointer to a RTCRPKCS7VERIFYCERTCALLBACK callback. */ 310 typedef RTCRPKCS7VERIFYCERTCALLBACK *PRTCRPKCS7VERIFYCERTCALLBACK; 328 typedef DECLCALLBACK(int) FNRTCRPKCS7VERIFYCERTCALLBACK(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, 329 uint32_t fFlags, void *pvUser, PRTERRINFO pErrInfo); 330 /** Pointer to a FNRTCRPKCS7VERIFYCERTCALLBACK callback. */ 331 typedef FNRTCRPKCS7VERIFYCERTCALLBACK *PFNRTCRPKCS7VERIFYCERTCALLBACK; 332 333 /** @name RTCRPKCS7VCC_F_XXX - Flags for FNRTCRPKCS7VERIFYCERTCALLBACK. 334 * @{ */ 335 /** Normal callback for a direct signatory of the signed data. */ 336 #define RTCRPKCS7VCC_F_SIGNED_DATA RT_BIT_32(0) 337 /** Check that the signatory can be trusted for timestamps. */ 338 #define RTCRPKCS7VCC_F_TIMESTAMP RT_BIT_32(1) 339 /** @} */ 311 340 312 341 /** … … 314 343 * Default implementation that checks for the DigitalSignature KeyUsage bit.} 315 344 */ 316 RTDECL(int) RTCrPkcs7VerifyCertCallbackDefault(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, 345 RTDECL(int) RTCrPkcs7VerifyCertCallbackDefault(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, uint32_t fFlags, 317 346 void *pvUser, PRTERRINFO pErrInfo); 318 347 … … 321 350 * Standard code signing. Use this for Microsoft SPC.} 322 351 */ 323 RTDECL(int) RTCrPkcs7VerifyCertCallbackCodeSigning(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, 352 RTDECL(int) RTCrPkcs7VerifyCertCallbackCodeSigning(PCRTCRX509CERTIFICATE pCert, RTCRX509CERTPATHS hCertPaths, uint32_t fFlags, 324 353 void *pvUser, PRTERRINFO pErrInfo); 325 354 … … 337 366 * @param hTrustedCerts Store containing trusted certificates. 338 367 * @param pValidationTime The time we're supposed to validate the 339 * certificates chains at. 368 * certificates chains at. Ignored for signatures 369 * with valid signing time attributes. 340 370 * @param pfnVerifyCert Callback for checking that a certificate used 341 371 * for signing the data is suitable. … … 345 375 RTDECL(int) RTCrPkcs7VerifySignedData(PCRTCRPKCS7CONTENTINFO pContentInfo, uint32_t fFlags, 346 376 RTCRSTORE hAdditionalCerts, RTCRSTORE hTrustedCerts, 347 PCRTTIMESPEC pValidationTime, P RTCRPKCS7VERIFYCERTCALLBACK pfnVerifyCert, void *pvUser,377 PCRTTIMESPEC pValidationTime, PFNRTCRPKCS7VERIFYCERTCALLBACK pfnVerifyCert, void *pvUser, 348 378 PRTERRINFO pErrInfo); 349 379 350 380 /** @name RTCRPKCS7VERIFY_SD_F_XXX - Flags for RTCrPkcs7VerifySignedData 351 381 * @{ */ 382 /** Always use the signing time attribute if present, requiring it to be 383 * verified as valid. The default behavior is to ignore unverifiable 384 * signing time attributes and use the @a pValidationTime instead. */ 385 #define RTCRPKCS7VERIFY_SD_F_ALWAYS_USE_SIGNING_TIME_IF_PRESENT RT_BIT_32(0) 386 /** Only use signging time attributes from counter signatures. */ 387 #define RTCRPKCS7VERIFY_SD_F_COUNTER_SIGNATURE_SIGNING_TIME_ONLY RT_BIT_32(1) 388 /** Don't validate the counter signature containing the signing time, just use 389 * it unverified. This is useful if we don't necessarily have the root 390 * certificates for the timestamp server handy, but use with great care. */ 391 #define RTCRPKCS7VERIFY_SD_F_USE_SIGNING_TIME_UNVERIFIED RT_BIT_32(2) 392 /** Indicates internally that we're validating a counter signature and should 393 * use different rules when checking out the authenticated attributes. 394 * @internal */ 395 #define RTCRPKCS7VERIFY_SD_F_COUNTER_SIGNATURE RT_BIT_32(31) 352 396 /** @} */ 353 397 -
trunk/include/iprt/crypto/x509.h
r51856 r52537 801 801 #define RTCRX509CERT_EKU_F_IPSEC_TUNNEL RT_BIT_64(6) 802 802 #define RTCRX509CERT_EKU_F_IPSEC_USER RT_BIT_64(7) 803 #define RTCRX509CERT_EKU_F_TIME _STAMPINGRT_BIT_64(8)803 #define RTCRX509CERT_EKU_F_TIMESTAMPING RT_BIT_64(8) 804 804 #define RTCRX509CERT_EKU_F_OCSP_SIGNING RT_BIT_64(9) 805 805 #define RTCRX509CERT_EKU_F_DVCS RT_BIT_64(10) … … 835 835 #define RTCRX509_ID_KP_IPSEC_TUNNEL_OID "1.3.6.1.5.5.7.3.6" 836 836 #define RTCRX509_ID_KP_IPSEC_USER_OID "1.3.6.1.5.5.7.3.7" 837 #define RTCRX509_ID_KP_TIME _STAMPING_OID"1.3.6.1.5.5.7.3.8"837 #define RTCRX509_ID_KP_TIMESTAMPING_OID "1.3.6.1.5.5.7.3.8" 838 838 #define RTCRX509_ID_KP_OCSP_SIGNING_OID "1.3.6.1.5.5.7.3.9" 839 839 #define RTCRX509_ID_KP_DVCS_OID "1.3.6.1.5.5.7.3.10" … … 876 876 /** @} */ 877 877 878 /** @name Microsoftextended key usage OIDs878 /** @name Apple extended key usage OIDs 879 879 * @{ */ 880 880 #define RTCRX509_APPLE_EKU_APPLE_EXTENDED_KEY_USAGE_OID "1.2.840.113635.100.4"
Note:
See TracChangeset
for help on using the changeset viewer.