Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08ea5185 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove IOperation and beginOp."

parents 360567ba e32c142d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -631,8 +631,7 @@ e2f8bc1868fd4a3fd587c172773ea5a8c2f5a3deaf7958394102ca455252b255 android.hardwar
bbeee9604128ede83ee755b67e73b5ad29e6e1dbac9ec41fea6ffe2745b0c50a android.hardware.identity@1.0::IIdentityCredential
96ce8aad80f4c476f25261f790d357c117e79e18474c7dadd850dac704bbe65e android.hardware.identity@1.0::IIdentityCredentialStore
8da9c938e58f7d636ddd2f92c646f99d9a9e79612e6441b6380ab12744251873 android.hardware.identity@1.0::IWritableIdentityCredential
27ae3724053940462114228872b3ffaf0b8e6177d5ba97f5a76339d12b8a99dd android.hardware.keymaster@4.1::IKeymasterDevice
adb0efdf1462e9b2e742c0dcadd598666aac551f178be06e755bfcdf5797abd0 android.hardware.keymaster@4.1::IOperation
c5da8636c14cd30f1ae9f10c2219e35b4e29a64443103a5842352dd070afe514 android.hardware.keymaster@4.1::IKeymasterDevice
ddcf89cd8ee2df0d32aee55050826446fb64f7aafde0a7cd946c64f61b1a364c android.hardware.keymaster@4.1::types
65c16331e57f6dd68b3971f06f78fe9e3209afb60630c31705aa355f9a52bf0d android.hardware.neuralnetworks@1.3::IBuffer
278817920bfd5292a7713f97f1832cca53de3de640f7670e413d97c6e7fd581c android.hardware.neuralnetworks@1.3::IDevice
+0 −1
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ hidl_interface {
    srcs: [
        "types.hal",
        "IKeymasterDevice.hal",
        "IOperation.hal",
    ],
    interfaces: [
        "android.hardware.keymaster@3.0",
+0 −16
Original line number Diff line number Diff line
@@ -24,8 +24,6 @@ import @4.0::KeyPurpose;
import @4.0::OperationHandle;
import @4.0::VerificationToken;

import IOperation;

/**
 * @4.1::IKeymasterDevice is a minor extension to @4.0::IKeymasterDevice.  It adds support for
 *
@@ -78,18 +76,4 @@ interface IKeymasterDevice extends @4.0::IKeymasterDevice {
     * an EARLY_BOOT_ONLY key after this method is called must fail with Error::INVALID_KEY_BLOB.
     */
    earlyBootEnded() generates (ErrorCode error);

    /**
     * Begins a cryptographic operation.  beginOp() is a variation on begin().  beginOp() has
     * identical functionality to begin, but instead of an OperationHandle it returns an IOperation
     * object.  An IKeymasterDevice HAL service must call linkToDeath() on the Operation before
     * returning it, and the provided hidl_death_recipient, if called, must abort() the operation.
     * This is to ensure that in the event a client crashes while an operation is in progress, the
     * operation slot is freed and available for use by other clients.
     *
     * @4.1::IKeymasterDevices must implement both beginOp() and begin().
     */
    beginOp(KeyPurpose purpose, vec<uint8_t> keyBlob, vec<KeyParameter> inParams,
        HardwareAuthToken authToken)
        generates (ErrorCode error, vec<KeyParameter> outParam, IOperation operation);
};

keymaster/4.1/IOperation.hal

deleted100644 → 0
+0 −31
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.keymaster@4.1;

import @4.0::ErrorCode;
import @4.0::OperationHandle;

/**
 * IOperation represents an in-progress IKeymasterDevice operation.  It is returned by
 * IKeymasterDevice.beginOp().
 */
interface IOperation {
    /**
     * Returns the operation handle to be used as an authentication challenge.
     */
    getOperationChallenge() generates (ErrorCode error, OperationHandle operation);
};
+0 −12
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
#include <android/hardware/keymaster/3.0/IKeymasterDevice.h>

#include "Keymaster.h"
#include "Operation.h"

namespace android::hardware::keymaster::V4_1::support {

@@ -122,17 +121,6 @@ class Keymaster3 : public Keymaster {

    Return<ErrorCode> earlyBootEnded() override { return ErrorCode::UNIMPLEMENTED; }

    Return<void> beginOp(KeyPurpose purpose, const hidl_vec<uint8_t>& keyBlob,
                         const hidl_vec<KeyParameter>& inParams, const HardwareAuthToken& authToken,
                         beginOp_cb _hidl_cb) override {
        return begin(purpose, keyBlob, inParams, authToken,
                     [&_hidl_cb](V4_0::ErrorCode errorCode, const hidl_vec<KeyParameter>& outParams,
                                 OperationHandle operationHandle) {
                         _hidl_cb(static_cast<ErrorCode>(errorCode), outParams,
                                  new Operation(operationHandle));
                     });
    }

  private:
    void getVersionIfNeeded();

Loading