|
11 | 11 | use core::mem::size_of;
|
12 | 12 | use core::ptr::slice_from_raw_parts;
|
13 | 13 |
|
14 |
| -use der::{asn1::UIntBytes, Encodable, Message}; |
| 14 | +use der::{asn1::UintRef, Encode, Sequence}; |
15 | 15 | use r_efi::efi::Guid;
|
16 | 16 | use ring::{
|
17 | 17 | digest,
|
@@ -120,10 +120,10 @@ pub enum VerifyErr {
|
120 | 120 | // modulus INTEGER, -- n
|
121 | 121 | // publicExponent INTEGER } -- e
|
122 | 122 | //
|
123 |
| -#[derive(Copy, Clone, Debug, Eq, PartialEq, Message)] |
| 123 | +#[derive(Copy, Clone, Debug, Eq, PartialEq, Sequence)] |
124 | 124 | struct RsaPublicKeyDer<'a> {
|
125 |
| - pub modulus: UIntBytes<'a>, |
126 |
| - pub exponents: UIntBytes<'a>, |
| 125 | + pub modulus: UintRef<'a>, |
| 126 | + pub exponents: UintRef<'a>, |
127 | 127 | }
|
128 | 128 |
|
129 | 129 | pub struct PayloadVerifier<'a> {
|
@@ -200,8 +200,8 @@ impl<'a> PayloadVerifier<'a> {
|
200 | 200 | signature = &signed_payload[offset..offset + 384];
|
201 | 201 |
|
202 | 202 | let der = RsaPublicKeyDer {
|
203 |
| - modulus: UIntBytes::new(modulus).map_err(|_e| VerifyErr::InvalidContent)?, |
204 |
| - exponents: UIntBytes::new(exp).map_err(|_e| VerifyErr::InvalidContent)?, |
| 203 | + modulus: UintRef::new(modulus).map_err(|_e| VerifyErr::InvalidContent)?, |
| 204 | + exponents: UintRef::new(exp).map_err(|_e| VerifyErr::InvalidContent)?, |
205 | 205 | };
|
206 | 206 | let encoded = der
|
207 | 207 | .encode_to_slice(&mut formated_public_key)
|
|
0 commit comments