00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_SSLIOP_EVP_PKEY_H
00014 #define TAO_SSLIOP_EVP_PKEY_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "ace/config-all.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif
00023
00024 #include "orbsvcs/SSLIOP/SSLIOP_OpenSSL_st_T.h"
00025
00026 #include <openssl/evp.h>
00027 #include <openssl/crypto.h>
00028
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030
00031 namespace TAO
00032 {
00033 namespace SSLIOP
00034 {
00035
00036 template <>
00037 struct OpenSSL_traits< ::EVP_PKEY >
00038 {
00039
00040
00041 enum { LOCK_ID = CRYPTO_LOCK_EVP_PKEY };
00042
00043
00044
00045
00046
00047
00048
00049 static ::EVP_PKEY * _duplicate (::EVP_PKEY * st)
00050 {
00051 if (st != 0)
00052 CRYPTO_add (&(st->references),
00053 1,
00054 LOCK_ID);
00055
00056 return st;
00057 }
00058
00059
00060 static ::EVP_PKEY * copy (::EVP_PKEY const & key);
00061
00062
00063
00064 static void release (::EVP_PKEY * st)
00065 {
00066 ::EVP_PKEY_free (st);
00067 }
00068 };
00069
00070 typedef OpenSSL_st_var< ::EVP_PKEY > EVP_PKEY_var;
00071
00072 }
00073 }
00074
00075 TAO_END_VERSIONED_NAMESPACE_DECL
00076
00077 #include "ace/post.h"
00078
00079 #endif