Extract consts module (#282)

Extracts miscellaneous constants that were floating around in the
toplevel into their own module.
This commit is contained in:
Tony Arcieri (iqlusion)
2021-07-12 12:54:54 -07:00
committed by GitHub
parent 5f418bbd1d
commit 563f6f9ccc
12 changed files with 61 additions and 52 deletions
+1 -2
View File
@@ -31,6 +31,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
use crate::{
consts::CB_OBJ_MAX,
error::{Error, Result},
piv::{sign_data, AlgorithmId, SlotId},
serialization::*,
@@ -53,8 +54,6 @@ use x509::{der::Oid, RelativeDistinguishedName};
use x509_parser::{parse_x509_certificate, x509::SubjectPublicKeyInfo};
use zeroize::Zeroizing;
use crate::CB_OBJ_MAX;
// TODO: Make these der_parser::oid::Oid constants when it has const fn support.
const OID_RSA_ENCRYPTION: &str = "1.2.840.113549.1.1.1";
const OID_EC_PUBLIC_KEY: &str = "1.2.840.10045.2.1";