Botan 1.10.17
eac_obj.h
Go to the documentation of this file.
1/*
2* EAC1_1 objects
3* (C) 2008 Falko Strenzke
4*
5* Distributed under the terms of the Botan license
6*/
7
8#ifndef BOTAN_EAC_OBJ_H__
9#define BOTAN_EAC_OBJ_H__
10
11#include <botan/signed_obj.h>
12#include <botan/ecdsa_sig.h>
13
14namespace Botan {
15
16/**
17* TR03110 v1.1 EAC CV Certificate
18*/
19template<typename Derived> // CRTP is used enable the call sequence:
21 {
22 public:
23 /**
24 * Return the signature as a concatenation of the encoded parts.
25 * @result the concatenated signature
26 */
29
30 bool check_signature(class Public_Key& key) const
31 {
33 }
34
35 protected:
37
38 void init(DataSource& in)
39 {
40 try
41 {
42 Derived::decode_info(in, tbs_bits, m_sig);
43 }
44 catch(Decoding_Error)
45 {
46 throw Decoding_Error(PEM_label_pref + " decoding failed");
47 }
48 }
49
50 virtual ~EAC1_1_obj<Derived>(){}
51 };
52
53}
54
55#endif
ECDSA_Signature m_sig
Definition eac_obj.h:36
void init(DataSource &in)
Definition eac_obj.h:38
SecureVector< byte > get_concat_sig() const
Definition eac_obj.h:27
bool check_signature(class Public_Key &key) const
Definition eac_obj.h:30
bool check_signature(class Public_Key &key, const MemoryRegion< byte > &sig) const
SecureVector< byte > tbs_bits
Definition signed_obj.h:86
std::string PEM_label_pref
Definition signed_obj.h:87
MemoryVector< byte > get_concatenation() const
Definition ecdsa_sig.cpp:33
MemoryVector< byte > DER_encode() const
Definition ecdsa_sig.cpp:23
Decoding_Error(const std::string &name)
Definition exceptn.h:140