0N/A/*
2362N/A * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage sun.security.x509;
0N/A
0N/Aimport java.io.IOException;
0N/Aimport java.io.OutputStream;
0N/Aimport java.math.BigInteger;
0N/Aimport java.util.Enumeration;
0N/Aimport java.util.List;
0N/A
0N/Aimport sun.security.util.*;
0N/A
0N/A/**
0N/A * Represents the Freshest CRL Extension.
0N/A *
0N/A * <p>
0N/A * The extension identifies how delta CRL information for a
0N/A * complete CRL is obtained.
0N/A *
0N/A * <p>
0N/A * The extension is defined in Section 5.2.6 of
0N/A * <a href="http://www.ietf.org/rfc/rfc3280.txt">Internet X.509 PKI Certific
0N/Aate and Certificate Revocation List (CRL) Profile</a>.
0N/A *
0N/A * <p>
0N/A * Its ASN.1 definition is as follows:
0N/A * <pre>
0N/A * id-ce-freshestCRL OBJECT IDENTIFIER ::= { id-ce 46 }
0N/A *
0N/A * FreshestCRL ::= CRLDistributionPoints
0N/A * </pre>
0N/A *
0N/A * @since 1.6
0N/A */
0N/Apublic class FreshestCRLExtension extends CRLDistributionPointsExtension {
0N/A
0N/A /**
0N/A * Attribute name.
0N/A */
0N/A public static final String NAME = "FreshestCRL";
0N/A
0N/A /**
0N/A * Creates a freshest CRL extension.
0N/A * The criticality is set to false.
0N/A *
0N/A * @param distributionPoints the list of delta CRL distribution points.
0N/A */
0N/A public FreshestCRLExtension(List<DistributionPoint> distributionPoints)
0N/A throws IOException {
0N/A
0N/A super(PKIXExtensions.FreshestCRL_Id, false, distributionPoints, NAME);
0N/A }
0N/A
0N/A /**
0N/A * Creates the extension from the passed DER encoded value of the same.
0N/A *
0N/A * @param critical true if the extension is to be treated as critical.
0N/A * @param value an array of DER encoded bytes of the actual value.
0N/A * @exception IOException on decoding error.
0N/A */
0N/A public FreshestCRLExtension(Boolean critical, Object value)
0N/A throws IOException {
0N/A super(PKIXExtensions.FreshestCRL_Id, critical.booleanValue(), value,
0N/A NAME);
0N/A }
0N/A
0N/A /**
0N/A * Writes the extension to the DerOutputStream.
0N/A *
0N/A * @param out the DerOutputStream to write the extension to.
0N/A * @exception IOException on encoding errors.
0N/A */
0N/A public void encode(OutputStream out) throws IOException {
0N/A super.encode(out, PKIXExtensions.FreshestCRL_Id, false);
0N/A }
0N/A}