| 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.proxy.ext; |
| 16 |
|
| 17 |
import org.globus.gsi.bc.BouncyCastleX509Extension; |
| 18 |
import org.globus.util.I18n; |
| 19 |
|
| 20 |
/** |
| 21 |
* Represents ProxyCertInfo X.509 extension. |
| 22 |
*/ |
| 23 |
public class GlobusProxyCertInfoExtension extends BouncyCastleX509Extension { |
| 24 |
|
| 25 |
private static I18n i18n = |
| 26 |
I18n.getI18n("org.globus.gsi.errors", |
| 27 |
GlobusProxyCertInfoExtension.class.getClassLoader()); |
| 28 |
|
| 29 |
public GlobusProxyCertInfoExtension(ProxyCertInfo value) { |
| 30 |
super(ProxyCertInfo.OLD_OID.getId(), true, null); |
| 31 |
if (value == null) { |
| 32 |
throw new IllegalArgumentException(i18n.getMessage("proxyErr22")); |
| 33 |
} |
| 34 |
setValue(value); |
| 35 |
} |
| 36 |
|
| 37 |
public void setOid(String oid) { |
| 38 |
throw new RuntimeException(i18n.getMessage("proxyErr23")); |
| 39 |
} |
| 40 |
|
| 41 |
public void setCritical(boolean critical) { |
| 42 |
throw new RuntimeException(i18n.getMessage("proxyErr24")); |
| 43 |
} |
| 44 |
} |