| 266 | } |
| 267 | |
| 268 | void OID::BERDecode(BufferedTransformation &bt) |
| 269 | { |
| 270 | byte b; |
| 271 | if (!bt.Get(b) || b != OBJECT_IDENTIFIER) |
| 272 | BERDecodeError(); |
| 273 | |
| 274 | size_t length; |
| 275 | if (!BERLengthDecode(bt, length) || length < 1) |
| 276 | BERDecodeError(); |
| 277 | |
| 278 | if (!bt.Get(b)) |
| 279 | BERDecodeError(); |
| 280 | |
| 281 | length--; |
| 282 | m_values.resize(2); |
| 283 | m_values[0] = b / 40; |
| 284 | m_values[1] = b % 40; |
| 285 | |
| 286 | while (length > 0) |
| 287 | { |
| 288 | word32 v; |
| 289 | size_t valueLen = DecodeValue(bt, v); |
| 290 | if (valueLen > length) |
| 291 | BERDecodeError(); |
| 292 | m_values.push_back(v); |
| 293 | length -= valueLen; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | void OID::BERDecodeAndCheck(BufferedTransformation &bt) const |
| 298 | { |
nothing calls this directly
no test coverage detected