ReactOS 0.4.16-dev-92-g0c2cdca
|
#include "config.h"
#include "wine/port.h"
#include <limits.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
#include "ntstatus.h"
#include "crypt.h"
#include "winnls.h"
#include "winreg.h"
#include "rpc.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "winternl.h"
Go to the source code of this file.
Macros | |
#define | WIN32_NO_STATUS |
#define | CRYPT_Alloc(size) (LocalAlloc(LMEM_ZEROINIT, size)) |
#define | CRYPT_Free(buffer) (LocalFree(buffer)) |
#define | CRYPT_GetProvFunc(name) if ( !(provider->pFuncs->p##name = (void*)GetProcAddress(provider->hModule, #name)) ) goto error |
#define | CRYPT_GetProvFuncOpt(name) provider->pFuncs->p##name = (void*)GetProcAddress(provider->hModule, #name) |
Variables | |
static HWND | crypt_hWindow |
#define CRYPT_Alloc | ( | size | ) | (LocalAlloc(LMEM_ZEROINIT, size)) |
Definition at line 158 of file crypt.c.
Referenced by CryptAcquireContextA(), CryptSetProviderExA(), CryptSignHashA(), and CryptVerifySignatureA().
Definition at line 277 of file crypt.c.
Referenced by CryptAcquireContextW().
Definition at line 64 of file crypt.c.
Referenced by CryptAcquireContextW(), and CryptSetProviderExW().
Definition at line 85 of file crypt.c.
Referenced by CryptAcquireContextW(), CryptGetDefaultProviderW(), and CryptSetProviderExW().
|
static |
Definition at line 204 of file crypt.c.
Referenced by CryptAcquireContextW().
Definition at line 125 of file crypt.c.
Referenced by CryptAcquireContextW(), CryptEnumProvidersA(), CryptEnumProviderTypesA(), and CryptGetDefaultProviderA().
Definition at line 182 of file crypt.c.
Referenced by CRYPT_LoadProvider().
BOOL WINAPI CryptAcquireContextA | ( | HCRYPTPROV * | phProv, |
LPCSTR | pszContainer, | ||
LPCSTR | pszProvider, | ||
DWORD | dwProvType, | ||
DWORD | dwFlags | ||
) |
Definition at line 569 of file crypt.c.
Referenced by clean_up_aes_environment(), clean_up_base_environment(), CRYPT_CreateKeyProv(), init_aes_environment(), init_base_environment(), init_function_pointers(), test_container_sd(), test_hashes(), test_key_initialization(), test_null_provider(), test_rsa_round_trip(), test_schannel_provider(), and testPortPublicKeyInfo().
BOOL WINAPI CryptAcquireContextW | ( | HCRYPTPROV * | phProv, |
LPCWSTR | pszContainer, | ||
LPCWSTR | pszProvider, | ||
DWORD | dwProvType, | ||
DWORD | dwFlags | ||
) |
Definition at line 358 of file crypt.c.
Referenced by CertCreateSelfSignCertificate(), CRYPT_AcquirePrivateKeyFromProvInfo(), CRYPT_GetDefaultProvider(), CryptAcquireContextA(), CryptCATAdminCalcHashFromFileHandle(), CryptCATAdminEnumCatalogFromHash(), CryptProtectData(), CryptUnprotectData(), DllRegisterServer(), export_acquire_private_key(), find_key_prov_info_in_provider(), hash_file(), I_CryptGetDefaultCryptProv(), init_function_pointers(), key_prov_info_matches_cert(), save_pfx(), SOFTPUB_VerifyImageHash(), START_TEST(), and testAcquireSecurityContext().
BOOL WINAPI CryptContextAddRef | ( | HCRYPTPROV | hProv, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags | ||
) |
Definition at line 613 of file crypt.c.
Referenced by I_CryptGetDefaultCryptProv().
BOOL WINAPI CryptCreateHash | ( | HCRYPTPROV | hProv, |
ALG_ID | Algid, | ||
HCRYPTKEY | hKey, | ||
DWORD | dwFlags, | ||
HCRYPTHASH * | phHash | ||
) |
Definition at line 740 of file crypt.c.
Referenced by CDecodeMsg_FinalizeHashedContent(), CHashEncodeMsg_Open(), create_silly_rename(), CRYPT_VerifySignature(), CryptCATAdminCalcHashFromFileHandle(), CryptHashCertificate(), CryptHashPublicKeyInfo(), CryptHashToBeSigned(), CryptProtectData(), CryptSignCertificate(), CryptUnprotectData(), CSignedMsgData_ConstructSignerHandles(), derive_key(), hash_dib(), hash_file(), load_encryption_key(), nfs41_client_owner(), rdssl_hash_clear(), rdssl_hash_info_create(), rdssl_hmac_md5(), SOFTPUB_VerifyImageHash(), test_hashes(), test_hmac(), test_import_hmac(), test_key_derivation(), test_mac(), test_rc2(), test_rc4(), test_schannel_provider(), test_sha2(), test_verify_signature(), and verifySig().
BOOL WINAPI CryptDecrypt | ( | HCRYPTKEY | hKey, |
HCRYPTHASH | hHash, | ||
BOOL | Final, | ||
DWORD | dwFlags, | ||
BYTE * | pbData, | ||
DWORD * | pdwDataLen | ||
) |
Definition at line 800 of file crypt.c.
Referenced by CDecodeEnvelopedMsg_CrtlDecrypt(), CryptUnprotectData(), test_3des(), test_3des112(), test_aes(), test_block_cipher_modes(), test_des(), test_import_private(), test_rc2(), test_rc4(), test_rsa_encrypt(), and test_rsa_round_trip().
BOOL WINAPI CryptDeriveKey | ( | HCRYPTPROV | hProv, |
ALG_ID | Algid, | ||
HCRYPTHASH | hBaseData, | ||
DWORD | dwFlags, | ||
HCRYPTKEY * | phKey | ||
) |
Definition at line 838 of file crypt.c.
Referenced by derive_key(), load_encryption_key(), test_key_derivation(), test_rc2(), test_rc4(), and test_schannel_provider().
BOOL WINAPI CryptDestroyHash | ( | HCRYPTHASH | hHash | ) |
Definition at line 890 of file crypt.c.
Referenced by CDecodeMsg_Close(), CHashEncodeMsg_Close(), create_silly_rename(), CRYPT_VerifySignature(), CryptCATAdminCalcHashFromFileHandle(), CryptHashCertificate(), CryptHashPublicKeyInfo(), CryptHashToBeSigned(), CryptProtectData(), CryptSignCertificate(), CryptUnprotectData(), CSignedMsgData_CloseHandles(), derive_key(), hash_dib(), hash_file(), load_encryption_key(), nfs41_client_owner(), rdssl_hash_clear(), rdssl_hash_info_delete(), rdssl_hmac_md5(), SOFTPUB_VerifyImageHash(), test_hashes(), test_hmac(), test_import_hmac(), test_key_derivation(), test_mac(), test_rc2(), test_rc4(), test_schannel_provider(), test_sha2(), test_verify_signature(), and verifySig().
Definition at line 930 of file crypt.c.
Referenced by CDecodeEnvelopedMsg_CrtlDecrypt(), CDecodeSignedMsg_VerifySignatureWithKey(), CEnvelopedEncodeMsg_Close(), CertCreateSelfSignCertificate(), CertGetPublicKeyLength(), CRYPT_CreateKeyProv(), CRYPT_ExportKeyTrans(), CRYPT_ExportPublicKeyInfoEx(), CRYPT_ImportKeyTrans(), CRYPT_VerifySignature(), CryptProtectData(), CryptUnprotectData(), export_is_key_exportable(), init_aes_environment(), init_base_environment(), rdssl_cert_to_rkey(), rdssl_rc4_info_delete(), rdssl_rc4_set_key(), test_3des(), test_3des112(), test_aes(), test_block_cipher_modes(), test_decode_msg_get_param(), test_des(), test_hashes(), test_hmac(), test_import_export(), test_import_hmac(), test_import_private(), test_key_derivation(), test_key_initialization(), test_key_permissions(), test_mac(), test_null_provider(), test_rc2(), test_rc4(), test_rsa_encrypt(), test_rsa_round_trip(), test_schannel_provider(), test_sign_message(), test_signed_msg_encoding(), test_signed_msg_update(), test_verify_signature(), testAcquireCertPrivateKey(), testAcquireSecurityContext(), testCreateSelfSignCert(), testExportPublicKey(), testImportPublicKey(), and testSignCert().
BOOL WINAPI CryptDuplicateHash | ( | HCRYPTHASH | hHash, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags, | ||
HCRYPTHASH * | phHash | ||
) |
Definition at line 973 of file crypt.c.
BOOL WINAPI CryptDuplicateKey | ( | HCRYPTKEY | hKey, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags, | ||
HCRYPTKEY * | phKey | ||
) |
Definition at line 1029 of file crypt.c.
BOOL WINAPI CryptEncrypt | ( | HCRYPTKEY | hKey, |
HCRYPTHASH | hHash, | ||
BOOL | Final, | ||
DWORD | dwFlags, | ||
BYTE * | pbData, | ||
DWORD * | pdwDataLen, | ||
DWORD | dwBufLen | ||
) |
Definition at line 1093 of file crypt.c.
Referenced by CEnvelopedEncodeMsg_Update(), CryptProtectData(), rdssl_rc4_crypt(), test_3des(), test_3des112(), test_aes(), test_block_cipher_modes(), test_des(), test_key_derivation(), test_mac(), test_rc2(), test_rc4(), test_rsa_encrypt(), test_rsa_round_trip(), and test_schannel_provider().
BOOL WINAPI CryptEnumProvidersA | ( | DWORD | dwIndex, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags, | ||
DWORD * | pdwProvType, | ||
LPSTR | pszProvName, | ||
DWORD * | pcbProvName | ||
) |
Definition at line 1228 of file crypt.c.
BOOL WINAPI CryptEnumProvidersW | ( | DWORD | dwIndex, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags, | ||
DWORD * | pdwProvType, | ||
LPWSTR | pszProvName, | ||
DWORD * | pcbProvName | ||
) |
Definition at line 1136 of file crypt.c.
Referenced by CryptEnumProvidersA(), find_matching_provider(), and I_CryptGetDefaultCryptProv().
BOOL WINAPI CryptEnumProviderTypesA | ( | DWORD | dwIndex, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags, | ||
DWORD * | pdwProvType, | ||
LPSTR | pszTypeName, | ||
DWORD * | pcbTypeName | ||
) |
Definition at line 1362 of file crypt.c.
BOOL WINAPI CryptEnumProviderTypesW | ( | DWORD | dwIndex, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags, | ||
DWORD * | pdwProvType, | ||
LPWSTR | pszTypeName, | ||
DWORD * | pcbTypeName | ||
) |
Definition at line 1283 of file crypt.c.
Referenced by CryptEnumProviderTypesA().
BOOL WINAPI CryptExportKey | ( | HCRYPTKEY | hKey, |
HCRYPTKEY | hExpKey, | ||
DWORD | dwBlobType, | ||
DWORD | dwFlags, | ||
BYTE * | pbData, | ||
DWORD * | pdwDataLen | ||
) |
Definition at line 1416 of file crypt.c.
Referenced by CRYPT_ExportKeyTrans(), CRYPT_ExportPublicKeyInfoEx(), rdssl_cert_to_rkey(), test_import_export(), test_import_private(), test_key_permissions(), test_rsa_encrypt(), test_rsa_round_trip(), and testAcquireCertPrivateKey().
Definition at line 1451 of file crypt.c.
Referenced by CertCreateSelfSignCertificate(), CRYPT_CreateKeyProv(), CRYPT_GenKey(), init_aes_environment(), init_base_environment(), test_null_provider(), test_rsa_round_trip(), testCreateSelfSignCert(), testExportPublicKey(), and testSignCert().
BOOL WINAPI CryptGenRandom | ( | HCRYPTPROV | hProv, |
DWORD | dwLen, | ||
BYTE * | pbBuffer | ||
) |
Definition at line 700 of file crypt.c.
Referenced by CertCreateSelfSignCertificate(), fill_protect_data(), and test_gen_random().
BOOL WINAPI CryptGetDefaultProviderA | ( | DWORD | dwProvType, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags, | ||
LPSTR | pszProvName, | ||
DWORD * | pcbProvName | ||
) |
Definition at line 1560 of file crypt.c.
BOOL WINAPI CryptGetDefaultProviderW | ( | DWORD | dwProvType, |
DWORD * | pdwReserved, | ||
DWORD | dwFlags, | ||
LPWSTR | pszProvName, | ||
DWORD * | pcbProvName | ||
) |
Definition at line 1503 of file crypt.c.
Referenced by CryptGetDefaultProviderA().
BOOL WINAPI CryptGetHashParam | ( | HCRYPTHASH | hHash, |
DWORD | dwParam, | ||
BYTE * | pbData, | ||
DWORD * | pdwDataLen, | ||
DWORD | dwFlags | ||
) |
Definition at line 1610 of file crypt.c.
Referenced by CDecodeHashMsg_GetParam(), CDecodeSignedMsg_GetParam(), CHashEncodeMsg_GetParam(), convert_hash_to_blob(), create_silly_rename(), CRYPT_EncodePKCSDigestedData(), CryptCATAdminCalcHashFromFileHandle(), CryptHashCertificate(), CryptHashPublicKeyInfo(), CryptHashToBeSigned(), CryptSignCertificate(), CSignedEncodeMsg_GetParam(), CSignedMsgData_AppendMessageDigestAttribute(), derive_key(), hash_dib(), hash_file(), nfs41_client_owner(), rdssl_hash_complete(), rdssl_hmac_md5(), SOFTPUB_VerifyImageHash(), test_hashes(), test_hmac(), test_import_hmac(), test_key_derivation(), test_mac(), test_rc2(), test_rc4(), test_schannel_provider(), and test_sha2().
BOOL WINAPI CryptGetKeyParam | ( | HCRYPTKEY | hKey, |
DWORD | dwParam, | ||
BYTE * | pbData, | ||
DWORD * | pdwDataLen, | ||
DWORD | dwFlags | ||
) |
Definition at line 1649 of file crypt.c.
Referenced by CertGetPublicKeyLength(), export_is_key_exportable(), test_aes(), test_block_cipher_modes(), test_des(), test_import_export(), test_import_private(), test_key_derivation(), test_key_permissions(), test_rc2(), test_rc4(), test_rsa_encrypt(), and testImportPublicKey().
BOOL WINAPI CryptGetProvParam | ( | HCRYPTPROV | hProv, |
DWORD | dwParam, | ||
BYTE * | pbData, | ||
DWORD * | pdwDataLen, | ||
DWORD | dwFlags | ||
) |
Definition at line 1688 of file crypt.c.
Referenced by CertContext_SetKeyProvInfo(), find_key_prov_info_in_provider(), is_supported_algid(), test_container_sd(), test_enum_container(), test_getDefaultCryptProv(), test_null_provider(), and test_prov().
BOOL WINAPI CryptGetUserKey | ( | HCRYPTPROV | hProv, |
DWORD | dwKeySpec, | ||
HCRYPTKEY * | phUserKey | ||
) |
Definition at line 1718 of file crypt.c.
Referenced by CertCreateSelfSignCertificate(), CRYPT_ExportPublicKeyInfoEx(), CRYPT_ImportKeyTrans(), export_is_key_exportable(), test_import_export(), test_key_initialization(), test_key_permissions(), test_null_provider(), test_rsa_encrypt(), and test_rsa_round_trip().
Definition at line 1771 of file crypt.c.
Referenced by CDecodeMsg_FinalizeHashedContent(), CHashEncodeMsg_Update(), create_silly_rename(), CRYPT_VerifySignature(), CryptCATAdminCalcHashFromFileHandle(), CryptHashCertificate(), CryptHashPublicKeyInfo(), CryptHashToBeSigned(), CryptSignCertificate(), CSignedMsgData_UpdateAuthenticatedAttributes(), CSignedMsgData_UpdateHash(), derive_key(), hash_dib(), hash_file(), hash_file_data(), hash_mac_addrs(), load_encryption_key(), nfs41_client_owner(), rdssl_hash_transform(), rdssl_hmac_md5(), test_hashes(), test_hmac(), test_import_hmac(), test_key_derivation(), test_mac(), test_rc2(), test_rc4(), test_schannel_provider(), test_sha2(), test_verify_signature(), and verifySig().
BOOL WINAPI CryptHashSessionKey | ( | HCRYPTHASH | hHash, |
HCRYPTKEY | hKey, | ||
DWORD | dwFlags | ||
) |
BOOL WINAPI CryptImportKey | ( | HCRYPTPROV | hProv, |
const BYTE * | pbData, | ||
DWORD | dwDataLen, | ||
HCRYPTKEY | hPubKey, | ||
DWORD | dwFlags, | ||
HCRYPTKEY * | phKey | ||
) |
Definition at line 1850 of file crypt.c.
Referenced by CRYPT_ImportKeyTrans(), CRYPT_ImportPublicKeyInfoEx(), rdssl_hmac_md5(), rdssl_rc4_set_key(), test_decode_msg_get_param(), test_hashes(), test_import_export(), test_import_hmac(), test_import_private(), test_key_initialization(), test_null_provider(), test_rsa_round_trip(), test_schannel_provider(), test_sign_message(), test_signed_msg_encoding(), test_signed_msg_update(), test_verify_signature(), testAcquireCertPrivateKey(), and testAcquireSecurityContext().
BOOL WINAPI CryptReleaseContext | ( | HCRYPTPROV | hProv, |
DWORD | dwFlags | ||
) |
Definition at line 648 of file crypt.c.
Referenced by CDecodeMsg_Close(), CEnvelopedEncodeMsg_Close(), CEnvelopedEncodeMsg_Open(), CertContext_SetProperty(), CertCreateSelfSignCertificate(), CHashEncodeMsg_Close(), clean_up_aes_environment(), clean_up_base_environment(), create_silly_rename(), CRYPT_FileNameOpenStoreW(), CRYPT_FileOpenStore(), CRYPT_GetDefaultProvider(), CRYPT_MemOpenStore(), CRYPT_MsgOpenStore(), CRYPT_RegOpenStore(), CRYPT_SysOpenStoreW(), CryptCATAdminCalcHashFromFileHandle(), CryptCATAdminEnumCatalogFromHash(), CryptProtectData(), CryptSignMessage(), CryptUnprotectData(), CSignedEncodeMsg_Open(), detect_nt(), DllMain(), DllRegisterServer(), export_private_key_dlg_proc(), find_key_prov_info_in_provider(), hash_file(), I_CryptGetDefaultCryptProv(), key_prov_info_matches_cert(), nfs41_client_owner(), rdssl_cert_to_rkey(), rdssl_hash_info_create(), rdssl_hash_info_delete(), rdssl_hmac_md5(), rdssl_rc4_info_delete(), SOFTPUB_VerifyImageHash(), START_TEST(), test_container_sd(), test_decode_msg_get_param(), test_encrypt_message(), test_enveloped_msg_open(), test_getDefaultCryptProv(), test_hashes(), test_key_initialization(), test_null_provider(), test_rsa_round_trip(), test_schannel_provider(), test_sign_message(), test_signed_msg_encoding(), test_signed_msg_get_param(), test_signed_msg_open(), test_signed_msg_update(), test_sip(), testAcquireCertPrivateKey(), testAcquireSecurityContext(), testCertSigs(), testCreateSelfSignCert(), and testPortPublicKeyInfo().
BOOL WINAPI CryptSetHashParam | ( | HCRYPTHASH | hHash, |
DWORD | dwParam, | ||
const BYTE * | pbData, | ||
DWORD | dwFlags | ||
) |
Definition at line 1970 of file crypt.c.
Referenced by rdssl_hmac_md5(), test_hashes(), test_hmac(), test_import_hmac(), and test_schannel_provider().
Definition at line 2004 of file crypt.c.
Referenced by test_block_cipher_modes(), test_des(), test_key_permissions(), test_rc2(), test_rc4(), test_rsa_encrypt(), and test_schannel_provider().
Definition at line 2036 of file crypt.c.
BOOL WINAPI CryptSetProviderExA | ( | LPCSTR | pszProvName, |
DWORD | dwProvType, | ||
DWORD * | pdwReserved, | ||
DWORD | dwFlags | ||
) |
Definition at line 2149 of file crypt.c.
Referenced by CryptSetProviderA().
BOOL WINAPI CryptSetProviderExW | ( | LPCWSTR | pszProvName, |
DWORD | dwProvType, | ||
DWORD * | pdwReserved, | ||
DWORD | dwFlags | ||
) |
Definition at line 2068 of file crypt.c.
Referenced by CryptSetProviderExA(), and CryptSetProviderW().
BOOL WINAPI CryptSetProvParam | ( | HCRYPTPROV | hProv, |
DWORD | dwParam, | ||
const BYTE * | pbData, | ||
DWORD | dwFlags | ||
) |
Definition at line 2179 of file crypt.c.
Referenced by CRYPT_AcquirePrivateKeyFromProvInfo(), and export_acquire_private_key().
BOOL WINAPI CryptSignHashA | ( | HCRYPTHASH | hHash, |
DWORD | dwKeySpec, | ||
LPCSTR | sDescription, | ||
DWORD | dwFlags, | ||
BYTE * | pbSignature, | ||
DWORD * | pdwSigLen | ||
) |
Definition at line 1939 of file crypt.c.
Referenced by test_hashes(), and verifySig().
BOOL WINAPI CryptSignHashW | ( | HCRYPTHASH | hHash, |
DWORD | dwKeySpec, | ||
LPCWSTR | sDescription, | ||
DWORD | dwFlags, | ||
BYTE * | pbSignature, | ||
DWORD * | pdwSigLen | ||
) |
Definition at line 1908 of file crypt.c.
Referenced by CryptSignCertificate(), CryptSignHashA(), and CSignedMsgData_Sign().
BOOL WINAPI CryptVerifySignatureA | ( | HCRYPTHASH | hHash, |
const BYTE * | pbSignature, | ||
DWORD | dwSigLen, | ||
HCRYPTKEY | hPubKey, | ||
LPCSTR | sDescription, | ||
DWORD | dwFlags | ||
) |
Definition at line 2266 of file crypt.c.
Referenced by test_verify_signature().
BOOL WINAPI CryptVerifySignatureW | ( | HCRYPTHASH | hHash, |
const BYTE * | pbSignature, | ||
DWORD | dwSigLen, | ||
HCRYPTKEY | hPubKey, | ||
LPCWSTR | sDescription, | ||
DWORD | dwFlags | ||
) |
Definition at line 2238 of file crypt.c.
Referenced by CDecodeSignedMsg_VerifySignatureWithKey(), CRYPT_VerifySignature(), and CryptVerifySignatureA().
DWORD WINAPI ReadEncryptedFileRaw | ( | PFE_EXPORT_FUNC | export, |
PVOID | callback, | ||
PVOID | context | ||
) |
Definition at line 2378 of file crypt.c.
Referenced by gen_rand_impl().
WINE_DEFAULT_DEBUG_CHANNEL | ( | crypt | ) |
DWORD WINAPI WriteEncryptedFileRaw | ( | PFE_IMPORT_FUNC | import, |
PVOID | callback, | ||
PVOID | context | ||
) |
|
static |
Definition at line 59 of file crypt.c.
Referenced by CRYPT_ReturnhWnd(), and CryptSetProvParam().