Examples of DerValue


Examples of sun.security.util.DerValue

     * @exception GSSException may be thrown when the DER encoding does not
     *     follow the prescribed format.
     */
    public Oid(byte [] data) throws GSSException {
        try {
            DerValue derVal = new DerValue(data);
            derEncoding = derVal.toByteArray();
            oid = derVal.getOID();
        } catch (IOException e) {
            throw new GSSException(GSSException.FAILURE,
                          "Improperly formatted ASN.1 DER encoding for Oid");
        }
    }
View Full Code Here

Examples of sun.security.util.DerValue

    }

    private void readObject(ObjectInputStream ois)
                throws IOException, ClassNotFoundException {
        try {
            EncryptionKey encKey = new EncryptionKey(new
                                     DerValue((byte[])ois.readObject()));
            keyType = encKey.getEType();
            keyBytes = encKey.getBytes();
        } catch (Asn1Exception ae) {
            throw new IOException(ae.getMessage());
View Full Code Here

Examples of sun.security.util.DerValue

        if (key == null) {
            subjectPublicKey = null;
            subjectPublicKeyBytes = null;
        } else {
            subjectPublicKeyBytes = key.clone();
            subjectPublicKey = X509Key.parse(new DerValue(subjectPublicKeyBytes));
        }
    }
View Full Code Here

Examples of sun.security.util.DerValue

            if (debug != null) {
                debug.println("X509CertSelector.makeGeneralNameInterface() "
                    + "result: " + result.toString());
            }
        } else if (name instanceof byte[]) {
            DerValue val = new DerValue((byte[]) name);
            if (debug != null) {
                debug.println
                    ("X509CertSelector.makeGeneralNameInterface() is byte[]");
            }
View Full Code Here

Examples of sun.security.util.DerValue

        if (subjectPublicKeyAlgID == null) {
            return true;
        }
        try {
            byte[] encodedKey = xcert.getPublicKey().getEncoded();
            DerValue val = new DerValue(encodedKey);
            if (val.tag != DerValue.tag_Sequence) {
                throw new IOException("invalid key format");
            }

            AlgorithmId algID = AlgorithmId.parse(val.data.getDerValue());
View Full Code Here

Examples of sun.security.util.DerValue

  if (key == null) {
      subjectPublicKey = null;
      subjectPublicKeyBytes = null;
  } else {
      subjectPublicKeyBytes = (byte[])key.clone();
      subjectPublicKey = X509Key.parse(new DerValue(subjectPublicKeyBytes));
  }
    }
View Full Code Here

Examples of sun.security.util.DerValue

    }

    private void readObject(ObjectInputStream ois)
    throws IOException, ClassNotFoundException {
  try {
      EncryptionKey encKey = new EncryptionKey(new
             DerValue((byte[])ois.readObject()));
      keyType = encKey.getEType();
      keyBytes = encKey.getBytes();
  } catch (Asn1Exception ae) {
      throw new IOException(ae.getMessage());
View Full Code Here

Examples of sun.security.util.DerValue

     * valid and parsable policy qualifier
     */
    public PolicyQualifierInfo(byte[] encoded) throws IOException {
        mEncoded = encoded.clone();

        DerValue val = new DerValue(mEncoded);
        if (val.tag != DerValue.tag_Sequence)
            throw new IOException("Invalid encoding for PolicyQualifierInfo");

        mId = (val.data.getDerValue()).getOID().toString();
        byte [] tmp = val.data.toByteArray();
View Full Code Here

Examples of sun.security.util.DerValue

      if (debug != null) {
    debug.println("X509CertSelector.makeGeneralNameInterface() "
        + "result: " + result.toString());
      }
  } else if (name instanceof byte[]) {
      DerValue val = new DerValue((byte[]) name);
      if (debug != null) {
    debug.println
        ("X509CertSelector.makeGeneralNameInterface() is byte[]");
      }
   
View Full Code Here

Examples of sun.security.util.DerValue

  if (subjectPublicKeyAlgID == null) {
      return true;
  }
  try {
      byte[] encodedKey = xcert.getPublicKey().getEncoded();
      DerValue val = new DerValue(encodedKey);
      if (val.tag != DerValue.tag_Sequence) {
    throw new IOException("invalid key format");
      }
 
      AlgorithmId algID = AlgorithmId.parse(val.data.getDerValue());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.