Bug 1147919 - Part 2: Lowercase fingerprint alg before comparing. r=drno

This commit is contained in:
Byron Campen [:bwc] 2015-03-27 13:26:16 -07:00
parent 0484bd79e4
commit ff8b608e91

View File

@ -8,6 +8,7 @@
#define _SDPATTRIBUTE_H_
#include <algorithm>
#include <cctype>
#include <vector>
#include <ostream>
#include <sstream>
@ -307,10 +308,15 @@ public:
// For use by application programmers. Enforces that it's a known and
// non-crazy algorithm.
void
PushEntry(const std::string& algorithm_str,
PushEntry(std::string algorithm_str,
const std::vector<uint8_t>& fingerprint,
bool enforcePlausible = true)
{
std::transform(algorithm_str.begin(),
algorithm_str.end(),
algorithm_str.begin(),
::tolower);
SdpFingerprintAttributeList::HashAlgorithm algorithm =
SdpFingerprintAttributeList::kUnknownAlgorithm;