diff options
author | Ade Lee <alee@redhat.com> | 2011-12-08 21:15:59 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2011-12-08 21:15:59 -0500 |
commit | 171aaece4f23709d33d180cf36eb3af5e454b0c9 (patch) | |
tree | 1485f9f0a7bd10de4ff25030db575dbb8dafae74 /pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java | |
parent | adad2fcee8a29fdb82376fbce07dedb11fccc182 (diff) | |
download | pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.gz pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.xz pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.zip |
Revert "Formatting"
This reverts commit 32150d3ee32f8ac27118af7c792794b538c78a2f.
Diffstat (limited to 'pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java')
-rw-r--r-- | pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java | 93 |
1 files changed, 50 insertions, 43 deletions
diff --git a/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java b/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java index 551aed953..73d9c1d11 100644 --- a/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java +++ b/pki/base/util/src/netscape/security/x509/CertificateIssuerExtension.java @@ -28,20 +28,22 @@ import java.util.Vector; import netscape.security.util.DerOutputStream; import netscape.security.util.DerValue; + /** * Represent the CRL Certificate Issuer Extension. - * - * <p> - * This CRL entry extension identifies the certificate issuer associated with an - * entry in an indirect CRL, i.e. a CRL that has the indirectCRL indicator set + * + * <p>This CRL entry extension identifies the certificate + * issuer associated with an entry in an indirect CRL, + * i.e. a CRL that has the indirectCRL indicator set * in its issuing distribution point extension. - * + * * @see Extension * @see CertAttrSet */ -public class CertificateIssuerExtension extends Extension implements - CertAttrSet { +public class CertificateIssuerExtension extends Extension + implements CertAttrSet +{ /** * */ @@ -63,11 +65,11 @@ public class CertificateIssuerExtension extends Extension implements static { try { OIDMap.addAttribute(CertificateIssuerExtension.class.getName(), - OID, NAME); - } catch (CertificateException e) { - } + OID, NAME); + } catch (CertificateException e) {} } + // Encode this extension private void encodeThis() throws IOException { DerOutputStream os = new DerOutputStream(); @@ -80,28 +82,31 @@ public class CertificateIssuerExtension extends Extension implements } /** - * Create a CertificateIssuerExtension with the passed GeneralNames and - * criticality. - * + * Create a CertificateIssuerExtension with the passed GeneralNames + * and criticality. + * * @param critical true if the extension is to be treated as critical. * @param names the GeneralNames for the issuer. * @exception IOException on error. */ public CertificateIssuerExtension(Boolean critical, GeneralNames names) - throws IOException { + throws IOException + { this.names = names; this.extensionId = PKIXExtensions.CertificateIssuer_Id; this.critical = critical.booleanValue(); encodeThis(); } - /** + /** * Create a CertificateIssuerExtension with the passed GeneralNames. - * + * * @param names the GeneralNames for the issuer. * @exception IOException on error. */ - public CertificateIssuerExtension(GeneralNames names) throws IOException { + public CertificateIssuerExtension(GeneralNames names) + throws IOException + { this.names = names; this.extensionId = PKIXExtensions.CertificateIssuer_Id; this.critical = true; @@ -119,13 +124,14 @@ public class CertificateIssuerExtension extends Extension implements /** * Create the extension from the passed DER encoded value. - * + * * @param critical true if the extension is to be treated as critical. * @param value Array of DER encoded bytes of the actual value. * @exception IOException on error. */ public CertificateIssuerExtension(Boolean critical, Object value) - throws IOException { + throws IOException + { this.extensionId = PKIXExtensions.CertificateIssuer_Id; this.critical = critical.booleanValue(); @@ -139,24 +145,24 @@ public class CertificateIssuerExtension extends Extension implements try { names = new GeneralNames(val); } catch (GeneralNamesException e) { - throw new IOException("CertificateIssuerExtension: " + e.toString()); + throw new IOException("CertificateIssuerExtension: " + + e.toString()); } - } - - /** - * Returns a printable representation of the CertificateIssuerName. - */ - public String toString() { - if (names == null) - return ""; - String s = super.toString() + "CertificateIssuerName [\n" - + names.toString() + "]\n"; - return (s); - } + } + + /** + * Returns a printable representation of the CertificateIssuerName. + */ + public String toString() { + if (names == null) return ""; + String s = super.toString() + "CertificateIssuerName [\n" + + names.toString() + "]\n"; + return (s); + } /** * Decode the extension from the InputStream. - * + * * @param in the InputStream to unmarshal the contents from. * @exception IOException on decoding or validity errors. */ @@ -166,7 +172,7 @@ public class CertificateIssuerExtension extends Extension implements /** * Write the extension to the OutputStream. - * + * * @param out the OutputStream to write the extension to. * @exception IOException on encoding error. */ @@ -187,13 +193,13 @@ public class CertificateIssuerExtension extends Extension implements public void set(String name, Object obj) throws IOException { if (name.equalsIgnoreCase(CERTIFICATE_ISSUER)) { if (!(obj instanceof GeneralNames)) { - throw new IOException("Attribute value should be of" - + " type GeneralNames."); + throw new IOException("Attribute value should be of" + + " type GeneralNames."); } - names = (GeneralNames) obj; + names = (GeneralNames)obj; } else { - throw new IOException("Attribute name not recognized by " - + "CertAttrSet:CertificateIssuerName."); + throw new IOException("Attribute name not recognized by " + + "CertAttrSet:CertificateIssuerName."); } } @@ -204,8 +210,8 @@ public class CertificateIssuerExtension extends Extension implements if (name.equalsIgnoreCase(CERTIFICATE_ISSUER)) { return (names); } else { - throw new IOException("Attribute name not recognized by " - + "CertAttrSet:CertificateIssuerName."); + throw new IOException("Attribute name not recognized by " + + "CertAttrSet:CertificateIssuerName."); } } @@ -216,8 +222,8 @@ public class CertificateIssuerExtension extends Extension implements if (name.equalsIgnoreCase(CERTIFICATE_ISSUER)) { names = null; } else { - throw new IOException("Attribute name not recognized by " - + "CertAttrSet:CertificateIssuerName."); + throw new IOException("Attribute name not recognized by " + + "CertAttrSet:CertificateIssuerName."); } } @@ -239,3 +245,4 @@ public class CertificateIssuerExtension extends Extension implements return (NAME); } } + |