Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 673968 | Differences between
and this patch

Collapse All | Expand All

(-)tensorflow-1.12.0/tensorflow/core/platform/cloud/oauth_client.cc.old (-1 / +9 lines)
Lines 31-36 limitations under the License. Link Here
31
#include "tensorflow/core/platform/cloud/curl_http_request.h"
31
#include "tensorflow/core/platform/cloud/curl_http_request.h"
32
#include "tensorflow/core/platform/env.h"
32
#include "tensorflow/core/platform/env.h"
33
33
34
#if OPENSSL_VERSION_NUMBER < 0x10100000L
35
static void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
36
{
37
  EVP_MD_CTX_cleanup(ctx);
38
  OPENSSL_free(ctx);
39
}
40
#endif
41
34
namespace tensorflow {
42
namespace tensorflow {
35
43
36
namespace {
44
namespace {
Lines 119-125 Status CreateSignature(RSA* private_key, Link Here
119
  if (EVP_DigestSignFinal(md_ctx.get(), sig.get(), &sig_len) != 1) {
127
  if (EVP_DigestSignFinal(md_ctx.get(), sig.get(), &sig_len) != 1) {
120
    return errors::Internal("DigestFinal (signature compute) failed.");
128
    return errors::Internal("DigestFinal (signature compute) failed.");
121
  }
129
  }
122
  EVP_MD_CTX_cleanup(md_ctx.get());
130
  EVP_MD_CTX_free(md_ctx.get());
123
  return Base64Encode(StringPiece(reinterpret_cast<char*>(sig.get()), sig_len),
131
  return Base64Encode(StringPiece(reinterpret_cast<char*>(sig.get()), sig_len),
124
                      signature);
132
                      signature);
125
}
133
}
(-)tensorflow-1.12.0/tensorflow/core/platform/cloud/oauth_client_test.cc.old (-1 / +9 lines)
Lines 26-31 limitations under the License. Link Here
26
#include "tensorflow/core/platform/env.h"
26
#include "tensorflow/core/platform/env.h"
27
#include "tensorflow/core/platform/test.h"
27
#include "tensorflow/core/platform/test.h"
28
28
29
#if OPENSSL_VERSION_NUMBER < 0x10100000L
30
static void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
31
{
32
  EVP_MD_CTX_cleanup(ctx);
33
  OPENSSL_free(ctx);
34
}
35
#endif
36
29
namespace tensorflow {
37
namespace tensorflow {
30
namespace {
38
namespace {
31
39
Lines 166-172 TEST(OAuthClientTest, GetTokenFromServic Link Here
166
                const_cast<unsigned char*>(
174
                const_cast<unsigned char*>(
167
                    reinterpret_cast<const unsigned char*>(signature.data())),
175
                    reinterpret_cast<const unsigned char*>(signature.data())),
168
                signature.size()));
176
                signature.size()));
169
  EVP_MD_CTX_cleanup(md_ctx);
177
  EVP_MD_CTX_free(md_ctx);
170
178
171
  // Free all the crypto-related resources.
179
  // Free all the crypto-related resources.
172
  EVP_PKEY_free(key);
180
  EVP_PKEY_free(key);

Return to bug 673968