| 1 |
/* |
| 2 |
* Copyright 1999-2010 University of Chicago |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in |
| 5 |
* compliance with the License. You may obtain a copy of the License at |
| 6 |
* |
| 7 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
* |
| 9 |
* Unless required by applicable law or agreed to in writing, software distributed under the License is |
| 10 |
* distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 11 |
* express or implied. |
| 12 |
* |
| 13 |
* See the License for the specific language governing permissions and limitations under the License. |
| 14 |
*/ |
| 15 |
package org.globus.gsi; |
| 16 |
|
| 17 |
import java.security.cert.CertPathValidatorResult; |
| 18 |
import java.security.cert.X509Certificate; |
| 19 |
|
| 20 |
/** |
| 21 |
* FILL ME |
| 22 |
* |
| 23 |
* @author [email protected] |
| 24 |
*/ |
| 25 |
public class X509ProxyCertPathValidatorResult implements CertPathValidatorResult { |
| 26 |
|
| 27 |
private X509Certificate idenX509Certificate; |
| 28 |
private boolean limited; |
| 29 |
|
| 30 |
public X509ProxyCertPathValidatorResult( |
| 31 |
X509Certificate initIdentityCertificate) { |
| 32 |
this(initIdentityCertificate, false); |
| 33 |
} |
| 34 |
|
| 35 |
public X509ProxyCertPathValidatorResult( |
| 36 |
X509Certificate initIdentityCertificate, boolean initLimited) { |
| 37 |
if (initIdentityCertificate != null) { |
| 38 |
this.idenX509Certificate = initIdentityCertificate; |
| 39 |
} |
| 40 |
this.limited = initLimited; |
| 41 |
} |
| 42 |
|
| 43 |
public X509Certificate getIdentityCertificate() { |
| 44 |
return this.idenX509Certificate; |
| 45 |
} |
| 46 |
|
| 47 |
public boolean isLimited() { |
| 48 |
return this.limited; |
| 49 |
} |
| 50 |
|
| 51 |
/** |
| 52 |
* Makes a copy of this <code>CertPathValidatorResult</code>. Changes to the |
| 53 |
* copy will not affect the original and vice versa. |
| 54 |
* |
| 55 |
* @return a copy of this <code>CertPathValidatorResult</code> |
| 56 |
*/ |
| 57 |
public Object clone() { |
| 58 |
try { |
| 59 |
return super.clone(); |
| 60 |
} catch (CloneNotSupportedException e) { |
| 61 |
/* Cannot happen */ |
| 62 |
throw new RuntimeException(e.getMessage(), e); |
| 63 |
} |
| 64 |
} |
| 65 |
} |