Merge pull request #1193 from csoler/v0.6-SecurityFixes

ignore unknown ptags in certificates instead of causing an error, for…
This commit is contained in:
csoler 2018-02-24 21:58:58 +01:00 committed by GitHub
commit 05613a25bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -360,8 +360,9 @@ bool RsCertificate::initFromString(const std::string& instr,uint32_t& err_code)
}
break ;
default:
err_code = CERTIFICATE_PARSING_ERROR_UNKNOWN_SECTION_PTAG ;
return false ;
std::cerr << "(WW) unknwown PTAG 0x" << std::hex << ptag << std::dec << " in certificate! Ignoring it." << std::endl;
buf = &buf[s] ;
break ;
}
total_s += s ;