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

Side by Side Diff: tpm/tpm_handles.c

Issue 660204: Upgrade to tpm-emulator version 0.7. (Closed)
Patch Set: Created 10 years, 9 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 unified diff | Download patch
« no previous file with comments | « tpm/tpm_handles.h ('k') | tpm/tpm_identity.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Software-Based Trusted Platform Module (TPM) Emulator for Linux 1 /* Software-based Trusted Platform Module (TPM) Emulator
2 * Copyright (C) 2004 Mario Strasser <mast@gmx.net>, 2 * Copyright (C) 2004-2010 Mario Strasser <mast@gmx.net>
3 * Swiss Federal Institute of Technology (ETH) Zurich
4 * 3 *
5 * This module is free software; you can redistribute it and/or modify 4 * This module is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published 5 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 2 of the License, 6 * by the Free Software Foundation; either version 2 of the License,
8 * or (at your option) any later version. 7 * or (at your option) any later version.
9 * 8 *
10 * This module is distributed in the hope that it will be useful, 9 * This module is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 12 * GNU General Public License for more details.
14 * 13 *
15 * $Id$ 14 * $Id: tpm_handles.c 364 2010-02-11 10:24:45Z mast $
16 */ 15 */
17 16
18 #include "tpm_emulator.h" 17 #include "tpm_emulator.h"
19 #include "tpm_handles.h" 18 #include "tpm_handles.h"
20 #include "tpm_data.h" 19 #include "tpm_data.h"
21 20
22 TPM_KEY_DATA *tpm_get_key_slot(TPM_KEY_HANDLE handle) 21 TPM_KEY_DATA *tpm_get_key_slot(TPM_KEY_HANDLE handle)
23 { 22 {
24 if (handle == TPM_INVALID_HANDLE) return NULL; 23 if (handle == TPM_INVALID_HANDLE) return NULL;
25 handle &= 0x00ffffff; 24 handle &= 0x00ffffff;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 100
102 TPM_DAA_SESSION_DATA *tpm_get_daa(TPM_DAAHANDLE handle) 101 TPM_DAA_SESSION_DATA *tpm_get_daa(TPM_DAAHANDLE handle)
103 { 102 {
104 if ((handle == TPM_INVALID_HANDLE) || ((handle >> 24) != TPM_RT_DAA_TPM)) 103 if ((handle == TPM_INVALID_HANDLE) || ((handle >> 24) != TPM_RT_DAA_TPM))
105 return NULL; 104 return NULL;
106 handle &= 0x00ffffff; 105 handle &= 0x00ffffff;
107 if ((handle >= TPM_MAX_SESSIONS_DAA) 106 if ((handle >= TPM_MAX_SESSIONS_DAA)
108 || (tpmData.stany.data.sessionsDAA[handle].type != TPM_ST_DAA)) return NULL; 107 || (tpmData.stany.data.sessionsDAA[handle].type != TPM_ST_DAA)) return NULL;
109 return &tpmData.stany.data.sessionsDAA[handle]; 108 return &tpmData.stany.data.sessionsDAA[handle];
110 } 109 }
OLDNEW
« no previous file with comments | « tpm/tpm_handles.h ('k') | tpm/tpm_identity.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698