wincrypt_shim.h 930 B

1234567891011121314151617181920212223242526
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef BASE_WIN_WINCRYPT_SHIM_H_
  5. #define BASE_WIN_WINCRYPT_SHIM_H_
  6. // wincrypt.h defines macros which conflict with OpenSSL's types. This header
  7. // includes wincrypt and undefines the OpenSSL macros which conflict. Any
  8. // Chromium headers which include wincrypt should instead include this header.
  9. #include <windows.h>
  10. #include <wincrypt.h>
  11. // Undefine the macros which conflict with OpenSSL and define replacements. See
  12. // http://msdn.microsoft.com/en-us/library/windows/desktop/aa378145(v=vs.85).aspx
  13. #undef X509_CERT_PAIR
  14. #undef X509_EXTENSIONS
  15. #undef X509_NAME
  16. #define WINCRYPT_X509_CERT_PAIR ((LPCSTR)53)
  17. #define WINCRYPT_X509_EXTENSIONS ((LPCSTR)5)
  18. #define WINCRYPT_X509_NAME ((LPCSTR)7)
  19. #endif // BASE_WIN_WINCRYPT_SHIM_H_