123456789101112131415161718192021222324252627282930313233343536 |
- #include <keymaster/km_openssl/ec_key.h>
- #if defined(OPENSSL_IS_BORINGSSL)
- typedef size_t openssl_size_t;
- #else
- typedef int openssl_size_t;
- #endif
- namespace keymaster {
- bool EcKey::EvpToInternal(const EVP_PKEY* pkey) {
- ec_key_.reset(EVP_PKEY_get1_EC_KEY(const_cast<EVP_PKEY*>(pkey)));
- return ec_key_.get() != nullptr;
- }
- bool EcKey::InternalToEvp(EVP_PKEY* pkey) const {
- return EVP_PKEY_set1_EC_KEY(pkey, ec_key_.get()) == 1;
- }
- }
|