| OLD | NEW |
| 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_storage.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_commands.h" | 18 #include "tpm_commands.h" |
| 20 #include "tpm_data.h" | 19 #include "tpm_data.h" |
| 21 #include "tpm_handles.h" | 20 #include "tpm_handles.h" |
| 22 #include "crypto/sha1.h" | 21 #include "crypto/sha1.h" |
| 23 #include "crypto/rsa.h" | 22 #include "crypto/rsa.h" |
| 24 #include "tpm_marshalling.h" | 23 #include "tpm_marshalling.h" |
| 25 | 24 |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 return TPM_WRONGPCRVAL; | 929 return TPM_WRONGPCRVAL; |
| 931 if (key->pcrInfo.tag == TPM_TAG_PCR_INFO_LONG | 930 if (key->pcrInfo.tag == TPM_TAG_PCR_INFO_LONG |
| 932 && !(key->pcrInfo.localityAtRelease | 931 && !(key->pcrInfo.localityAtRelease |
| 933 & (1 << tpmData.stany.flags.localityModifier))) | 932 & (1 << tpmData.stany.flags.localityModifier))) |
| 934 return TPM_BAD_LOCALITY; | 933 return TPM_BAD_LOCALITY; |
| 935 } | 934 } |
| 936 /* extract pubKey */ | 935 /* extract pubKey */ |
| 937 if (tpm_extract_pubkey(key, pubKey) != 0) return TPM_FAIL; | 936 if (tpm_extract_pubkey(key, pubKey) != 0) return TPM_FAIL; |
| 938 return TPM_SUCCESS; | 937 return TPM_SUCCESS; |
| 939 } | 938 } |
| OLD | NEW |