| OLD | NEW |
| 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 * | 4 * |
| 5 * Stub implementations of utility functions which call their linux-specific | 5 * Stub implementations of utility functions which call their linux-specific |
| 6 * equivalents. | 6 * equivalents. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #define _STUB_IMPLEMENTATION_ | 9 #define _STUB_IMPLEMENTATION_ |
| 10 #include "tlcl.h" | 10 #include "tlcl.h" |
| 11 #include "tlcl_internal.h" | 11 #include "tlcl_internal.h" |
| 12 #include "utility.h" | 12 #include "utility.h" |
| 13 | 13 |
| 14 #include <errno.h> | 14 #include <errno.h> |
| 15 #include <fcntl.h> | 15 #include <fcntl.h> |
| 16 #include <stdarg.h> | 16 #include <stdarg.h> |
| 17 #include <stdio.h> | 17 #include <stdio.h> |
| 18 #include <stdlib.h> | 18 #include <stdlib.h> |
| 19 #include <string.h> | 19 #include <string.h> |
| 20 #include <sys/time.h> | 20 #include <sys/time.h> |
| 21 #include <sys/types.h> | 21 #include <sys/types.h> |
| 22 #include <sys/stat.h> | 22 #include <sys/stat.h> |
| 23 #include <unistd.h> | 23 #include <unistd.h> |
| 24 #include <tss/tcs.h> | 24 |
| 25 #include "tpmextras.h" | 25 #include "tpmextras.h" |
| 26 #define TPM_DEVICE_PATH "/dev/tpm0" | 26 #define TPM_DEVICE_PATH "/dev/tpm0" |
| 27 | 27 |
| 28 /* TODO: these functions should pass errors back rather than returning void */ | 28 /* TODO: these functions should pass errors back rather than returning void */ |
| 29 /* TODO: if the only callers to these are just wrappers, should just | 29 /* TODO: if the only callers to these are just wrappers, should just |
| 30 * remove the wrappers and call us directly. */ | 30 * remove the wrappers and call us directly. */ |
| 31 | 31 |
| 32 | 32 |
| 33 /* The file descriptor for the TPM device. | 33 /* The file descriptor for the TPM device. |
| 34 */ | 34 */ |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 (tag == TPM_TAG_RQU_COMMAND && | 179 (tag == TPM_TAG_RQU_COMMAND && |
| 180 response_tag == TPM_TAG_RSP_COMMAND) || | 180 response_tag == TPM_TAG_RSP_COMMAND) || |
| 181 (tag == TPM_TAG_RQU_AUTH1_COMMAND && | 181 (tag == TPM_TAG_RQU_AUTH1_COMMAND && |
| 182 response_tag == TPM_TAG_RSP_AUTH1_COMMAND) || | 182 response_tag == TPM_TAG_RSP_AUTH1_COMMAND) || |
| 183 (tag == TPM_TAG_RQU_AUTH2_COMMAND && | 183 (tag == TPM_TAG_RQU_AUTH2_COMMAND && |
| 184 response_tag == TPM_TAG_RSP_AUTH2_COMMAND)); | 184 response_tag == TPM_TAG_RSP_AUTH2_COMMAND)); |
| 185 assert(response_length == TpmResponseSize(response)); | 185 assert(response_length == TpmResponseSize(response)); |
| 186 | 186 |
| 187 return 0; /* Success */ | 187 return 0; /* Success */ |
| 188 } | 188 } |
| OLD | NEW |