From 0786d7659f1707cd46c94d54dfbf5312dc7dd057 Mon Sep 17 00:00:00 2001 From: davidben Date: Mon, 8 Jun 2015 16:01:19 -0700 Subject: Consistently use BYTE* instead of PBYTE in openssl_platform_key_win.cc. Right now it's a bit of a mix. Google style says using types like DWORD and HANDLE is encouraged, but const TCHAR * is prefered over LPCTSTR, though Chromium is not consistent about this with interesting types like PCERT_CONTEXT. We do fairly consistently use BYTE* over PBYTE, so at least standardize that one. BUG=none Review URL: https://codereview.chromium.org/1149963005 Cr-Commit-Position: refs/heads/master@{#333376} --- net/ssl/openssl_platform_key_win.cc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'net') diff --git a/net/ssl/openssl_platform_key_win.cc b/net/ssl/openssl_platform_key_win.cc index 6ee6b5a..d394f18 100644 --- a/net/ssl/openssl_platform_key_win.cc +++ b/net/ssl/openssl_platform_key_win.cc @@ -43,15 +43,14 @@ namespace net { namespace { using NCryptFreeObjectFunc = SECURITY_STATUS(WINAPI*)(NCRYPT_HANDLE); -using NCryptSignHashFunc = - SECURITY_STATUS(WINAPI*)(NCRYPT_KEY_HANDLE, // hKey - VOID*, // pPaddingInfo - PBYTE, // pbHashValue - DWORD, // cbHashValue - PBYTE, // pbSignature - DWORD, // cbSignature - DWORD*, // pcbResult - DWORD); // dwFlags +using NCryptSignHashFunc = SECURITY_STATUS(WINAPI*)(NCRYPT_KEY_HANDLE, // hKey + VOID*, // pPaddingInfo + BYTE*, // pbHashValue + DWORD, // cbHashValue + BYTE*, // pbSignature + DWORD, // cbSignature + DWORD*, // pcbResult + DWORD); // dwFlags class CNGFunctions { public: @@ -196,7 +195,7 @@ bool DoNCryptSignHash(NCRYPT_KEY_HANDLE key, // correct size. Some smartcards are buggy and do not write to it on the // second call. ncrypt_status = g_cng_functions.Get().ncrypt_sign_hash()( - key, padding, const_cast(in), in_len, out, signature_len, + key, padding, const_cast(in), in_len, out, signature_len, &signature_len, flags); if (FAILED(ncrypt_status)) { LOG(ERROR) << "NCryptSignHash failed: " << ncrypt_status; -- cgit v1.1