MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / GetVersion

Method GetVersion

extra/yassl/taocrypt/src/asn.cpp:291–308  ·  view source on GitHub ↗

Read Version, return it

Source from the content-addressed store, hash-verified

289
290// Read Version, return it
291word32 BER_Decoder::GetVersion()
292{
293 if (source_.GetError().What()) return 0;
294
295 byte b = source_.next();
296 if (b != INTEGER) {
297 source_.SetError(INTEGER_E);
298 return 0;
299 }
300
301 b = source_.next();
302 if (b != 0x01) {
303 source_.SetError(VERSION_E);
304 return 0;
305 }
306
307 return source_.next();
308}
309
310
311// Read ExplicitVersion, return it or 0 if not there (not an error)

Callers

nothing calls this directly

Calls 4

WhatMethod · 0.45
GetErrorMethod · 0.45
nextMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected