Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1148)

Unified Diff: src/trusted/service_runtime/name_service/default_name_service.c

Issue 550523002: Remove the old "SecureRandom" service, formerly used by get_random_bytes() (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/service_runtime/name_service/default_name_service.c
diff --git a/src/trusted/service_runtime/name_service/default_name_service.c b/src/trusted/service_runtime/name_service/default_name_service.c
deleted file mode 100644
index 73533a6cc9fcc086b1586e561a562fc5e74e390d..0000000000000000000000000000000000000000
--- a/src/trusted/service_runtime/name_service/default_name_service.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2011 The Native Client 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 "native_client/src/trusted/service_runtime/name_service/default_name_service.h"
-
-#include "native_client/src/shared/platform/nacl_log.h"
-#include "native_client/src/trusted/desc/nacl_desc_rng.h"
-#include "native_client/src/trusted/manifest_name_service_proxy/manifest_proxy.h"
-#include "native_client/src/trusted/service_runtime/include/sys/fcntl.h"
-#include "native_client/src/trusted/service_runtime/sel_ldr_thread_interface.h"
-
-int NaClDefaultNameServiceInit(struct NaClNameService *ns) {
- /*
- * Create an CSPRNG and enter it into the name server.
- */
- struct NaClDescRng *rng = NULL;
-
- rng = (struct NaClDescRng *) malloc(sizeof *rng);
- if (NULL == rng) {
- goto malloc_failed;
- }
- if (!NaClDescRngCtor(rng)) {
- goto rng_ctor_failed;
- }
-
- /*
- * It may appear desirable to insert a factory for rng, so there can
- * be per-thread secure rng access. However, note that the only way
- * we "transfer" a RNG is to create a new (but indistinguishable)
- * RNG at the recipient, so each lookup results in a new generator
- * anyway.
- */
- (*NACL_VTBL(NaClNameService, ns)->
- CreateDescEntry)(ns,
- "SecureRandom", NACL_ABI_O_RDWR,
- (struct NaClDesc *) rng);
- rng = NULL;
-
- return 1;
-
- rng_ctor_failed:
- free(rng);
- malloc_failed:
- return 0;
-}
« no previous file with comments | « src/trusted/service_runtime/name_service/default_name_service.h ('k') | src/trusted/service_runtime/sel_ldr.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698