Asylo
enclave_server_credentials.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2017 Asylo authors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef ASYLO_GRPC_AUTH_ENCLAVE_SERVER_CREDENTIALS_H_
20 #define ASYLO_GRPC_AUTH_ENCLAVE_SERVER_CREDENTIALS_H_
21 
22 #include "asylo/grpc/auth/core/enclave_credentials.h"
23 
24 #include "asylo/grpc/auth/enclave_credentials_options.h"
25 #include "include/grpcpp/security/server_credentials.h"
26 
27 namespace asylo {
28 
29 /// Constructs a `grpc::ServerCredentials` object for use in an enclave system.
30 ///
31 /// The configuration `options` determines which assertions are presented by the
32 /// entity that wields the resulting credentials object. `options` must meet the
33 /// following criteria:
34 ///
35 /// * `options.self_assertions` must contain at least one assertion
36 /// description
37 /// * `options.accepted_peer_assertions` must contain at least one assertion
38 /// description
39 ///
40 /// \param options Options for configuring the credentials.
41 /// \return A gRPC server credentials object.
44 
45 } // namespace asylo
46 
47 #endif // ASYLO_GRPC_AUTH_ENCLAVE_SERVER_CREDENTIALS_H_
std::shared_ptr<::grpc::ServerCredentials > EnclaveServerCredentials(const EnclaveCredentialsOptions &options)
Constructs a grpc::ServerCredentials object for use in an enclave system.
Definition: aes_gcm_siv.h:37