Lines Matching defs:sig
43 uint8_t *GetSignatureData(VbSignature *sig)
45 return (uint8_t *)sig + sig->sig_offset;
48 const uint8_t *GetSignatureDataC(const VbSignature *sig)
50 return (const uint8_t *)sig + sig->sig_offset;
96 const VbSignature *sig)
99 sig, sizeof(VbSignature),
100 sig->sig_offset, sig->sig_size);
146 int VerifyData(const uint8_t *data, uint64_t size, const VbSignature *sig,
150 (unsigned)sig->sig_size, siglen_map[key->algorithm],
152 if (sig->sig_size != siglen_map[key->algorithm]) {
155 (int)sig->sig_size, siglen_map[key->algorithm],
159 if (sig->data_size > size) {
164 if (!RSAVerifyBinary_f(NULL, key, data, sig->data_size,
165 GetSignatureDataC(sig), key->algorithm))
171 int VerifyDigest(const uint8_t *digest, const VbSignature *sig,
174 if (sig->sig_size != siglen_map[key->algorithm]) {
180 GetSignatureDataC(sig),
190 const VbSignature *sig;
225 sig = &block->key_block_checksum;
227 if (VerifySignatureInside(block, block->key_block_size, sig)) {
231 if (sig->sig_size != SHA512_DIGEST_SIZE) {
237 if (block->key_block_size < sig->data_size) {
244 sig->data_size,
246 rv = SafeMemcmp(header_checksum, GetSignatureDataC(sig),
258 sig = &block->key_block_signature;
260 if (VerifySignatureInside(block, block->key_block_size, sig)) {
272 if (block->key_block_size < sig->data_size) {
279 rv = VerifyData((const uint8_t *)block, size, sig, rsa);
288 if (sig->data_size < sizeof(VbKeyBlockHeader)) {
299 if (VerifyPublicKeyInside(block, sig->data_size, &block->data_key)) {
311 const VbSignature *sig = &preamble->preamble_signature;
330 if (VerifySignatureInside(preamble, preamble->preamble_size, sig)) {
336 if (preamble->preamble_size < sig->data_size) {
341 if (VerifyData((const uint8_t *)preamble, size, sig, key)) {
347 if (sig->data_size < sizeof(VbFirmwarePreambleHeader)) {
353 if (VerifySignatureInside(preamble, sig->data_size,
360 if (VerifyPublicKeyInside(preamble, sig->data_size,
398 const VbSignature *sig = &preamble->preamble_signature;
416 if (VerifySignatureInside(preamble, preamble->preamble_size, sig)) {
420 if (VerifyData((const uint8_t *)preamble, size, sig, key)) {
426 if (sig->data_size < sizeof(VbKernelPreambleHeader)) {
432 if (VerifySignatureInside(preamble, sig->data_size,