#ifndef CMS_COMMON_H_INCLUDED
#define CMS_COMMON_H_INCLUDED

#include <string>
#include <vector>
#define ENCODING_TYPE					(PKCS_7_ASN_ENCODING | X509_ASN_ENCODING)

#define CERT_STORE_NAME					L"MY"
#define CERT_STORE_ROOT					L"ROOT"

#define szOID_NAME_SIGN_SUB				"1.2.643.100.111"

#ifndef szOID_IdentificationKind
#define szOID_IdentificationKind "1.2.643.100.114"
#endif // !szOID_IdentificationKind

#define PEM_BASE64_OUTPUT_LINE_LEN		64 // see RFC 1421, chapter 4.3.2.4, paragraph 3
#define PEM_BASE64_INPUT_LINE_LEN		(PEM_BASE64_OUTPUT_LINE_LEN / 4 * 3) // 48

#define MAX_FILE_BLOCK_SIZE				65536
#define MAX_FILE_BLOCK_SIZE_FOR_LINUX	100000000

//#if defined(CTWRAPPER_STATIC)
#if !defined(_WIN32) || defined(CTWRAPPER_STATIC)
#define CTWRAPPER_API
#elif defined(CTWRAPPER_EXPORTS)
#define CTWRAPPER_API __declspec(dllexport)
#else // !CTWRAPPER_EXPORTS
#define CTWRAPPER_API __declspec(dllimport)
#endif // !CTWRAPPER_EXPORTS

#include "wrapper/common/refcount.h"
#include "wrapper/common/excep.h"
#include "wrapper/common/log.h"

#ifdef _WIN32
#define LIBRARY_EXTENSION "dll"
#else
#define LIBRARY_EXTENSION "so"
#endif

#ifdef WRAPPER_NODEJS
#define LIBRARY_DIRECTORY "node_modules\\"
#else
#define LIBRARY_DIRECTORY ""
#endif

#endif  //!CMS_COMMON_H_INCLUDED
