aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-12-30 16:43:11 -0500
committerJack Lloyd <[email protected]>2017-12-30 16:43:11 -0500
commit5d6f6040770d4504018678bf2d95221c50d506b1 (patch)
treeddf4231f97b3df43e8dbde5ed71ced88d5d7b170 /src/lib/x509
parent6ea658f52f14963928fbf14002bcc15325ccd276 (diff)
Reorder fields of X509_Certificate_Data to reduce size
Just a few bytes but every bit helps.
Diffstat (limited to 'src/lib/x509')
-rw-r--r--src/lib/x509/x509cert.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/x509/x509cert.cpp b/src/lib/x509/x509cert.cpp
index 1ebfb7293..dd0514dfb 100644
--- a/src/lib/x509/x509cert.cpp
+++ b/src/lib/x509/x509cert.cpp
@@ -23,9 +23,7 @@ namespace Botan {
struct X509_Certificate_Data
{
- size_t m_version = 0;
std::vector<uint8_t> m_serial;
- bool m_serial_negative;
AlgorithmIdentifier m_sig_algo_inner;
X509_DN m_issuer_dn;
X509_DN m_subject_dn;
@@ -34,15 +32,14 @@ struct X509_Certificate_Data
X509_Time m_not_before;
X509_Time m_not_after;
std::vector<uint8_t> m_subject_public_key_bits;
- AlgorithmIdentifier m_subject_public_key_algid;
std::vector<uint8_t> m_subject_public_key_bitstring;
std::vector<uint8_t> m_subject_public_key_bitstring_sha1;
+ AlgorithmIdentifier m_subject_public_key_algid;
std::vector<uint8_t> m_v2_issuer_key_id;
std::vector<uint8_t> m_v2_subject_key_id;
Extensions m_v3_extensions;
- Key_Constraints m_key_constraints;
std::vector<OID> m_extended_key_usage;
std::vector<uint8_t> m_authority_key_id;
std::vector<uint8_t> m_subject_key_id;
@@ -51,16 +48,19 @@ struct X509_Certificate_Data
std::vector<std::string> m_crl_distribution_points;
std::string m_ocsp_responder;
- size_t m_path_len_constraint = 0;
- bool m_self_signed = false;
- bool m_is_ca_certificate = false;
-
AlternativeName m_subject_alt_name;
AlternativeName m_issuer_alt_name;
NameConstraints m_name_constraints;
Data_Store m_subject_ds;
Data_Store m_issuer_ds;
+
+ size_t m_version = 0;
+ size_t m_path_len_constraint = 0;
+ Key_Constraints m_key_constraints = NO_CONSTRAINTS;
+ bool m_self_signed = false;
+ bool m_is_ca_certificate = false;
+ bool m_serial_negative = false;
};
std::string X509_Certificate::PEM_label() const