MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / parseAuthenticate

Function parseAuthenticate

SIP/SIPParse.cpp:417–438  ·  view source on GitHub ↗

This is only for www-authenticate, not for Authentication-Info

Source from the content-addressed store, hash-verified

415
416// This is only for www-authenticate, not for Authentication-Info
417void parseAuthenticate(string stuff, SipParamList &params)
418{
419 SipParseLine parser(stuff.c_str());
420
421 try {
422 string challengeType = parser.scanToken();
423 if (! strceql(challengeType,"Digest")) {
424 LOG(ERR) << format("unrecognized challenge type:%s",challengeType.c_str());
425 return;
426 }
427
428 do {
429 SipParam param;
430 if (! parser.scanGenericParam(param)) break;
431 params.push_back(param);
432 } while (parser.scanChar(','));
433 } catch(SipParseError) {
434 // error was already logged.
435 LOG(DEBUG) << "Caught SIP Parse error";
436 return;
437 }
438}
439
440// You can pass in the comma-separated list of vias and it will parse just the first.
441void SipVia::viaParse(string vialine)

Callers 1

smGetRand401Method · 0.85

Calls 5

strceqlFunction · 0.85
scanTokenMethod · 0.80
scanGenericParamMethod · 0.80
push_backMethod · 0.80
scanCharMethod · 0.80

Tested by

no test coverage detected