File: serializer_v2.h

package info (click to toggle)
golang-github-google-certificate-transparency 0.0~git20160709.0.0f6e3d1~ds1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 5,676 kB
  • sloc: cpp: 35,278; python: 11,838; java: 1,911; sh: 1,885; makefile: 950; xml: 520; ansic: 225
file content (34 lines) | stat: -rw-r--r-- 645 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* -*- mode: c++; indent-tabs-mode: nil -*- */
#ifndef SERIALIZER_V2_H
#define SERIALIZER_V2_H

#include <string>

#include <openssl/objects.h>

#include "util/statusor.h"

// RFC6962-bis (V2) stuff.
namespace rfc6962_bis {
class OID {
 public:
  static util::StatusOr<OID> FromString(const std::string& oid_string);
  static util::StatusOr<OID> FromTagMissingDER(const std::string& der_oid);

  OID();
  OID(const OID& other);
  ~OID();

  util::StatusOr<std::string> ToTagMissingDER() const;
  std::string ToString() const;

 private:
  // Takes ownership
  OID(ASN1_OBJECT* oid);

  ASN1_OBJECT *oid_;
};

}  // namespace rfc6962_bis

#endif