/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Represent the CRL Reason Flags.
*
* <p>This extension, if present, defines the identifies
* the reason for the certificate revocation.
* <p>The ASN.1 syntax for this is:
* <pre>
* ReasonFlags ::= BIT STRING {
* unused (0),
* keyCompromise (1),
* cACompromise (2),
* affiliationChanged (3),
* superseded (4),
* cessationOfOperation (5),
* certificateHold (6),
* privilegeWithdrawn (7),
* aACompromise (8) }
* </pre>
*
* @author Hemma Prafullchandra
*/
public class ReasonFlags {
/**
* Reasons
*/
= "cessation_of_operation";
};
return i;
}
}
throw new IOException("Name not recognized by ReasonFlags");
}
// Private data members
private boolean[] bitString;
/**
* Check if bit is set.
*
* @param position the position in the bit string to check.
*/
}
/**
* Set the bit at the specified position.
*/
// enlarge bitString if necessary
}
}
/**
* Create a ReasonFlags with the passed bit settings.
*
* @param reasons the bits to be set for the ReasonFlags.
*/
}
/**
* Create a ReasonFlags with the passed bit settings.
*
* @param reasons the bits to be set for the ReasonFlags.
*/
}
/**
* Create a ReasonFlags with the passed bit settings.
*
* @param reasons the bits to be set for the ReasonFlags.
*/
}
/**
* Create the object from the passed DER encoded value.
*
* @param in the DerInputStream to read the ReasonFlags from.
* @exception IOException on decoding errors.
*/
}
/**
* Create the object from the passed DER encoded value.
*
* @param derVal the DerValue decoded from the stream.
* @exception IOException on decoding errors.
*/
}
/**
* Returns the reason flags as a boolean array.
*/
public boolean[] getFlags() {
return bitString;
}
/**
* Set the attribute value.
*/
throw new IOException("Attribute must be of type Boolean.");
}
}
/**
* Get the attribute value.
*/
}
/**
* Delete the attribute value.
*/
}
/**
* Returns a printable representation of the ReasonFlags.
*/
String s = "Reason Flags [\n";
try {
} catch (ArrayIndexOutOfBoundsException ex) {}
s += "]\n";
return (s);
}
/**
* Write the extension to the DerOutputStream.
*
* @param out the DerOutputStream to write the extension to.
* @exception IOException on encoding errors.
*/
}
/**
* Return an enumeration of names of attributes existing within this
* attribute.
*/
}
}
}