Skip to content
Browse files

esteid-browser-plugin: Adapt to changes in smartcardpp 0.3

git-svn-id: https://esteid.googlecode.com/svn/esteid-browser-plugin/trunk@3841 0d7e1ef0-d974-fc83-f0b3-ccc071561e0e
  • Loading branch information...
1 parent d4f756f commit 13c548b0c203fafe45a41e76483eaedd3ca812fc kalevlember committed Jul 1, 2011
Showing with 11 additions and 6 deletions.
  1. +5 −1 CMakeLists.txt
  2. +6 −5 CardService.cpp
View
6 CMakeLists.txt
@@ -40,6 +40,9 @@ find_package(Gettext)
find_package(Iconv REQUIRED)
find_package(OpenSSLCrypto REQUIRED)
find_package(SmartCardpp REQUIRED)
+if (UNIX)
+ find_package(PCSCLite)
+endif()
if (WITH_SYSTEM_BOOST)
# FindBoost.cmake isn't up to date wrt new boost versions
@@ -97,7 +100,8 @@ include_directories(
${GTKMM_INCLUDE_DIRS}
${ICONV_INCLUDE_DIR}
${OPENSSLCRYPTO_INCLUDE_DIR}
- ${SMARTCARDPP_INCLUDE_DIR}
+ ${PCSCLITE_INCLUDE_DIR}
+ ${SMARTCARDPP_INCLUDE_DIRS}
${UTIL_DIR}
)
View
11 CardService.cpp
@@ -23,6 +23,7 @@
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
+#include <smartcardpp/PCSCManager.h>
/* Singleton instance variable */
boost::weak_ptr<CardService> CardService::sCardService;
@@ -97,16 +98,16 @@ void CardService::monitor()
}
/*
- * SmartCardManager constructor throws if the pcsc daemon isn't running.
+ * PCSCManager constructor throws if the pcsc daemon isn't running.
* CardService class however needs to start polling even if the pcsc daemon
- * isn't currently running. As a workaround, all calls to SmartCardManager are
- * proxied through cardManager() which attempts to start SmartCardManager if
+ * isn't currently running. As a workaround, all calls to PCSCManager are
+ * proxied through cardManager() which attempts to start PCSCManager if
* needed.
*/
ManagerInterface& CardService::cardManager()
{
if (!m_manager)
- m_manager.reset(new SmartCardManager());
+ m_manager.reset(new PCSCManager());
return *m_manager;
}
@@ -298,7 +299,7 @@ void CardService::runSignSHA1(const std::string& hash,
try {
boost::mutex::scoped_lock l(m_cardMutex);
- boost::scoped_ptr<ManagerInterface> manager(new SmartCardManager());
+ boost::scoped_ptr<ManagerInterface> manager(new PCSCManager());
EstEidCard card(*manager, reader);
std::string ret = toHex(card.calcSignSHA1(fromHex(hash), keyId, PinString(pin.c_str())));

0 comments on commit 13c548b

Please sign in to comment.
Something went wrong with that request. Please try again.