- //10 Sept 2016
- ok_status(SecTrustSetVerifyDate(trust, (__bridge CFDateRef)[NSDate dateWithTimeIntervalSinceReferenceDate:495245242.0]), "set verify date");
- ok_status(SecTrustEvaluate(trust, &trustResult), "evaluate trust");
- is(trustResult, kSecTrustResultUnspecified, "trust suceeded");
+ /* verify that CMS stack found the certs in the CMS (using the SKID) and stuck them in the trust ref */
+ ok_status(SecTrustCopyInputCertificates(trust, &certificates), "copy input certificates");
+#if TARGET_OS_OSX
+ // macOS implementation of CMS puts the leaf first and then adds all certs (so the signer cert is included twice)
+ is(CFArrayGetCount(certificates), 4, "4 certs in the cms");
+#else
+ // embedded implementation of CMS just orders the certs so the signer cert is first
+ is(CFArrayGetCount(certificates), 3, "3 certs in the cms");
+#endif