1b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim/*
2b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * Copyright (C) 2017 The Android Open Source Project
3b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim *
4b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * Licensed under the Apache License, Version 2.0 (the "License");
5b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * you may not use this file except in compliance with the License.
6b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * You may obtain a copy of the License at
7b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim *
8b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim *      http://www.apache.org/licenses/LICENSE-2.0
9b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim *
10b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * Unless required by applicable law or agreed to in writing, software
11b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * distributed under the License is distributed on an "AS IS" BASIS,
12b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * See the License for the specific language governing permissions and
14b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * limitations under the License.
15b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim */
16b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
17b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salimpackage android.security.keystore;
18b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
19b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salimimport android.security.KeyStore;
20b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salimimport android.security.KeyStoreException;
21b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
22b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salimimport java.security.ProviderException;
23b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
24b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim/**
25b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim * Indicates that the Keystore does not support securely importing wrapped keys.
26b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim */
27b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salimpublic class SecureKeyImportUnavailableException extends ProviderException {
28b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
29b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim    public SecureKeyImportUnavailableException() {
30b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim        super();
31b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim    }
32b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
33b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim    public SecureKeyImportUnavailableException(String message) {
34b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim        super(message, new KeyStoreException(KeyStore.HARDWARE_TYPE_UNAVAILABLE,
35b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim                "Secure Key Import not available"));
36b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim    }
37b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
38b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim    public SecureKeyImportUnavailableException(String message, Throwable cause) {
39b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim        super(message, cause);
40b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim    }
41b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
42b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim    public SecureKeyImportUnavailableException(Throwable cause) {
43b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim        super(cause);
44b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim    }
45b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim}
46b631503200c8de47bbd83a71f17c798f5c2f1582Frank Salim
47