Save public key
| 585 | |
| 586 | // Save public key |
| 587 | void CertDecoder::StoreKey() |
| 588 | { |
| 589 | if (source_.GetError().What()) return; |
| 590 | |
| 591 | word32 read = source_.get_index(); |
| 592 | word32 length = GetSequence(); |
| 593 | |
| 594 | read = source_.get_index() - read; |
| 595 | length += read; |
| 596 | |
| 597 | if (source_.GetError().What()) return; |
| 598 | while (read--) source_.prev(); |
| 599 | |
| 600 | if (source_.IsLeft(length) == false) return; |
| 601 | key_.SetSize(length); |
| 602 | key_.SetKey(source_.get_current()); |
| 603 | source_.advance(length); |
| 604 | } |
| 605 | |
| 606 | |
| 607 | // DSA has public key after group |