context = NULL;
ret = CertAddEncodedCertificateToStore(0, X509_ASN_ENCODING, bigCert,
sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context);
- ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n",
- GetLastError());
+ ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */),
+ "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
if (context)
CertFreeCertificateContext(context);
+ if (!ret && GetLastError() == OSS_DATA_ERROR)
+ {
+ skip("bigCert can't be decoded, skipping tests\n");
+ return;
+ }
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL);
CRYPT_DATA_BLOB blob;
CERT_KEY_CONTEXT keyContext;
- ok(context != NULL, "CertCreateCertificateContext failed: %08x\n",
- GetLastError());
+ ok(context != NULL || broken(GetLastError() == OSS_DATA_ERROR /* win98 */),
+ "CertCreateCertificateContext failed: %08x\n", GetLastError());
if (!context)
return;
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, &context);
- ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n",
- GetLastError());
+ ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */),
+ "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
+ if (!ret && GetLastError() == OSS_DATA_ERROR)
+ {
+ skip("bigCert can't be decoded, skipping tests\n");
+ return;
+ }
ok(context != NULL, "Expected a valid cert context\n");
if (context)
{
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
bigCert, sizeof(bigCert), CERT_STORE_ADD_NEW, NULL);
- ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n",
- GetLastError());
+ ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */),
+ "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
+ if (!ret && GetLastError() == OSS_DATA_ERROR)
+ {
+ skip("bigCert can't be decoded, skipping tests\n");
+ return;
+ }
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
bigCert2, sizeof(bigCert2), CERT_STORE_ADD_NEW, NULL);
ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n",
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL);
- ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n",
- GetLastError());
+ ok(ret || broken(GetLastError() == OSS_DATA_ERROR /* win98 */),
+ "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
+ if (!ret && GetLastError() == OSS_DATA_ERROR)
+ {
+ skip("bigCert can't be decoded, skipping tests\n");
+ return;
+ }
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
bigCert2, sizeof(bigCert2), CERT_STORE_ADD_NEW, &context1);
ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n",
if (!pCryptVerifyCertificateSignatureEx)
{
- skip("no CryptVerifyCertificateSignatureEx support\n");
+ win_skip("no CryptVerifyCertificateSignatureEx support\n");
return;
}
if (!pCryptEncodeObjectEx)
{
- skip("no CryptEncodeObjectEx support\n");
+ win_skip("no CryptEncodeObjectEx support\n");
return;
}
ret = pCryptVerifyCertificateSignatureEx(0, 0, 0, NULL, 0, NULL, 0, NULL);
if (!pCertCreateSelfSignCertificate)
{
- skip("CertCreateSelfSignCertificate() is not available\n");
+ win_skip("CertCreateSelfSignCertificate() is not available\n");
return;
}
if (!pCertGetValidUsages)
{
- skip("CertGetValidUsages() is not available\n");
+ win_skip("CertGetValidUsages() is not available\n");
return;
}
if (!pCryptAcquireCertificatePrivateKey)
{
- skip("CryptAcquireCertificatePrivateKey() is not available\n");
+ win_skip("CryptAcquireCertificatePrivateKey() is not available\n");
return;
}