DSA has public key after group
| 606 | |
| 607 | // DSA has public key after group |
| 608 | void CertDecoder::AddDSA() |
| 609 | { |
| 610 | if (source_.GetError().What()) return; |
| 611 | |
| 612 | byte b = source_.next(); |
| 613 | if (b != BIT_STRING) { |
| 614 | source_.SetError(BIT_STR_E); |
| 615 | return; |
| 616 | } |
| 617 | b = source_.next(); // length, future |
| 618 | b = source_.next(); |
| 619 | while(b != 0) |
| 620 | b = source_.next(); |
| 621 | |
| 622 | word32 idx = source_.get_index(); |
| 623 | b = source_.next(); |
| 624 | if (b != INTEGER) { |
| 625 | source_.SetError(INTEGER_E); |
| 626 | return; |
| 627 | } |
| 628 | |
| 629 | word32 length = GetLength(source_); |
| 630 | length += source_.get_index() - idx; |
| 631 | |
| 632 | if (source_.IsLeft(length) == false) return; |
| 633 | |
| 634 | key_.AddToEnd(source_.get_buffer() + idx, length); |
| 635 | } |
| 636 | |
| 637 | |
| 638 | // process algo OID by summing, return it |