diff options
author | Matthias Gierlings <[email protected]> | 2016-04-29 20:44:30 +0200 |
---|---|---|
committer | Matthias Gierlings <[email protected]> | 2016-06-19 18:25:46 +0200 |
commit | d4f3e7c4ac584daa9d7e1ae10cb3412e450e25cf (patch) | |
tree | 5541bf045d77110a55f1858e385f54d7b761851b /src/lib/cert/x509/x509_ca.h | |
parent | 23d6f67e76b633077b5de91945f61290ff091e1e (diff) |
Reduction of code complexity in TLS classes.
-reduced number of parameters in various methods
-reduced cyclomatic complexity (McCabe-Metric)
-removed "TLSEXT_HEARTBEAT_SUPPORT" from tls_extensions.h (leftover
from heartbeat extension removal?)
Diffstat (limited to 'src/lib/cert/x509/x509_ca.h')
-rw-r--r-- | src/lib/cert/x509/x509_ca.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/lib/cert/x509/x509_ca.h b/src/lib/cert/x509/x509_ca.h index 6ea51cd06..8cedb9db9 100644 --- a/src/lib/cert/x509/x509_ca.h +++ b/src/lib/cert/x509/x509_ca.h @@ -22,6 +22,25 @@ namespace Botan { class BOTAN_DLL X509_CA { public: + class Certificate_Properties + { + public: + Certificate_Properties(X509_Time not_before, X509_Time not_after, + X509_DN issuer_dn, X509_DN subject_dn) + : m_not_before(not_before), m_not_after(not_after), + m_issuer_dn(issuer_dn), m_subject_dn(subject_dn) {} + + const X509_Time& get_not_before() const { return m_not_before; } + const X509_Time& get_not_after() const { return m_not_after; } + const X509_DN& get_issuer_dn() const { return m_issuer_dn; } + const X509_DN& get_subject_dn() const { return m_subject_dn; } + + private: + X509_Time m_not_before; + X509_Time m_not_after; + X509_DN m_issuer_dn; + X509_DN m_subject_dn; + }; /** * Sign a PKCS#10 Request. @@ -82,10 +101,7 @@ class BOTAN_DLL X509_CA RandomNumberGenerator& rng, const AlgorithmIdentifier& sig_algo, const std::vector<byte>& pub_key, - const X509_Time& not_before, - const X509_Time& not_after, - const X509_DN& issuer_dn, - const X509_DN& subject_dn, + const Certificate_Properties properties, const Extensions& extensions); /** |