blob: 55d2c941b57ebd26f11140409e8007cd708116d4 [file] [log] [blame]
Janis Danisevskis18f27ad2016-06-01 13:57:40 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
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#ifndef KEYSTORE_KEYSTORE_ATTESTATION_ID_H_
18#define KEYSTORE_KEYSTORE_ATTESTATION_ID_H_
19
20#include <utils/Errors.h>
21#include <vector>
22
23namespace android {
24namespace security {
25
26/**
27 * Gathers the attestation id for the application determined by uid by querying the package manager
28 * As of this writing uids can be shared in android, which is why the asn.1 encoded result may
29 * contain more than one application attestation id.
30 *
31 * @returns .first the asn.1 encoded attestation application id if .second is NO_ERROR. If .second
32 * is not NO_ERROR the content of .first is undefined.
33 */
34std::pair<std::vector<uint8_t>, status_t> gather_attestation_application_id(uid_t uid);
35
36} // namespace security
37} // namespace android
38#endif // KEYSTORE_KEYSTORE_ATTESTATION_ID_H_