summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/include/asn.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'extra/yassl/taocrypt/include/asn.hpp')
-rw-r--r--extra/yassl/taocrypt/include/asn.hpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/extra/yassl/taocrypt/include/asn.hpp b/extra/yassl/taocrypt/include/asn.hpp
index 14fcf22d843..6a1163fbb1c 100644
--- a/extra/yassl/taocrypt/include/asn.hpp
+++ b/extra/yassl/taocrypt/include/asn.hpp
@@ -232,7 +232,12 @@ enum KeyType { DSAk = 515, RSAk = 645 }; // sums of algo OID
// an x509v Certificate BER Decoder
class CertDecoder : public BER_Decoder {
public:
- explicit CertDecoder(Source&, bool decode = true, SignerList* = 0);
+ enum DateType { BEFORE, AFTER };
+ enum NameType { ISSUER, SUBJECT };
+ enum CertType { CA, USER };
+
+ explicit CertDecoder(Source&, bool decode = true, SignerList* sl = 0,
+ bool noVerify = false, CertType ct = USER);
~CertDecoder();
const PublicKey& GetPublicKey() const { return key_; }
@@ -242,9 +247,6 @@ public:
const byte* GetHash() const { return subjectHash_; }
void DecodeToKey();
-
- enum DateType { BEFORE, AFTER };
- enum NameType { ISSUER, SUBJECT };
private:
PublicKey key_;
word32 certBegin_; // offset to start of cert
@@ -257,9 +259,10 @@ private:
byte* signature_;
char* issuer_; // CommonName
char* subject_; // CommonName
+ bool verify_; // Default to yes, but could be off
void ReadHeader();
- void Decode(SignerList*);
+ void Decode(SignerList*, CertType);
void StoreKey();
void AddDSA();
bool ValidateSelfSignature();