SSP21-CPP
CertificateBody.h
1 //
2 // _ _ ______ _ _ _ _ _ _ _
3 // | \ | | | ____| | (_) | (_) | | | |
4 // | \| | ___ | |__ __| |_| |_ _ _ __ __ _| | | |
5 // | . ` |/ _ \ | __| / _` | | __| | '_ \ / _` | | | |
6 // | |\ | (_) | | |___| (_| | | |_| | | | | (_| |_|_|_|
7 // |_| \_|\___/ |______\__,_|_|\__|_|_| |_|\__, (_|_|_)
8 // __/ |
9 // |___/
10 //
11 // This file is auto-generated. Do not edit manually
12 //
13 // Licensed under the terms of the BSDv3 license
14 //
15 
16 #ifndef SSP21_CERTIFICATEBODY_H
17 #define SSP21_CERTIFICATEBODY_H
18 
19 #include <cstdint>
20 #include "ser4cpp/serialization/BigEndian.h"
21 #include "ssp21/crypto/EnumField.h"
22 #include "ssp21/util/SequenceTypes.h"
23 #include "ssp21/crypto/IntegerField.h"
24 #include "ssp21/crypto/SeqByteField.h"
25 #include "ssp21/crypto/SeqStructField.h"
26 #include "ssp21/crypto/gen/ParseError.h"
27 #include "ssp21/crypto/gen/FormatError.h"
28 #include "ssp21/crypto/IMessagePrinter.h"
29 #include "ssp21/crypto/gen/PublicKeyType.h"
30 #include "ssp21/crypto/gen/ExtensionEnvelope.h"
31 
32 namespace ssp21 {
33 
34 struct CertificateBody final
35 {
37 
39  uint64_t valid_after,
40  uint64_t valid_before,
41  uint8_t signing_level,
42  PublicKeyType public_key_type,
43  const seq32_t& public_key
44  );
45 
46  size_t size() const;
47 
48  static const uint8_t min_size_bytes = 20;
49 
51  IntegerField<ser4cpp::UInt64> valid_before;
52  IntegerField<ser4cpp::UInt8> signing_level;
53  EnumField<PublicKeyTypeSpec> public_key_type;
54  SeqByteField public_key;
56 
57  ParseError read(seq32_t& input);
58  ParseError read_all(const seq32_t& input);
59  FormatError write(wseq32_t& output) const;
60  void print(const char* name, IMessagePrinter& printer) const;
61 };
62 
63 }
64 
65 #endif
SSP21-cpp main namespace.
Definition: BufferTypes.h:12
ParseError
Definition: ParseError.h:27
FormatError
Definition: FormatError.h:28