1c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin/* 2c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * Copyright (C) 2015 The Android Open Source Project 3c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * 4c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * Licensed under the Apache License, Version 2.0 (the "License"); 5c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * you may not use this file except in compliance with the License. 6c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * You may obtain a copy of the License at 7c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * 8c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * http://www.apache.org/licenses/LICENSE-2.0 9c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * 10c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * Unless required by applicable law or agreed to in writing, software 11c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * distributed under the License is distributed on an "AS IS" BASIS, 12c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * See the License for the specific language governing permissions and 14c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * limitations under the License. 15c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin */ 16c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin 173f8d4d840894468f2be8a5b56ff266cef2d71c50Alex Klyubinpackage android.security.keystore; 18c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin 19ad9ba10ecda10c14e46d00f40fc3e431cc2d9bc2Alex Klyubinimport java.security.InvalidKeyException; 20ad9ba10ecda10c14e46d00f40fc3e431cc2d9bc2Alex Klyubin 21c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin/** 22c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin * Indicates that a cryptographic operation could not be performed because the user has not been 23708fc9404501ac42b6cac925fe3e10801b5f633bAlex Klyubin * authenticated recently enough. Authenticating the user will resolve this issue. 24c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin */ 25ad9ba10ecda10c14e46d00f40fc3e431cc2d9bc2Alex Klyubinpublic class UserNotAuthenticatedException extends InvalidKeyException { 260b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin 270b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin /** 280b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin * Constructs a new {@code UserNotAuthenticatedException} without detail message and cause. 290b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin */ 30c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin public UserNotAuthenticatedException() { 31c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin super("User not authenticated"); 32c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin } 33c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin 340b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin /** 350b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin * Constructs a new {@code UserNotAuthenticatedException} with the provided detail message and 360b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin * no cause. 370b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin */ 38c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin public UserNotAuthenticatedException(String message) { 39c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin super(message); 40c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin } 410b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin 420b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin /** 430b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin * Constructs a new {@code UserNotAuthenticatedException} with the provided detail message and 440b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin * cause. 450b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin */ 460b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin public UserNotAuthenticatedException(String message, Throwable cause) { 470b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin super(message, cause); 480b188927f45f0794560d5c29123abbd75ddc0851Alex Klyubin } 49c8e557470fc94733c9340c4c67ee69c225bbaa70Alex Klyubin} 50