Lines Matching refs:sig

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