NingSun | 7793a61 | 2018-04-10 15:49:01 -0700 | [diff] [blame] | 1 | /* Copyright 2018 Intel Corporation, Inc |
| 2 | * |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
NingSun | 535535b | 2018-02-28 18:24:31 -0800 | [diff] [blame] | 15 | |
| 16 | #include <stdio.h> |
| 17 | |
NingSun | 535535b | 2018-02-28 18:24:31 -0800 | [diff] [blame] | 18 | #include "tpm2_plugin_api.h" |
| 19 | |
NingSun | 337e675 | 2018-03-29 21:06:26 -0700 | [diff] [blame] | 20 | int sshsm_hw_plugin_get_plugin_functions(SSHSM_HW_FUNCTIONS_t *funcs) |
NingSun | 535535b | 2018-02-28 18:24:31 -0800 | [diff] [blame] | 21 | { |
| 22 | printf("%s(): Assigning Function pointers for TPM (dTPM or PTT) mode \n", __func__); |
NingSun | 337e675 | 2018-03-29 21:06:26 -0700 | [diff] [blame] | 23 | funcs->xxx_init = &tpm2_plugin_init; |
| 24 | funcs->xxx_uninit = &tpm2_plugin_uninit; |
| 25 | funcs->xxx_activate = &tpm2_plugin_activate; |
| 26 | funcs->xxx_load_key = &tpm2_plugin_load_key; |
| 27 | funcs->xxx_unload_key = NULL; |
| 28 | funcs->xxx_rsa_sign_init = &tpm2_plugin_rsa_sign_init; |
| 29 | funcs->xxx_rsa_sign = &tpm2_plugin_rsa_sign; |
NingSun | 535535b | 2018-02-28 18:24:31 -0800 | [diff] [blame] | 30 | |
| 31 | return 0; |
| 32 | } |