From 32e29d96b591451a7ae87ab0bde2995ba502404c Mon Sep 17 00:00:00 2001 From: Source Maintenance Date: Tue, 2 Jun 2015 12:12:06 +0000 Subject: [PATCH] SourceFormat Enforcement --- src/acl/CertificateData.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/acl/CertificateData.cc b/src/acl/CertificateData.cc index fa70f276dd..f84296624b 100644 --- a/src/acl/CertificateData.cc +++ b/src/acl/CertificateData.cc @@ -131,17 +131,17 @@ ACLCertificateData::parse() if (strcasecmp(newAttribute, "DN") != 0) { int nid = OBJ_txt2nid(newAttribute); if (nid == 0) { - const size_t span = strspn(newAttribute, "0123456789."); - if(newAttribute[span] == '\0') { // looks like a numerical OID - // create a new object based on this attribute - - // NOTE: Not a [bad] leak: If the same attribute - // has been added before, the OBJ_txt2nid call - // would return a valid nid value. - // TODO: call OBJ_cleanup() on reconfigure? - nid = OBJ_create(newAttribute, newAttribute, newAttribute); - debugs(28, 7, "New SSL certificate attribute created with name: " << newAttribute << " and nid: " << nid); - } + const size_t span = strspn(newAttribute, "0123456789."); + if(newAttribute[span] == '\0') { // looks like a numerical OID + // create a new object based on this attribute + + // NOTE: Not a [bad] leak: If the same attribute + // has been added before, the OBJ_txt2nid call + // would return a valid nid value. + // TODO: call OBJ_cleanup() on reconfigure? + nid = OBJ_create(newAttribute, newAttribute, newAttribute); + debugs(28, 7, "New SSL certificate attribute created with name: " << newAttribute << " and nid: " << nid); + } } if (nid == 0) { debugs(28, DBG_CRITICAL, "FATAL: Not valid SSL certificate attribute name or numerical OID: " << newAttribute); -- 2.47.2