security/manager/ssl/src/nsNSSCleaner.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/ssl/src/nsNSSCleaner.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsNSSCleaner.h"
     1.9 +#include "cert.h"
    1.10 +
    1.11 +CERTVerifyLogContentsCleaner::CERTVerifyLogContentsCleaner(CERTVerifyLog *&cvl)
    1.12 +:m_cvl(cvl)
    1.13 +{
    1.14 +}
    1.15 +
    1.16 +CERTVerifyLogContentsCleaner::~CERTVerifyLogContentsCleaner()
    1.17 +{
    1.18 +  if (!m_cvl)
    1.19 +    return;
    1.20 +
    1.21 +  CERTVerifyLogNode *i_node;
    1.22 +  for (i_node = m_cvl->head; i_node; i_node = i_node->next)
    1.23 +  {
    1.24 +    if (i_node->cert)
    1.25 +      CERT_DestroyCertificate(i_node->cert);
    1.26 +  }
    1.27 +}
    1.28 +

mercurial