diff options
Diffstat (limited to 'net/quic/crypto/scoped_evp_cipher_ctx.cc')
-rw-r--r-- | net/quic/crypto/scoped_evp_cipher_ctx.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/quic/crypto/scoped_evp_cipher_ctx.cc b/net/quic/crypto/scoped_evp_cipher_ctx.cc new file mode 100644 index 0000000..b904f87 --- /dev/null +++ b/net/quic/crypto/scoped_evp_cipher_ctx.cc @@ -0,0 +1,22 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "net/quic/crypto/scoped_evp_cipher_ctx.h" + +#include <openssl/evp.h> + +namespace net { + +ScopedEVPCipherCtx::ScopedEVPCipherCtx() + : ctx_(EVP_CIPHER_CTX_new()) { } + +ScopedEVPCipherCtx::~ScopedEVPCipherCtx() { + EVP_CIPHER_CTX_free(ctx_); +} + +EVP_CIPHER_CTX* ScopedEVPCipherCtx::get() const { + return ctx_; +} + +} // namespace net |