Loading core/java/android/security/IKeystoreService.aidl +19 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,10 @@ package android.security; import android.security.keymaster.ExportResult; import android.security.keymaster.KeyCharacteristics; import android.security.keymaster.KeymasterArguments; import android.security.keymaster.OperationResult; import android.security.KeystoreArguments; /** Loading Loading @@ -52,4 +56,19 @@ interface IKeystoreService { int reset_uid(int uid); int sync_uid(int sourceUid, int targetUid); int password_uid(String password, int uid); // Keymaster 0.4 methods int addRngEntropy(in byte[] data); int generateKey(String alias, in KeymasterArguments arguments, int uid, int flags, out KeyCharacteristics characteristics); int getKeyCharacteristics(String alias, in byte[] clientId, in byte[] appId, out KeyCharacteristics characteristics); int importKey(String alias, in KeymasterArguments arguments, int format, in byte[] keyData, int uid, int flags, out KeyCharacteristics characteristics); ExportResult exportKey(String alias, int format, in byte[] clientId, in byte[] appId); OperationResult begin(IBinder appToken, String alias, int purpose, boolean pruneable, in KeymasterArguments params, out KeymasterArguments operationParams); OperationResult update(IBinder token, in KeymasterArguments params, in byte[] input); OperationResult finish(IBinder token, in KeymasterArguments params, in byte[] signature); int abort(IBinder handle); } core/java/android/security/keymaster/ExportResult.aidl 0 → 100644 +20 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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.security.keymaster; /* @hide */ parcelable ExportResult; core/java/android/security/keymaster/ExportResult.java 0 → 100644 +56 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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.security.keymaster; import android.os.Parcel; import android.os.Parcelable; /** * Class for handling parceling the return values from keymaster's export operation. * @hide */ public class ExportResult implements Parcelable { public final int resultCode; public final byte[] exportData; public static final Parcelable.Creator<ExportResult> CREATOR = new Parcelable.Creator<ExportResult>() { public ExportResult createFromParcel(Parcel in) { return new ExportResult(in); } public ExportResult[] newArray(int length) { return new ExportResult[length]; } }; protected ExportResult(Parcel in) { resultCode = in.readInt(); exportData = in.createByteArray(); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel out, int flags) { out.writeInt(resultCode); out.writeByteArray(exportData); } }; core/java/android/security/keymaster/KeyCharacteristics.aidl 0 → 100644 +20 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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.security.keymaster; /* @hide */ parcelable KeyCharacteristics; core/java/android/security/keymaster/KeyCharacteristics.java 0 → 100644 +63 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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.security.keymaster; import android.os.Parcel; import android.os.Parcelable; import java.util.List; /** * @hide */ public class KeyCharacteristics implements Parcelable { public KeymasterArguments swEnforced; public KeymasterArguments hwEnforced; public static final Parcelable.Creator<KeyCharacteristics> CREATOR = new Parcelable.Creator<KeyCharacteristics>() { public KeyCharacteristics createFromParcel(Parcel in) { return new KeyCharacteristics(in); } public KeyCharacteristics[] newArray(int length) { return new KeyCharacteristics[length]; } }; public KeyCharacteristics() {} protected KeyCharacteristics(Parcel in) { readFromParcel(in); } @Override public int describeContents() { return 0; } public void writeToParcel(Parcel out, int flags) { swEnforced.writeToParcel(out, flags); hwEnforced.writeToParcel(out, flags); } public void readFromParcel(Parcel in) { swEnforced = KeymasterArguments.CREATOR.createFromParcel(in); hwEnforced = KeymasterArguments.CREATOR.createFromParcel(in); } } Loading
core/java/android/security/IKeystoreService.aidl +19 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,10 @@ package android.security; import android.security.keymaster.ExportResult; import android.security.keymaster.KeyCharacteristics; import android.security.keymaster.KeymasterArguments; import android.security.keymaster.OperationResult; import android.security.KeystoreArguments; /** Loading Loading @@ -52,4 +56,19 @@ interface IKeystoreService { int reset_uid(int uid); int sync_uid(int sourceUid, int targetUid); int password_uid(String password, int uid); // Keymaster 0.4 methods int addRngEntropy(in byte[] data); int generateKey(String alias, in KeymasterArguments arguments, int uid, int flags, out KeyCharacteristics characteristics); int getKeyCharacteristics(String alias, in byte[] clientId, in byte[] appId, out KeyCharacteristics characteristics); int importKey(String alias, in KeymasterArguments arguments, int format, in byte[] keyData, int uid, int flags, out KeyCharacteristics characteristics); ExportResult exportKey(String alias, int format, in byte[] clientId, in byte[] appId); OperationResult begin(IBinder appToken, String alias, int purpose, boolean pruneable, in KeymasterArguments params, out KeymasterArguments operationParams); OperationResult update(IBinder token, in KeymasterArguments params, in byte[] input); OperationResult finish(IBinder token, in KeymasterArguments params, in byte[] signature); int abort(IBinder handle); }
core/java/android/security/keymaster/ExportResult.aidl 0 → 100644 +20 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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.security.keymaster; /* @hide */ parcelable ExportResult;
core/java/android/security/keymaster/ExportResult.java 0 → 100644 +56 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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.security.keymaster; import android.os.Parcel; import android.os.Parcelable; /** * Class for handling parceling the return values from keymaster's export operation. * @hide */ public class ExportResult implements Parcelable { public final int resultCode; public final byte[] exportData; public static final Parcelable.Creator<ExportResult> CREATOR = new Parcelable.Creator<ExportResult>() { public ExportResult createFromParcel(Parcel in) { return new ExportResult(in); } public ExportResult[] newArray(int length) { return new ExportResult[length]; } }; protected ExportResult(Parcel in) { resultCode = in.readInt(); exportData = in.createByteArray(); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel out, int flags) { out.writeInt(resultCode); out.writeByteArray(exportData); } };
core/java/android/security/keymaster/KeyCharacteristics.aidl 0 → 100644 +20 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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.security.keymaster; /* @hide */ parcelable KeyCharacteristics;
core/java/android/security/keymaster/KeyCharacteristics.java 0 → 100644 +63 −0 Original line number Diff line number Diff line /** * Copyright (c) 2015, 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.security.keymaster; import android.os.Parcel; import android.os.Parcelable; import java.util.List; /** * @hide */ public class KeyCharacteristics implements Parcelable { public KeymasterArguments swEnforced; public KeymasterArguments hwEnforced; public static final Parcelable.Creator<KeyCharacteristics> CREATOR = new Parcelable.Creator<KeyCharacteristics>() { public KeyCharacteristics createFromParcel(Parcel in) { return new KeyCharacteristics(in); } public KeyCharacteristics[] newArray(int length) { return new KeyCharacteristics[length]; } }; public KeyCharacteristics() {} protected KeyCharacteristics(Parcel in) { readFromParcel(in); } @Override public int describeContents() { return 0; } public void writeToParcel(Parcel out, int flags) { swEnforced.writeToParcel(out, flags); hwEnforced.writeToParcel(out, flags); } public void readFromParcel(Parcel in) { swEnforced = KeymasterArguments.CREATOR.createFromParcel(in); hwEnforced = KeymasterArguments.CREATOR.createFromParcel(in); } }