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

Commit 0050dd10 authored by Kenny Root's avatar Kenny Root Committed by Android Git Automerger
Browse files

am 0c868858: am fbed306f: am b0f4b8a7: Merge "Track keystore binder changes"

# Via Android Git Automerger (2) and others
* commit '0c868858':
  Track keystore binder changes
parents ad251411 0c868858
Loading
Loading
Loading
Loading
+21 −14
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ public interface IKeystoreService extends IInterface {
                return _result;
            }

            public int insert(String name, byte[] item) throws RemoteException {
            public int insert(String name, byte[] item, int uid) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                int _result;
@@ -86,6 +86,7 @@ public interface IKeystoreService extends IInterface {
                    _data.writeInterfaceToken(DESCRIPTOR);
                    _data.writeString(name);
                    _data.writeByteArray(item);
                    _data.writeInt(uid);
                    mRemote.transact(Stub.TRANSACTION_insert, _data, _reply, 0);
                    _reply.readException();
                    _result = _reply.readInt();
@@ -96,13 +97,14 @@ public interface IKeystoreService extends IInterface {
                return _result;
            }

            public int del(String name) throws RemoteException {
            public int del(String name, int uid) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                int _result;
                try {
                    _data.writeInterfaceToken(DESCRIPTOR);
                    _data.writeString(name);
                    _data.writeInt(uid);
                    mRemote.transact(Stub.TRANSACTION_del, _data, _reply, 0);
                    _reply.readException();
                    _result = _reply.readInt();
@@ -113,13 +115,14 @@ public interface IKeystoreService extends IInterface {
                return _result;
            }

            public int exist(String name) throws RemoteException {
            public int exist(String name, int uid) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                int _result;
                try {
                    _data.writeInterfaceToken(DESCRIPTOR);
                    _data.writeString(name);
                    _data.writeInt(uid);
                    mRemote.transact(Stub.TRANSACTION_exist, _data, _reply, 0);
                    _reply.readException();
                    _result = _reply.readInt();
@@ -130,13 +133,14 @@ public interface IKeystoreService extends IInterface {
                return _result;
            }

            public String[] saw(String name) throws RemoteException {
            public String[] saw(String name, int uid) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                String[] _result;
                try {
                    _data.writeInterfaceToken(DESCRIPTOR);
                    _data.writeString(name);
                    _data.writeInt(uid);
                    mRemote.transact(Stub.TRANSACTION_saw, _data, _reply, 0);
                    _reply.readException();
                    int size = _reply.readInt();
@@ -235,13 +239,14 @@ public interface IKeystoreService extends IInterface {
                return _result;
            }

            public int generate(String name) throws RemoteException {
            public int generate(String name, int uid) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                int _result;
                try {
                    _data.writeInterfaceToken(DESCRIPTOR);
                    _data.writeString(name);
                    _data.writeInt(uid);
                    mRemote.transact(Stub.TRANSACTION_generate, _data, _reply, 0);
                    _reply.readException();
                    _result = _reply.readInt();
@@ -252,7 +257,7 @@ public interface IKeystoreService extends IInterface {
                return _result;
            }

            public int import_key(String name, byte[] data) throws RemoteException {
            public int import_key(String name, byte[] data, int uid) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                int _result;
@@ -260,6 +265,7 @@ public interface IKeystoreService extends IInterface {
                    _data.writeInterfaceToken(DESCRIPTOR);
                    _data.writeString(name);
                    _data.writeByteArray(data);
                    _data.writeInt(uid);
                    mRemote.transact(Stub.TRANSACTION_import, _data, _reply, 0);
                    _reply.readException();
                    _result = _reply.readInt();
@@ -324,13 +330,14 @@ public interface IKeystoreService extends IInterface {
                return _result;
            }

            public int del_key(String name) throws RemoteException {
            public int del_key(String name, int uid) throws RemoteException {
                Parcel _data = Parcel.obtain();
                Parcel _reply = Parcel.obtain();
                int _result;
                try {
                    _data.writeInterfaceToken(DESCRIPTOR);
                    _data.writeString(name);
                    _data.writeInt(uid);
                    mRemote.transact(Stub.TRANSACTION_del_key, _data, _reply, 0);
                    _reply.readException();
                    _result = _reply.readInt();
@@ -467,13 +474,13 @@ public interface IKeystoreService extends IInterface {

    public byte[] get(String name) throws RemoteException;

    public int insert(String name, byte[] item) throws RemoteException;
    public int insert(String name, byte[] item, int uid) throws RemoteException;

    public int del(String name) throws RemoteException;
    public int del(String name, int uid) throws RemoteException;

    public int exist(String name) throws RemoteException;
    public int exist(String name, int uid) throws RemoteException;

    public String[] saw(String name) throws RemoteException;
    public String[] saw(String name, int uid) throws RemoteException;

    public int reset() throws RemoteException;

@@ -485,9 +492,9 @@ public interface IKeystoreService extends IInterface {

    public int zero() throws RemoteException;

    public int generate(String name) throws RemoteException;
    public int generate(String name, int uid) throws RemoteException;

    public int import_key(String name, byte[] data) throws RemoteException;
    public int import_key(String name, byte[] data, int uid) throws RemoteException;

    public byte[] sign(String name, byte[] data) throws RemoteException;

@@ -495,7 +502,7 @@ public interface IKeystoreService extends IInterface {

    public byte[] get_pubkey(String name) throws RemoteException;

    public int del_key(String name) throws RemoteException;
    public int del_key(String name, int uid) throws RemoteException;

    public int grant(String name, int granteeUid) throws RemoteException;

+7 −7
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ public class KeyStore {

    public boolean put(String key, byte[] value) {
        try {
            return mBinder.insert(key, value) == NO_ERROR;
            return mBinder.insert(key, value, -1) == NO_ERROR;
        } catch (RemoteException e) {
            Log.w(TAG, "Cannot connect to keystore", e);
            return false;
@@ -94,7 +94,7 @@ public class KeyStore {

    public boolean delete(String key) {
        try {
            return mBinder.del(key) == NO_ERROR;
            return mBinder.del(key, -1) == NO_ERROR;
        } catch (RemoteException e) {
            Log.w(TAG, "Cannot connect to keystore", e);
            return false;
@@ -103,7 +103,7 @@ public class KeyStore {

    public boolean contains(String key) {
        try {
            return mBinder.exist(key) == NO_ERROR;
            return mBinder.exist(key, -1) == NO_ERROR;
        } catch (RemoteException e) {
            Log.w(TAG, "Cannot connect to keystore", e);
            return false;
@@ -112,7 +112,7 @@ public class KeyStore {

    public String[] saw(String prefix) {
        try {
            return mBinder.saw(prefix);
            return mBinder.saw(prefix, -1);
        } catch (RemoteException e) {
            Log.w(TAG, "Cannot connect to keystore", e);
            return null;
@@ -167,7 +167,7 @@ public class KeyStore {

    public boolean generate(String key) {
        try {
            return mBinder.generate(key) == NO_ERROR;
            return mBinder.generate(key, -1) == NO_ERROR;
        } catch (RemoteException e) {
            Log.w(TAG, "Cannot connect to keystore", e);
            return false;
@@ -176,7 +176,7 @@ public class KeyStore {

    public boolean importKey(String keyName, byte[] key) {
        try {
            return mBinder.import_key(keyName, key) == NO_ERROR;
            return mBinder.import_key(keyName, key, -1) == NO_ERROR;
        } catch (RemoteException e) {
            Log.w(TAG, "Cannot connect to keystore", e);
            return false;
@@ -194,7 +194,7 @@ public class KeyStore {

    public boolean delKey(String key) {
        try {
            return mBinder.del_key(key) == NO_ERROR;
            return mBinder.del_key(key, -1) == NO_ERROR;
        } catch (RemoteException e) {
            Log.w(TAG, "Cannot connect to keystore", e);
            return false;