Home | History | Annotate | Download | only in lib21

Lines Matching defs:sig

176 int vb2_verify_signature(const struct vb2_signature *sig, uint32_t size)
183 if (sig->c.magic != VB2_MAGIC_SIGNATURE)
187 rv = vb2_verify_common_header(sig, size);
196 if (sig->c.struct_version_major != VB2_SIGNATURE_VERSION_MAJOR)
200 if (sig->c.fixed_size < sizeof(*sig))
204 rv = vb2_verify_common_member(sig, &min_offset,
205 sig->sig_offset, sig->sig_size);
210 expect_sig_size = vb2_sig_size(sig->sig_alg, sig->hash_alg);
213 if (sig->sig_size != expect_sig_size)
222 static uint8_t *vb2_signature_data(struct vb2_signature *sig)
224 return (uint8_t *)sig + sig->sig_offset;
228 struct vb2_signature *sig,
239 if (key->sig_alg != sig->sig_alg || key->hash_alg != sig->hash_alg)
242 if (sig->sig_size != key_sig_size)
247 if (vb2_safe_memcmp(vb2_signature_data(sig),
255 vb2_signature_data(sig),
262 struct vb2_signature *sig,
272 if (sig->data_size != size) {
305 return vb2_verify_digest(key, sig, digest, &wblocal);
345 struct vb2_signature *sig;
353 sig = (struct vb2_signature *)((uint8_t *)block + sig_offset);
356 rv = vb2_verify_signature(sig,
362 if (memcmp(&sig->guid, key->guid, GUID_SIZE))
366 if (sig->data_size != block->sig_offset)
369 return vb2_verify_data(block, block->sig_offset, sig, key, wb);
381 struct vb2_signature *sig;
415 sig = (struct vb2_signature *)
420 sig, preamble->c.total_size - hash_offset);
425 if (sig->sig_alg != VB2_SIG_NONE)
436 sig = (struct vb2_signature *)((uint8_t *)preamble +
439 rv = vb2_verify_data(preamble, preamble->sig_offset, sig, key, wb);