1 /*############################################################################ 2 # Copyright 2016-2017 Intel Corporation 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 ############################################################################*/ 16 17 /*! 18 * \file 19 * \brief Message signing interface. 20 */ 21 22 #ifndef EXAMPLE_SIGNMSG_SRC_SIGNMSG_H_ 23 #define EXAMPLE_SIGNMSG_SRC_SIGNMSG_H_ 24 25 #include "epid/common/file_parser.h" 26 #include "epid/common/stdtypes.h" 27 #include "epid/member/api.h" 28 29 /// Check if opaque data blob containing CA certificate is authorized 30 bool IsCaCertAuthorizedByRootCa(void const* data, size_t size); 31 32 /// Create Intel(R) EPID signature of message 33 EpidStatus SignMsg(void const* msg, size_t msg_len, void const* basename, 34 size_t basename_len, unsigned char const* signed_sig_rl, 35 size_t signed_sig_rl_size, 36 unsigned char const* signed_pubkey, 37 size_t signed_pubkey_size, unsigned char const* priv_key_ptr, 38 size_t privkey_size, HashAlg hash_alg, 39 MemberPrecomp* member_precomp, EpidSignature** sig, 40 size_t* sig_len, EpidCaCertificate const* cacert); 41 42 #endif // EXAMPLE_SIGNMSG_SRC_SIGNMSG_H_ 43