forked from youtube/cobalt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwincrypt_shim.h
27 lines (20 loc) · 930 Bytes
/
wincrypt_shim.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CRYPTO_WINCRYPT_SHIM_H_
#define CRYPTO_WINCRYPT_SHIM_H_
// wincrypt.h defines macros which conflict with OpenSSL's types. This header
// includes wincrypt and undefines the OpenSSL macros which conflict. Any
// Chromium headers which include wincrypt should instead include this header.
#include <windows.h>
#include <wincrypt.h>
#include "starboard/types.h"
// Undefine the macros which conflict with OpenSSL and define replacements. See
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa378145(v=vs.85).aspx
#undef X509_CERT_PAIR
#undef X509_EXTENSIONS
#undef X509_NAME
#define WINCRYPT_X509_CERT_PAIR ((LPCSTR) 53)
#define WINCRYPT_X509_EXTENSIONS ((LPCSTR) 5)
#define WINCRYPT_X509_NAME ((LPCSTR) 7)
#endif // CRYPTO_WINCRYPT_SHIM_H_