Sha256: 9d8ee2f1eb5f9dccadf6079d1f98cb7b1ab692c30ecaa8ea78fc7da16f7fe41c

Contents?: true

Size: 814 Bytes

Versions: 16

Compression:

Stored size: 814 Bytes

Contents

/**
 * @file
 * Declares the scoped BIO (OpenSSL) resource.
 */
#pragma once

#include <leatherman/util/scoped_resource.hpp>
#include <openssl/bio.h>

namespace facter { namespace util { namespace posix {

    /**
     * Represents a scoped OpenSSL BIO object.
     * Automatically frees the BIO when it goes out of scope.
    */
    struct scoped_bio : leatherman::util::scoped_resource<BIO*>
    {
        /**
         * Constructs a scoped_bio.
         * @param method The BIO_METHOD to use.
         */
        explicit scoped_bio(const BIO_METHOD* method);

        /**
         * Constructs a scoped_bio.
         * @param bio The BIO to free when destroyed.
         */
        explicit scoped_bio(BIO* bio);

     private:
        static void free(BIO* bio);
    };

}}}  // namespace facter::util::posix

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
facter-3.12.2.cfacter.20181217 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.12.1.cfacter.20181031 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.11.6.cfacter.20181031 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.12.1.cfacter.20181023 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.11.5.cfacter.20181022 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.12.0.cfacter.20181004 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.12.0.cfacter.20181001 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.12.0.cfacter.20180918 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.11.4.cfacter.20180821 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.11.3.cfacter.20180716 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.11.2.cfacter.20180612 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.9.6.cfacter.20180612 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.11.2.cfacter.20180606 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.9.6.cfacter.20180606 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
facter-3.11.0.cfacter.20180319 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp
cfacter-3.11.0.rc.20180314 ext/facter/facter/lib/inc/internal/util/posix/scoped_bio.hpp