Skip to content

Commit

Permalink
Applayer: Add certificate if it doesn't overwrite cert from the smart…
Browse files Browse the repository at this point in the history
…card
  • Loading branch information
ruiteixeira1 authored and agrr committed Nov 28, 2024
1 parent ffe22c5 commit 64d8933
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pteid-mw-pt/_src/eidmw/applayer/APLCertif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ APL_Certif *APL_Certifs::addCert(const CByteArray &certIn, APL_CertifType type,
CAutoMutex autoMutex(&m_Mutex); // We lock for unly one instanciation

APL_Certif *cert = NULL;
auto certsIt = m_certifs.find(ulUniqueId);
if (certsIt != m_certifs.end() &&
(certsIt->second->isFromCard())) { // return existing cert if this cert is already loaded from card
return certsIt->second;
}
cert = new APL_Certif(this, certIn, type, bHidden);
m_certifs[ulUniqueId] = cert;

Expand Down

0 comments on commit 64d8933

Please sign in to comment.