Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 024f4d3b36b07ff127664e571b9fb7a1 > files > 7

libdigidoc2-devel-2.2.11-1mdv2008.1.i586.rpm

#ifndef __DIGIDOC_DEFS_H__
#define __DIGIDOC_DEFS_H__
//==================================================
// FILE:  DigiDocDefs.h
// PROJECT: Digi Doc
// DESCRIPTION: Digi Doc global definitions. 
// AUTHOR:  Veiko Sinivee, S|E|B IT Partner Estonia
//==================================================
// Copyright (C) AS Sertifitseerimiskeskus
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.ode
// GNU Lesser General Public Licence is available at
// http://www.gnu.org/copyleft/lesser.html
//==========< HISTORY >=============================
//      15.06.2005      Veiko Sinivee
//==================================================


#ifdef WIN32
  #include <windows.h>
#endif
#ifdef WIN32
  #ifdef  BUILDINGDLL
	#ifdef _MSC_VER
		#pragma warning( disable: 4100 4706 4204 4221 )
	#endif
    #define EXP_OPTION __declspec(dllexport)
  #else
    #define EXP_OPTION __declspec(dllimport)
  #endif
#else
  #define EXP_OPTION
#endif

#ifdef __APPLE__
#define __FreeBSD__ 1
#endif

//#define WITH_DEPRECATED_FUNCTIONS

// MSSP module is not ready yet
//#define WITH_MSSP

// TS stuff
//#define WITH_TS

#ifndef byte
typedef	unsigned char	byte;
#endif

//==========< Digest types >=======================

#define SIGNATURE_LEN	128
#define DIGEST_LEN		20
#define DIGEST_SHA1		0
#define CERT_DATA_LEN	4096
#define X509_NAME_LEN	256
#define SIGNATURE_RSA	0
#define CONTENT_HASHCODE        "HASHCODE"
#define CONTENT_DETATCHED	"DETATCHED"
#define CONTENT_EMBEDDED	"EMBEDDED"
#define CONTENT_EMBEDDED_BASE64	"EMBEDDED_BASE64"
#define X509_NAME_BUF_LEN   500

//==========< Format types >=======================

#define SK_PKCS7_1				"SK-PKCS#7-1.0"
#define SK_XML_1_NAME			"SK-XML"
#define DIGIDOC_XML_1_1_NAME	"DIGIDOC-XML"
#define SK_XML_1_VER			"1.0"
#define DIGIDOC_XML_1_1_VER		"1.1"
#define DIGIDOC_XML_1_2_VER		"1.2"
#define DIGIDOC_XML_1_3_VER		"1.3"
#define SK_NOT_VERSION			"OCSP-1.0"

#define DIGEST_SHA1_NAME	"sha1"
#define SIGN_RSA_NAME		"RSA"
#define OCSP_NONCE_NAME		"OCSP Nonce"
#define RESPID_NAME_VALUE	"NAME"
#define RESPID_KEY_VALUE	"KEY HASH"
#define OCSP_SIG_TYPE		"sha1WithRSAEncryption"

#define DIGEST_METHOD_SHA1      "http://www.w3.org/2000/09/xmldsig#sha1"

//==========< Format types >=======================

#define CHARSET_ISO_8859_1	"ISO-8859-1"
#define CHARSET_UTF_8		"UTF-8"


//==========< language codes >=======================
#define DDOC_LANG_ENGLISH           0
#define DDOC_LANG_ESTONIAN          1
#define DDOC_NUM_LANGUAGES          2
#define SUPPORTED_VERSION_COUNT		4

//==========< file formats >=======================

#define FILE_FORMAT_ASN1			0
#define FILE_FORMAT_PEM				1
//#define FILE_FORMAT_

//============< OCSP paramaters >==================

#define OCSP_REQUEST_SIGN_NO			1
#define OCSP_REQUEST_SIGN_CSP			2
#define OCSP_REQUEST_SIGN_X509			3
#define OCSP_REQUEST_SIGN_PKCS11_WIN	4
#define OCSP_REQUEST_SIGN_PKCS12		5

//================== Cert search constants =========
#define CERT_SEARCH_BY_STORE			1
#define CERT_SEARCH_BY_X509				2
#define CERT_SEARCH_BY_PKCS12			3

// thes can be XOR'ed, then all criterias are used
#define CERT_STORE_SEARCH_BY_SERIAL			0x01
#define CERT_STORE_SEARCH_BY_SUBJECT_DN		0x02
#define CERT_STORE_SEARCH_BY_ISSUER_DN		0x04
#define CERT_STORE_SEARCH_BY_KEY_INFO		0x08



#endif // __DIGIDOC_DEFS_H__