summaryrefslogtreecommitdiffstats
path: root/base/tps/src/include/processor
diff options
context:
space:
mode:
Diffstat (limited to 'base/tps/src/include/processor')
-rw-r--r--base/tps/src/include/processor/RA_Enroll_Processor.h300
-rw-r--r--base/tps/src/include/processor/RA_Format_Processor.h57
-rw-r--r--base/tps/src/include/processor/RA_Pin_Reset_Processor.h57
-rw-r--r--base/tps/src/include/processor/RA_Processor.h214
-rw-r--r--base/tps/src/include/processor/RA_Renew_Processor.h57
-rw-r--r--base/tps/src/include/processor/RA_Unblock_Processor.h57
6 files changed, 742 insertions, 0 deletions
diff --git a/base/tps/src/include/processor/RA_Enroll_Processor.h b/base/tps/src/include/processor/RA_Enroll_Processor.h
new file mode 100644
index 000000000..b78d33f36
--- /dev/null
+++ b/base/tps/src/include/processor/RA_Enroll_Processor.h
@@ -0,0 +1,300 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * 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;
+ * version 2.1 of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ *
+ * Copyright (C) 2007 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ */
+
+#ifndef RA_ENROLL_PROCESSOR_H
+#define RA_ENROLL_PROCESSOR_H
+
+#ifdef HAVE_CONFIG_H
+#ifndef AUTOTOOLS_CONFIG_H
+#define AUTOTOOLS_CONFIG_H
+
+/* Eliminate warnings when using Autotools */
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+
+#include <config.h>
+#endif /* AUTOTOOLS_CONFIG_H */
+#endif /* HAVE_CONFIG_H */
+
+#include "main/RA_Session.h"
+#include "main/PKCS11Obj.h"
+#include "processor/RA_Processor.h"
+#include "cms/HttpConnection.h"
+
+#ifdef XP_WIN32
+#define TPS_PUBLIC __declspec(dllexport)
+#else /* !XP_WIN32 */
+#define TPS_PUBLIC
+#endif /* !XP_WIN32 */
+
+class RA_Enroll_Processor : public RA_Processor
+{
+ public:
+ TPS_PUBLIC RA_Enroll_Processor();
+ TPS_PUBLIC ~RA_Enroll_Processor();
+ public:
+ int ParsePublicKeyBlob(unsigned char *blob,
+ unsigned char *challenge,
+ SECKEYPublicKey *pk);
+ RA_Status DoEnrollment(AuthParams *login, RA_Session *session,
+ CERTCertificate **certificates,
+ char **origins,
+ char **ktypes,
+ int pkcs11obj,
+ PKCS11Obj * pkcs_objx,
+ NameValueSet *extensions,
+ int index, int keyTypeNum,
+ int start_progress,
+ int end_progress,
+ Secure_Channel *channel, Buffer *wrapped_challenge,
+ const char *tokenType,
+ const char *keyType,
+ Buffer *key_check,
+ Buffer *plaintext_challenge,
+ const char *cuid,
+ const char *msn,
+ const char *khex,
+ TokenKeyType key_type,
+ const char *profileId,
+ const char *userid,
+ const char *cert_id,
+ const char *publisher_id,
+ const char *cert_attr_id,
+ const char *pri_attr_id,
+ const char *pub_attr_id,
+ BYTE se_p1, BYTE se_p2, int keysize, const char *connid, const char *keyTypePrefix,char * applet_version);
+
+ bool DoRenewal(const char *connid,
+ const char *profileId,
+ CERTCertificate *i_cert,
+ CERTCertificate **o_cert,
+ char *error_msg, int *error_code);
+
+ bool GenerateCertificate(AuthParams *login,
+ int keyTypeNum,
+ const char *keyTypeValue,
+ int i,
+ RA_Session *session,
+ char **origins,
+ char **ktypes,
+ char *tokenType,
+ PKCS11Obj *pkcs11objx,
+ int pkcs11obj_enable,
+ NameValueSet *extensions,
+ Secure_Channel *channel,
+ Buffer *wrapped_challenge,
+ Buffer *key_check,
+ Buffer *plaintext_challenge,
+ char *cuid,
+ char *msn,
+ const char *final_applet_version,
+ char *khex,
+ const char *userid,
+ RA_Status &o_status,
+ CERTCertificate **certificates);
+
+ bool GenerateCertsAfterRecoveryPolicy(AuthParams *login,
+ RA_Session *session,
+ char **&origins,
+ char **&ktypes,
+ char *&tokenType,
+ PKCS11Obj *pkcs11objx,
+ int pkcs11obj_enable,
+ NameValueSet *extensions,
+ Secure_Channel *channel,
+ Buffer *wrapped_challenge,
+ Buffer *key_check,
+ Buffer *plaintext_challenge,
+ char *cuid,
+ char *msn,
+ const char *final_applet_version,
+ char *khex,
+ const char *userid,
+ RA_Status &o_status,
+ CERTCertificate **&certificates,
+ int &o_certNums, char **&tokenTypes);
+
+ bool GenerateCertificates(AuthParams *login,
+ RA_Session *session,
+ char **&origins,
+ char **&ktypes,
+ char *tokenType,
+ PKCS11Obj *pkcs11objx,
+ int pkcs11obj_enable,
+ NameValueSet *extensions,
+ Secure_Channel *channel,
+ Buffer *wrapped_challenge,
+ Buffer *key_check,
+ Buffer *plaintext_challenge,
+ char *cuid,
+ char *msn,
+ const char *final_applet_version,
+ char *khex,
+ const char *userid,
+ RA_Status &o_status,
+ CERTCertificate **&certificates,
+ int &o_certNums, char **&tokenTypes);
+
+ int DoPublish(
+ const char *cuid,
+ SECItem *encodedPublicKeyInfo,
+ Buffer *cert,
+ const char *publisher_id,
+ char *applet_version);
+
+ bool ProcessRecovery(AuthParams *login,
+ char *reason,
+ RA_Session *session,
+ char **&origins,
+ char **&ktypes,
+ char *tokenType,
+ PKCS11Obj *pkcs11objx,
+ int pkcs11obj_enable,
+ NameValueSet *extensions,
+ Secure_Channel *channel,
+ Buffer *wrapped_challenge,
+ Buffer *key_check,
+ Buffer *plaintext_challenge,
+ char *cuid,
+ char *msn,
+ const char *final_applet_version,
+ char *khex,
+ const char *userid,
+ RA_Status &o_status,
+ CERTCertificate **&certificates,
+ char *lostTokenCUID,
+ int &o_certNums, char **&tokenTypes, char *origTokenType);
+
+ bool ProcessRenewal(AuthParams *login,
+ RA_Session *session,
+ char **&ktypes,
+ char **&origins,
+ char *tokenType,
+ PKCS11Obj *pkcs11objx,
+ int pkcs11obj_enable,
+ Secure_Channel *channel,
+ const char *cuid,
+ char *msn,
+ const char *final_applet_version,
+ const char *userid,
+ RA_Status &o_status,
+ CERTCertificate **&certificates,
+ int &o_certNums, char **&tokenTypes);
+
+ bool GetCardManagerAppletInfo(
+ RA_Session*,
+ Buffer *,
+ RA_Status&,
+ char*&,
+ char*&,
+ Buffer& );
+
+ bool GetAppletInfo(
+ RA_Session *a_session, /* in */
+ Buffer *a_aid , /* in */
+ BYTE &o_major_version,
+ BYTE &o_minor_version,
+ BYTE &o_app_major_version,
+ BYTE &o_app_minor_version);
+
+ bool FormatAppletVersionInfo(
+ RA_Session *a_session,
+ const char *a_tokenType,
+ char *a_cuid,
+ BYTE a_app_major_version,
+ BYTE a_app_minor_version,
+ RA_Status &status, // out
+ char * &o_appletVersion // out
+ );
+
+ bool RequestUserId(
+ RA_Session * a_session,
+ NameValueSet *extensions,
+ const char * a_configname,
+ const char * a_tokenType,
+ char *a_cuid,
+ AuthParams *& o_login, // out
+ const char *&o_userid, // out
+ RA_Status &o_status //out
+ );
+
+
+ bool AuthenticateUser(
+ RA_Session * a_session,
+ const char * a_configname,
+ char *a_cuid,
+ NameValueSet *a_extensions,
+ const char *a_tokenType,
+ AuthParams *& a_login,
+ const char *&o_userid,
+ RA_Status &o_status
+ );
+
+ bool AuthenticateUserLDAP(
+ RA_Session *a_session,
+ NameValueSet *extensions,
+ char *a_cuid,
+ AuthenticationEntry *a_auth,
+ AuthParams *& o_login,
+ RA_Status &o_status,
+ const char *token_type);
+
+ bool CheckAndUpgradeApplet(
+ RA_Session *a_session,
+ NameValueSet *a_extensions,
+ char *a_cuid,
+ const char *a_tokenType,
+ char *&o_current_applet_on_token,
+ BYTE &o_major_version,
+ BYTE &o_minor_version,
+ Buffer *a_aid,
+ const char *msn,
+ const char *userid,
+ RA_Status &o_status,
+ char **key_version );
+
+ bool CheckAndUpgradeSymKeys(
+ RA_Session *session,
+ NameValueSet* extensions,
+ char *cuid,
+ const char *tokenType,
+ char *msn,
+ const char* applet_version,
+ const char* userid,
+ const char* key_version,
+ Buffer *a_cardmanagerAID, /* in */
+ Buffer *a_appletAID, /* in */
+ Secure_Channel *&channel, /* out */
+ RA_Status &status /* out */
+ );
+
+ TPS_PUBLIC RA_Status Process(RA_Session *session, NameValueSet *extensions);
+
+ private:
+ int GetNextFreeCertIdNumber(PKCS11Obj *pkcs11objx);
+ bool isCertRenewable(CERTCertificate *cert, int graceBefore, int graceAfter);
+ int UnrevokeRecoveredCert(const LDAPMessage *e, char *&statusString);
+};
+
+#endif /* RA_ENROLL_PROCESSOR_H */
diff --git a/base/tps/src/include/processor/RA_Format_Processor.h b/base/tps/src/include/processor/RA_Format_Processor.h
new file mode 100644
index 000000000..836c89080
--- /dev/null
+++ b/base/tps/src/include/processor/RA_Format_Processor.h
@@ -0,0 +1,57 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * 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;
+ * version 2.1 of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ *
+ * Copyright (C) 2007 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ */
+
+#ifndef RA_FORMAT_PROCESSOR_H
+#define RA_FORMAT_PROCESSOR_H
+
+#ifdef HAVE_CONFIG_H
+#ifndef AUTOTOOLS_CONFIG_H
+#define AUTOTOOLS_CONFIG_H
+
+/* Eliminate warnings when using Autotools */
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+
+#include <config.h>
+#endif /* AUTOTOOLS_CONFIG_H */
+#endif /* HAVE_CONFIG_H */
+
+#include "processor/RA_Processor.h"
+
+#ifdef XP_WIN32
+#define TPS_PUBLIC __declspec(dllexport)
+#else /* !XP_WIN32 */
+#define TPS_PUBLIC
+#endif /* !XP_WIN32 */
+
+class RA_Format_Processor : public RA_Processor
+{
+ public:
+ TPS_PUBLIC RA_Format_Processor();
+ TPS_PUBLIC ~RA_Format_Processor();
+ public:
+ TPS_PUBLIC RA_Status Process(RA_Session *session, NameValueSet *extensions);
+};
+
+#endif /* RA_UPGRADE_PROCESSOR_H */
diff --git a/base/tps/src/include/processor/RA_Pin_Reset_Processor.h b/base/tps/src/include/processor/RA_Pin_Reset_Processor.h
new file mode 100644
index 000000000..a3d511865
--- /dev/null
+++ b/base/tps/src/include/processor/RA_Pin_Reset_Processor.h
@@ -0,0 +1,57 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * 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;
+ * version 2.1 of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ *
+ * Copyright (C) 2007 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ */
+
+#ifndef RA_PIN_RESET_PROCESSOR_H
+#define RA_PIN_RESET_PROCESSOR_H
+
+#ifdef HAVE_CONFIG_H
+#ifndef AUTOTOOLS_CONFIG_H
+#define AUTOTOOLS_CONFIG_H
+
+/* Eliminate warnings when using Autotools */
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+
+#include <config.h>
+#endif /* AUTOTOOLS_CONFIG_H */
+#endif /* HAVE_CONFIG_H */
+
+#include "processor/RA_Processor.h"
+
+#ifdef XP_WIN32
+#define TPS_PUBLIC __declspec(dllexport)
+#else /* !XP_WIN32 */
+#define TPS_PUBLIC
+#endif /* !XP_WIN32 */
+
+class RA_Pin_Reset_Processor : public RA_Processor
+{
+ public:
+ TPS_PUBLIC RA_Pin_Reset_Processor();
+ TPS_PUBLIC ~RA_Pin_Reset_Processor();
+ public:
+ TPS_PUBLIC RA_Status Process(RA_Session *session, NameValueSet *extensions);
+};
+
+#endif /* RA_PIN_RESET_PROCESSOR_H */
diff --git a/base/tps/src/include/processor/RA_Processor.h b/base/tps/src/include/processor/RA_Processor.h
new file mode 100644
index 000000000..74e869a52
--- /dev/null
+++ b/base/tps/src/include/processor/RA_Processor.h
@@ -0,0 +1,214 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * 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;
+ * version 2.1 of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ *
+ * Copyright (C) 2007 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ */
+
+#ifndef RA_PROCESSOR_H
+#define RA_PROCESSOR_H
+
+#ifdef HAVE_CONFIG_H
+#ifndef AUTOTOOLS_CONFIG_H
+#define AUTOTOOLS_CONFIG_H
+
+/* Eliminate warnings when using Autotools */
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+
+#include <config.h>
+#endif /* AUTOTOOLS_CONFIG_H */
+#endif /* HAVE_CONFIG_H */
+
+#include "main/Login.h"
+#include "main/SecureId.h"
+#include "main/RA_Session.h"
+#include "authentication/AuthParams.h"
+#include "apdu/APDU.h"
+#include "apdu/APDU_Response.h"
+#include "channel/Secure_Channel.h"
+
+enum RA_Status {
+ STATUS_NO_ERROR=0,
+ STATUS_ERROR_SNAC=1,
+ STATUS_ERROR_SEC_INIT_UPDATE=2,
+ STATUS_ERROR_CREATE_CARDMGR=3,
+ STATUS_ERROR_MAC_RESET_PIN_PDU=4,
+ STATUS_ERROR_MAC_CERT_PDU=5,
+ STATUS_ERROR_MAC_LIFESTYLE_PDU=6,
+ STATUS_ERROR_MAC_ENROLL_PDU=7,
+ STATUS_ERROR_READ_OBJECT_PDU=8,
+ STATUS_ERROR_BAD_STATUS=9,
+ STATUS_ERROR_CA_RESPONSE=10,
+ STATUS_ERROR_READ_BUFFER_OVERFLOW=11,
+ STATUS_ERROR_TOKEN_RESET_PIN_FAILED=12,
+ STATUS_ERROR_CONNECTION=13,
+ STATUS_ERROR_LOGIN=14,
+ STATUS_ERROR_DB=15,
+ STATUS_ERROR_TOKEN_DISABLED=16,
+ STATUS_ERROR_SECURE_CHANNEL=17,
+ STATUS_ERROR_MISCONFIGURATION=18,
+ STATUS_ERROR_UPGRADE_APPLET=19,
+ STATUS_ERROR_KEY_CHANGE_OVER=20,
+ STATUS_ERROR_EXTERNAL_AUTH=21,
+ STATUS_ERROR_DEFAULT_TOKENTYPE_NOT_FOUND=22,
+ STATUS_ERROR_DEFAULT_TOKENTYPE_PARAMS_NOT_FOUND=23,
+ STATUS_ERROR_PUBLISH=24,
+ STATUS_ERROR_LDAP_CONN=25,
+ STATUS_ERROR_DISABLED_TOKEN=26,
+ STATUS_ERROR_NOT_PIN_RESETABLE=27,
+ STATUS_ERROR_CONN_LOST=28,
+ STATUS_ERROR_CREATE_TUS_TOKEN_ENTRY=29,
+ STATUS_ERROR_NO_SUCH_TOKEN_STATE=30,
+ STATUS_ERROR_NO_SUCH_LOST_REASON=31,
+ STATUS_ERROR_UNUSABLE_TOKEN_KEYCOMPROMISE=32,
+ STATUS_ERROR_INACTIVE_TOKEN_NOT_FOUND=33,
+ STATUS_ERROR_HAS_AT_LEAST_ONE_ACTIVE_TOKEN=34,
+ STATUS_ERROR_CONTACT_ADMIN=35,
+ STATUS_ERROR_RECOVERY_IS_PROCESSED=36,
+ STATUS_ERROR_RECOVERY_FAILED=37,
+ STATUS_ERROR_NO_OPERATION_ON_LOST_TOKEN=38,
+ STATUS_ERROR_KEY_ARCHIVE_OFF=39,
+ STATUS_ERROR_NO_TKS_CONNID=40,
+ STATUS_ERROR_UPDATE_TOKENDB_FAILED=41,
+ STATUS_ERROR_REVOKE_CERTIFICATES_FAILED=42,
+ STATUS_ERROR_NOT_TOKEN_OWNER=43,
+ STATUS_ERROR_RENEWAL_IS_PROCESSED=44,
+ STATUS_ERROR_RENEWAL_FAILED=45
+};
+
+class RA_Processor
+{
+ public:
+ RA_Processor();
+ virtual ~RA_Processor();
+ virtual RA_Status Process(RA_Session *session, NameValueSet *extensions);
+ char *MapPattern(NameValueSet *nv, char *pattern);
+
+ int InitializeUpdate(RA_Session *session,
+ BYTE key_version, BYTE key_index,
+ Buffer &key_diversification_data,
+ Buffer &key_info_data,
+ Buffer &card_challenge,
+ Buffer &card_cryptogram,
+ Buffer &host_challenge, const char *connId);
+
+ int CreatePin(RA_Session *session, BYTE pin_number, BYTE max_retries, char *pin);
+
+ int IsPinPresent(RA_Session *session,BYTE pin_number);
+
+ AuthParams *RequestLogin(RA_Session *session, int invalid_pw, int blocked);
+ AuthParams *RequestExtendedLogin(RA_Session *session, int invalid_pw, int blocked, char **parameters, int len, char *title, char *description);
+
+ void StatusUpdate(RA_Session *session, NameValueSet *extensions, int status, const char *info);
+ void StatusUpdate(RA_Session *session, int status, const char *info);
+
+ Buffer *GetAppletVersion(RA_Session *session);
+
+ Secure_Channel *SetupSecureChannel(RA_Session *session, BYTE key_version, BYTE key_index, const char *connId);
+ Secure_Channel *SetupSecureChannel(RA_Session *session,
+ BYTE key_version, BYTE key_index, SecurityLevel security_level, const char *connId);
+
+ SecureId *RequestSecureId(RA_Session *session);
+
+ char *RequestNewPin(RA_Session *session, unsigned int min_len, unsigned int max_len);
+
+ char *RequestASQ(RA_Session *session, char *question);
+
+ int EncryptData(Buffer &cuid, Buffer &versionID, Buffer &in, Buffer &out, const char *connid);
+
+ int ComputeRandomData(Buffer &data_out, int dataSize, const char *connid);
+
+ int CreateKeySetData(
+ Buffer &cuid,
+ Buffer &versionID,
+ Buffer &NewMasterVer,
+ Buffer &out,
+ const char *connid);
+
+ bool GetTokenType(
+ const char *prefix,
+ int major_version, int minor_version,
+ const char *cuid, const char *msn,
+ NameValueSet *extensions,
+ RA_Status &o_status,
+ const char *&o_tokenType);
+
+ Buffer *ListObjects(RA_Session *session, BYTE seq);
+
+ Buffer *GetStatus(RA_Session *session, BYTE p1, BYTE p2);
+
+ Buffer *GetData(RA_Session *session);
+
+ int SelectApplet(RA_Session *session, BYTE p1, BYTE p2, Buffer *aid);
+
+ int UpgradeApplet(
+ RA_Session *session,
+ char *prefix,
+ char *tokenType,
+ BYTE major_version, BYTE minor_version,
+ const char *new_version,
+ const char *applet_dir,
+ SecurityLevel security_level,
+ const char *connid,
+ NameValueSet *extensions,
+ int start_progress, int end_progress,
+ char **key_version);
+
+ int UpgradeKey(RA_Session *session, BYTE major_version, BYTE minor_version, int new_version);
+
+ int SelectCardManager(RA_Session *session, char *prefix, char *tokenType);
+
+ int FormatMuscleApplet(
+ RA_Session *session,
+ unsigned short memSize,
+ Buffer &PIN0, BYTE pin0Tries,
+ Buffer &unblockPIN0, BYTE unblock0Tries,
+ Buffer &PIN1, BYTE pin1Tries,
+ Buffer &unblockPIN1, BYTE unblock1Tries,
+ unsigned short objCreationPermissions,
+ unsigned short keyCreationPermissions,
+ unsigned short pinCreationPermissions);
+
+ Secure_Channel *GenerateSecureChannel(
+ RA_Session *session, const char *connid,
+ Buffer &card_diversification_data,
+ Buffer &card_key_data,
+ Buffer &card_challenge,
+ Buffer &card_cryptogram,
+ Buffer &host_challenge);
+ AuthenticationEntry *GetAuthenticationEntry(
+ const char * a_prefix,
+ const char * a_configname,
+ const char * a_tokenType);
+
+ protected:
+ RA_Status Format(RA_Session *session, NameValueSet *extensions, bool skipAuth);
+ bool RevokeCertificates(RA_Session *session, char *cuid, char *audit_msg,
+ char *final_applet_version,
+ char *keyVersion,
+ char *tokenType, char *userid, RA_Status &status );
+ int IsTokenDisabledByTus(Secure_Channel *channel);
+
+ int totalAvailableMemory;
+ int totalFreeMemory;
+};
+
+#endif /* RA_PROCESSOR_H */
diff --git a/base/tps/src/include/processor/RA_Renew_Processor.h b/base/tps/src/include/processor/RA_Renew_Processor.h
new file mode 100644
index 000000000..bb8710a74
--- /dev/null
+++ b/base/tps/src/include/processor/RA_Renew_Processor.h
@@ -0,0 +1,57 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * 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;
+ * version 2.1 of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ *
+ * Copyright (C) 2007 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ */
+
+#ifndef RA_RENEW_PROCESSOR_H
+#define RA_RENEW_PROCESSOR_H
+
+#ifdef HAVE_CONFIG_H
+#ifndef AUTOTOOLS_CONFIG_H
+#define AUTOTOOLS_CONFIG_H
+
+/* Eliminate warnings when using Autotools */
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+
+#include <config.h>
+#endif /* AUTOTOOLS_CONFIG_H */
+#endif /* HAVE_CONFIG_H */
+
+#include "processor/RA_Processor.h"
+
+#ifdef XP_WIN32
+#define TPS_PUBLIC __declspec(dllexport)
+#else /* !XP_WIN32 */
+#define TPS_PUBLIC
+#endif /* !XP_WIN32 */
+
+class RA_Renew_Processor : public RA_Processor
+{
+ public:
+ TPS_PUBLIC RA_Renew_Processor();
+ TPS_PUBLIC ~RA_Renew_Processor();
+ public:
+ TPS_PUBLIC RA_Status Process(RA_Session *session, NameValueSet *extensions);
+};
+
+#endif /* RA_RENEW_PROCESSOR_H */
diff --git a/base/tps/src/include/processor/RA_Unblock_Processor.h b/base/tps/src/include/processor/RA_Unblock_Processor.h
new file mode 100644
index 000000000..ae28ea593
--- /dev/null
+++ b/base/tps/src/include/processor/RA_Unblock_Processor.h
@@ -0,0 +1,57 @@
+/* --- BEGIN COPYRIGHT BLOCK ---
+ * 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;
+ * version 2.1 of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA
+ *
+ * Copyright (C) 2007 Red Hat, Inc.
+ * All rights reserved.
+ * --- END COPYRIGHT BLOCK ---
+ */
+
+#ifndef RA_UNBLOCK_PROCESSOR_H
+#define RA_UNBLOCK_PROCESSOR_H
+
+#ifdef HAVE_CONFIG_H
+#ifndef AUTOTOOLS_CONFIG_H
+#define AUTOTOOLS_CONFIG_H
+
+/* Eliminate warnings when using Autotools */
+#undef PACKAGE_BUGREPORT
+#undef PACKAGE_NAME
+#undef PACKAGE_STRING
+#undef PACKAGE_TARNAME
+#undef PACKAGE_VERSION
+
+#include <config.h>
+#endif /* AUTOTOOLS_CONFIG_H */
+#endif /* HAVE_CONFIG_H */
+
+#include "processor/RA_Processor.h"
+
+#ifdef XP_WIN32
+#define TPS_PUBLIC __declspec(dllexport)
+#else /* !XP_WIN32 */
+#define TPS_PUBLIC
+#endif /* !XP_WIN32 */
+
+class RA_Unblock_Processor : public RA_Processor
+{
+ public:
+ TPS_PUBLIC RA_Unblock_Processor();
+ TPS_PUBLIC ~RA_Unblock_Processor();
+ public:
+ TPS_PUBLIC RA_Status Process(RA_Session *session, NameValueSet *extensions);
+};
+
+#endif /* RA_UNBLOCK_PROCESSOR_H */