398870
diff -up ./esc/src/lib/coolkey/CoolKey.cpp.fix2 ./esc/src/lib/coolkey/CoolKey.cpp
398870
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix2	2018-10-11 18:34:34.622987227 -0700
398870
+++ ./esc/src/lib/coolkey/CoolKey.cpp	2018-10-11 18:36:11.918476971 -0700
398870
@@ -492,13 +492,11 @@ HRESULT CoolKeyGetCUIDDirectly(char *aBu
398870
     }
398870
 
398870
     cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
398870
-    assert(cardCtxt);
398870
     if (!cardCtxt) {
398870
          goto done;
398870
     }
398870
 
398870
     conn = CKYCardConnection_Create(cardCtxt);
398870
-    assert(conn);
398870
     if (!conn) {
398870
         goto done;
398870
     }
398870
@@ -559,13 +557,11 @@ HRESULT CoolKeyGetATRDirectly(char *aBuf
398870
     }
398870
 
398870
     cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
398870
-    assert(cardCtxt);
398870
     if (!cardCtxt) {
398870
          goto done;
398870
     }
398870
 
398870
     conn = CKYCardConnection_Create(cardCtxt);
398870
-    assert(conn);
398870
     if (!conn) {
398870
         goto done;
398870
     }
398870
@@ -629,13 +625,11 @@ HRESULT CoolKeyGetLifeCycleDirectly(CKYB
398870
     }
398870
 
398870
     cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
398870
-    assert(cardCtxt);
398870
     if (!cardCtxt) {
398870
          goto done;
398870
     }
398870
 
398870
     conn = CKYCardConnection_Create(cardCtxt);
398870
-    assert(conn);
398870
     if (!conn) {
398870
         goto done;
398870
     }
398870
@@ -691,13 +685,11 @@ HRESULT CoolKeyGetCPLCDataDirectly(CKYAp
398870
     }
398870
 
398870
     cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
398870
-    assert(cardCtxt);
398870
     if (!cardCtxt) {
398870
          goto done;
398870
     }
398870
 
398870
     conn = CKYCardConnection_Create(cardCtxt);
398870
-    assert(conn);
398870
     if (!conn) {
398870
         goto done;
398870
     }
398870
@@ -752,19 +744,16 @@ static void PR_CALLBACK BlinkTimer(void
398870
         const char *readerName = NULL;
398870
   
398870
         CKYCardContext *cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
398870
-        assert(cardCtxt);
398870
         if (!cardCtxt) {
398870
             goto done;
398870
         }
398870
   
398870
         conn = CKYCardConnection_Create(cardCtxt);
398870
-        assert(conn);
398870
         if (!conn) {
398870
             goto done;
398870
         }
398870
 
398870
         readerName = GetReaderNameForKeyID(&params->mKey);
398870
-        assert(readerName);
398870
         if (!readerName) {
398870
             goto done;
398870
         }
398870
@@ -1336,7 +1325,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
398870
 
398870
     CKYCardContext *cardCtxt = CKYCardContext_Create(SCARD_SCOPE_USER);
398870
 
398870
-    assert(cardCtxt);
398870
     if (!cardCtxt) {
398870
         CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info. Can't create Card Context !.\n",GetTStamp(tBuff,56));
398870
         result = E_FAIL;
398870
@@ -1344,7 +1332,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
398870
     }
398870
 
398870
     conn = CKYCardConnection_Create(cardCtxt);
398870
-    assert(conn);
398870
     if (!conn) {
398870
         CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info.  Can't create Card Connection!\n",GetTStamp(tBuff,56));
398870
         result = E_FAIL;
398870
@@ -1352,7 +1339,6 @@ HRESULT CoolKeyGetIssuerInfo(const CoolK
398870
     }
398870
 
398870
     readerName = GetReaderNameForKeyID(aKey);
398870
-    assert(readerName);
398870
     if (!readerName) {
398870
         CoolKeyLogMsg( PR_LOG_ERROR, "%s Attempting to get key issuer info.  Can't get reader name!\n",GetTStamp(tBuff,56));
398870
         result = E_FAIL;