Windows: Remove adding signing certificate to TrustedPublishers on XP since it doesn't bring any benefits

This commit is contained in:
Mounir IDRASSI 2022-01-06 23:47:53 +01:00
parent 47f542bfa7
commit 9ee48b9d60
No known key found for this signature in database
GPG Key ID: 02C30AE90FAE4A6F

View File

@ -2231,207 +2231,6 @@ void DoUninstall (void *arg)
OutcomePrompt (hwndDlg, bOK);
}
/* Microsoft code signing certificate that signs our driver*/
unsigned char g_pbCodeSignCert[1664] = {
0x30, 0x82, 0x06, 0x7C, 0x30, 0x82, 0x04, 0x64, 0xA0, 0x03, 0x02, 0x01,
0x02, 0x02, 0x13, 0x33, 0x00, 0x00, 0x00, 0x4D, 0xE5, 0x97, 0xA7, 0x75,
0xE3, 0x15, 0x7F, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x30, 0x0D,
0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B, 0x05,
0x00, 0x30, 0x81, 0x8E, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55,
0x04, 0x08, 0x13, 0x0A, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74,
0x6F, 0x6E, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
0x07, 0x52, 0x65, 0x64, 0x6D, 0x6F, 0x6E, 0x64, 0x31, 0x1E, 0x30, 0x1C,
0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x15, 0x4D, 0x69, 0x63, 0x72, 0x6F,
0x73, 0x6F, 0x66, 0x74, 0x20, 0x43, 0x6F, 0x72, 0x70, 0x6F, 0x72, 0x61,
0x74, 0x69, 0x6F, 0x6E, 0x31, 0x38, 0x30, 0x36, 0x06, 0x03, 0x55, 0x04,
0x03, 0x13, 0x2F, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74,
0x20, 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x54, 0x68, 0x69,
0x72, 0x64, 0x20, 0x50, 0x61, 0x72, 0x74, 0x79, 0x20, 0x43, 0x6F, 0x6D,
0x70, 0x6F, 0x6E, 0x65, 0x6E, 0x74, 0x20, 0x43, 0x41, 0x20, 0x32, 0x30,
0x31, 0x34, 0x30, 0x1E, 0x17, 0x0D, 0x32, 0x31, 0x30, 0x39, 0x30, 0x39,
0x31, 0x39, 0x31, 0x35, 0x35, 0x39, 0x5A, 0x17, 0x0D, 0x32, 0x32, 0x30,
0x39, 0x30, 0x31, 0x31, 0x39, 0x31, 0x35, 0x35, 0x39, 0x5A, 0x30, 0x81,
0x91, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13,
0x0A, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31,
0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x52, 0x65,
0x64, 0x6D, 0x6F, 0x6E, 0x64, 0x31, 0x1E, 0x30, 0x1C, 0x06, 0x03, 0x55,
0x04, 0x0A, 0x13, 0x15, 0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66,
0x74, 0x20, 0x43, 0x6F, 0x72, 0x70, 0x6F, 0x72, 0x61, 0x74, 0x69, 0x6F,
0x6E, 0x31, 0x3B, 0x30, 0x39, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x32,
0x4D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x57, 0x69,
0x6E, 0x64, 0x6F, 0x77, 0x73, 0x20, 0x48, 0x61, 0x72, 0x64, 0x77, 0x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0x22, 0x08, 0x19, 0x4A, 0x46,
0x7F, 0x99, 0x55, 0x1B, 0xB3, 0x93, 0xFF, 0x76, 0x96, 0x47, 0xC7, 0x72,
0x44, 0xB1, 0xB3, 0xFB, 0x8C, 0x57, 0x88, 0xDA, 0x88, 0xF2, 0x1C, 0x41,
0x64, 0xAD, 0x45, 0x59, 0x48, 0x6E, 0x19, 0xDB, 0xDC, 0xE5, 0x27, 0x89,
0xCB, 0x2E, 0x7C, 0x5C, 0x8E, 0xEC, 0xB9, 0x1E, 0xC8, 0x95, 0x55, 0xAE,
0xED, 0xCA, 0xEB, 0x86, 0x12, 0x6B, 0xD7, 0x33, 0x2F, 0xC5, 0x2C, 0xFC,
0x0F, 0x20, 0x77, 0x76, 0x9E, 0x56, 0x41, 0x63, 0x66, 0xA7, 0x80, 0xBE,
0x96, 0x50, 0x3E, 0xC5, 0xF4, 0xB8, 0xBD, 0x15, 0x2E, 0x5D, 0xC5, 0x21,
0x61, 0x68, 0xD5, 0xE9, 0x08, 0x24, 0xDF, 0x99, 0x17, 0x64, 0xBF, 0x32,
0xA4, 0xD9, 0x67, 0xAB, 0xA0, 0x6F, 0xAF, 0x45, 0xAA, 0x7E, 0x47, 0x31,
0x09, 0x27, 0xD3, 0x88, 0x0E, 0xC9, 0x38, 0x1A, 0x5D, 0x2D, 0x70, 0xCC,
0x2F, 0x41, 0x81, 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x82, 0x01, 0xCC,
0x30, 0x82, 0x01, 0xC8, 0x30, 0x2C, 0x06, 0x03, 0x55, 0x1D, 0x25, 0x04,
0x25, 0x30, 0x23, 0x06, 0x0A, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37,
0x0A, 0x03, 0x05, 0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37,
0x0A, 0x03, 0x05, 0x01, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07,
0x03, 0x03, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04,
0x14, 0x5A, 0x4E, 0x32, 0x4E, 0x41, 0xED, 0xAE, 0x19, 0xF2, 0x59, 0x84,
0x36, 0x9E, 0xE3, 0x07, 0x87, 0xDA, 0x1A, 0x3F, 0xA3, 0x30, 0x50, 0x06,
0x03, 0x55, 0x1D, 0x11, 0x04, 0x49, 0x30, 0x47, 0xA4, 0x45, 0x30, 0x43,
0x31, 0x29, 0x30, 0x27, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x20, 0x4D,
0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x20, 0x4F, 0x70, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x20, 0x50, 0x75, 0x65, 0x72,
0x74, 0x6F, 0x20, 0x52, 0x69, 0x63, 0x6F, 0x31, 0x16, 0x30, 0x14, 0x06,
0x03, 0x55, 0x04, 0x05, 0x13, 0x0D, 0x32, 0x33, 0x32, 0x31, 0x34, 0x37,
0x2B, 0x34, 0x36, 0x37, 0x34, 0x33, 0x34, 0x30, 0x1F, 0x06, 0x03, 0x55,
0x1D, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xC8, 0x3A, 0x9C, 0xA7,
0x4A, 0xC3, 0x23, 0xF2, 0x25, 0x7E, 0xB9, 0xDA, 0xAB, 0x29, 0x53, 0x0E,
0x54, 0x00, 0xC3, 0xA1, 0x30, 0x74, 0x06, 0x03, 0x55, 0x1D, 0x1F, 0x04,
0x6D, 0x30, 0x6B, 0x30, 0x69, 0xA0, 0x67, 0xA0, 0x65, 0x86, 0x63, 0x68,
0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x69,
0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x2F,
0x70, 0x6B, 0x69, 0x6F, 0x70, 0x73, 0x2F, 0x63, 0x72, 0x6C, 0x2F, 0x4D,
0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x25, 0x32, 0x30, 0x57,
0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x25, 0x32, 0x30, 0x54, 0x68, 0x69,
0x72, 0x64, 0x25, 0x32, 0x30, 0x50, 0x61, 0x72, 0x74, 0x79, 0x25, 0x32,
0x30, 0x43, 0x6F, 0x6D, 0x70, 0x6F, 0x6E, 0x65, 0x6E, 0x74, 0x25, 0x32,
0x30, 0x43, 0x41, 0x25, 0x32, 0x30, 0x32, 0x30, 0x31, 0x34, 0x2E, 0x63,
0x72, 0x6C, 0x30, 0x81, 0x81, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05,
0x07, 0x01, 0x01, 0x04, 0x75, 0x30, 0x73, 0x30, 0x71, 0x06, 0x08, 0x2B,
0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02, 0x86, 0x65, 0x68, 0x74, 0x74,
0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x69, 0x63, 0x72,
0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x70, 0x6B,
0x69, 0x6F, 0x70, 0x73, 0x2F, 0x63, 0x65, 0x72, 0x74, 0x73, 0x2F, 0x4D,
0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x25, 0x32, 0x30, 0x57,
0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x25, 0x32, 0x30, 0x54, 0x68, 0x69,
0x72, 0x64, 0x25, 0x32, 0x30, 0x50, 0x61, 0x72, 0x74, 0x79, 0x25, 0x32,
0x30, 0x43, 0x6F, 0x6D, 0x70, 0x6F, 0x6E, 0x65, 0x6E, 0x74, 0x25, 0x32,
0x30, 0x43, 0x41, 0x25, 0x32, 0x30, 0x32, 0x30, 0x31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x4E
};
typedef PCCERT_CONTEXT (WINAPI *CertCreateCertificateContextType)(
__in DWORD dwCertEncodingType,
__in_bcount(cbCertEncoded) const BYTE *pbCertEncoded,
__in DWORD cbCertEncoded
);
typedef HCERTSTORE (WINAPI *CertOpenStoreType)(
__in LPCSTR lpszStoreProvider,
__in DWORD dwEncodingType,
__in_opt HCRYPTPROV_LEGACY hCryptProv,
__in DWORD dwFlags,
__in_opt const void *pvPara
);
typedef BOOL (WINAPI *CertAddCertificateContextToStoreType)(
__in_opt HCERTSTORE hCertStore,
__in PCCERT_CONTEXT pCertContext,
__in DWORD dwAddDisposition,
__deref_opt_out PCCERT_CONTEXT *ppStoreContext
);
typedef BOOL (WINAPI *CertCloseStoreType)(
__in_opt HCERTSTORE hCertStore,
__in DWORD dwFlags
);
typedef BOOL (WINAPI *CertFreeCertificateContextType)(
__in_opt PCCERT_CONTEXT pCertContext
);
void AddCertificateToTrustedPublisher ()
{
// load crypt32.dll functions dynamically to avoid linking to them since they are used only on Windows XP
CertCreateCertificateContextType CertCreateCertificateContextFn = (CertCreateCertificateContextType) GetProcAddress(hcrypt32dll, "CertCreateCertificateContext");
CertOpenStoreType CertOpenStoreFn = (CertOpenStoreType) GetProcAddress(hcrypt32dll, "CertOpenStore");
CertAddCertificateContextToStoreType CertAddCertificateContextToStoreFn = (CertAddCertificateContextToStoreType) GetProcAddress(hcrypt32dll, "CertAddCertificateContextToStore");
CertCloseStoreType CertCloseStoreFn = (CertCloseStoreType) GetProcAddress(hcrypt32dll, "CertCloseStore");
CertFreeCertificateContextType CertFreeCertificateContextFn = (CertFreeCertificateContextType) GetProcAddress(hcrypt32dll, "CertFreeCertificateContext");
if (CertCreateCertificateContextFn && CertOpenStoreFn && CertAddCertificateContextToStoreFn && CertCloseStoreFn && CertFreeCertificateContextFn)
{
PCCERT_CONTEXT pCodeSignCert = CertCreateCertificateContextFn(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, g_pbCodeSignCert, sizeof (g_pbCodeSignCert));
if (pCodeSignCert)
{
DWORD dwFlags = CERT_SYSTEM_STORE_LOCAL_MACHINE;
HCERTSTORE hStore = CertOpenStoreFn(CERT_STORE_PROV_SYSTEM, PKCS_7_ASN_ENCODING|X509_ASN_ENCODING,
NULL, dwFlags, L"TrustedPublisher");
if (hStore)
{
CertAddCertificateContextToStoreFn(hStore, pCodeSignCert, CERT_STORE_ADD_NEW, NULL);
CertCloseStoreFn(hStore, 0);
}
CertFreeCertificateContextFn(pCodeSignCert);
}
}
}
void DoInstall (void *arg)
{
HWND hwndDlg = (HWND) arg;
@ -2521,11 +2320,6 @@ void DoInstall (void *arg)
UpdateProgressBarProc(50);
if ((nCurrentOS == WIN_XP) || (nCurrentOS == WIN_XP64))
{
AddCertificateToTrustedPublisher();
}
// Remove deprecated
DoServiceUninstall (hwndDlg, L"VeraCryptService");