Java Code Examples for sun.security.util.DerValue#getInteger()

The following examples show how to use sun.security.util.DerValue#getInteger() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InhibitAnyPolicyExtension.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 2
Source File: InhibitAnyPolicyExtension.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 3
Source File: InhibitAnyPolicyExtension.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 4
Source File: InhibitAnyPolicyExtension.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 5
Source File: InhibitAnyPolicyExtension.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 6
Source File: InhibitAnyPolicyExtension.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 7
Source File: InhibitAnyPolicyExtension.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 8
Source File: InhibitAnyPolicyExtension.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 9
Source File: InhibitAnyPolicyExtension.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 10
Source File: InhibitAnyPolicyExtension.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 11
Source File: InhibitAnyPolicyExtension.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 12
Source File: InhibitAnyPolicyExtension.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 13
Source File: InhibitAnyPolicyExtension.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 14
Source File: InhibitAnyPolicyExtension.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}
 
Example 15
Source File: InhibitAnyPolicyExtension.java    From j2objc with Apache License 2.0 5 votes vote down vote up
/**
 * Create the extension from the passed DER encoded value of the same.
 *
 * @param critical criticality flag to use.  Must be true for this
 *                 extension.
 * @param value a byte array holding the DER-encoded extension value.
 * @exception ClassCastException if value is not an array of bytes
 * @exception IOException on error.
 */
public InhibitAnyPolicyExtension(Boolean critical, Object value)
    throws IOException {

    this.extensionId = PKIXExtensions.InhibitAnyPolicy_Id;

    if (!critical.booleanValue())
        throw new IOException("Criticality cannot be false for " +
                              "InhibitAnyPolicy");
    this.critical = critical.booleanValue();

    this.extensionValue = (byte[]) value;
    DerValue val = new DerValue(this.extensionValue);
    if (val.tag != DerValue.tag_Integer)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "data not integer");

    if (val.data == null)
        throw new IOException("Invalid encoding of InhibitAnyPolicy: "
                              + "null data");
    int skipCertsValue = val.getInteger();
    if (skipCertsValue < -1)
        throw new IOException("Invalid value for skipCerts");
    if (skipCertsValue == -1) {
        this.skipCerts = Integer.MAX_VALUE;
    } else {
        this.skipCerts = skipCertsValue;
    }
}