aboutsummaryrefslogtreecommitdiff
path: root/bpkg/openssl.hxx
blob: 30671ae0b878cee77aa1aba10bac84565cbc76a3 (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
// file      : bpkg/openssl.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

#ifndef BPKG_OPENSSL_HXX
#define BPKG_OPENSSL_HXX

#include <butl/process>

#include <bpkg/types.hxx>
#include <bpkg/utility.hxx>

#include <bpkg/common-options.hxx>

namespace bpkg
{
  // Start the openssl process. Parameters in, out, err flags if the caller
  // wish to write to, or read from the process STDIN, STDOUT, STDERR streams.
  // If out and err are both true, then STDERR is redirected to STDOUT, and
  // they both can be read from in_ofd descriptor.
  //
  butl::process
  start_openssl (const common_options&,
                 const char* command,
                 const cstrings& options,
                 bool in = false,
                 bool out = false,
                 bool err = false);
}

#endif // BPKG_OPENSSL_HXX