1 /*
2  * Copyright (C) 2017 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 package android.security.keystore;
18 
19 import android.security.KeyStoreException;
20 import android.security.keymaster.KeymasterDefs;
21 
22 import java.security.ProviderException;
23 
24 /**
25  * Indicates that the Keystore does not support securely importing wrapped keys.
26  */
27 public class SecureKeyImportUnavailableException extends ProviderException {
28 
SecureKeyImportUnavailableException()29     public SecureKeyImportUnavailableException() {
30         super();
31     }
32 
SecureKeyImportUnavailableException(String message)33     public SecureKeyImportUnavailableException(String message) {
34         super(message, new KeyStoreException(KeymasterDefs.KM_ERROR_HARDWARE_TYPE_UNAVAILABLE,
35                 "Secure Key Import not available"));
36     }
37 
SecureKeyImportUnavailableException(String message, Throwable cause)38     public SecureKeyImportUnavailableException(String message, Throwable cause) {
39         super(message, cause);
40     }
41 
SecureKeyImportUnavailableException(Throwable cause)42     public SecureKeyImportUnavailableException(Throwable cause) {
43         super(cause);
44     }
45 }
46 
47