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

Method AddDSA

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

DSA has public key after group

Source from the content-addressed store, hash-verified

606
607// DSA has public key after group
608void 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

Callers

nothing calls this directly

Calls 9

GetLengthFunction · 0.85
get_indexMethod · 0.80
IsLeftMethod · 0.80
AddToEndMethod · 0.80
WhatMethod · 0.45
GetErrorMethod · 0.45
nextMethod · 0.45
SetErrorMethod · 0.45
get_bufferMethod · 0.45

Tested by

no test coverage detected