aboutsummaryrefslogtreecommitdiff
path: root/openssl/utility.hxx
blob: 5a905ab6c316daf481f64b27f3e6593290f90d8e (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// file      : openssl/utility.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

#ifndef OPENSSL_UTILITY_HXX
#define OPENSSL_UTILITY_HXX

#include <string>  // to_string()
#include <utility> // move(), forward(), declval(), make_pair()
#include <cassert> // assert()

#include <libbutl/utility.mxx>    // casecmp(), reverse_iterate(), etc
#include <libbutl/fdstream.mxx>
#include <libbutl/filesystem.mxx>

#include <openssl/types.hxx>
#include <openssl/version.hxx>

namespace openssl
{
  using std::move;
  using std::forward;
  using std::declval;

  using std::make_pair;
  using std::to_string;

  // <libbutl/utility.mxx>
  //
  using butl::ucase;
  using butl::lcase;
  using butl::casecmp;

  using butl::trim;
  using butl::next_word;

  using butl::reverse_iterate;

  using butl::make_guard;
  using butl::make_exception_guard;

  using butl::getenv;
  using butl::setenv;
  using butl::unsetenv;

  using butl::eof;

  using butl::throw_generic_error;
  using butl::throw_system_error;

  using butl::throw_generic_ios_failure;
  using butl::throw_system_ios_failure;

  // <libbutl/filesystem.mxx>
  //
  using butl::file_exists;

  using butl::auto_rmfile;
  using butl::auto_rmdir;

  // <libbutl/fdstream.mxx>
  //
  using butl::stdin_fdmode;
  using butl::stdout_fdmode;
  using butl::fdnull;
  using butl::fddup;

  // Securely clear a memory buffer.
  //
  void
  mem_clear (void*, size_t);
}

#endif // OPENSSL_UTILITY_HXX