Package sun.security.util

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


            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

        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

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

    }

    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

     * 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

      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

  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

     * valid and parsable policy qualifier
     */
    public PolicyQualifierInfo(byte[] encoded) throws IOException {
  mEncoded = (byte[]) 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

         
            /**
             * Use sun.security.util.DerValue if it is present.
             */
            try {             
                DerValue dervalue = new DerValue(derEncodedValue);
                if (dervalue == null) {
                    throw new XMLSecurityException("certificate.noSki.null");
                }
                if (dervalue.tag != DerValue.tag_OctetString) {
                    throw new XMLSecurityException
      ("certificate.noSki.notOctetString");
                }
                extensionValue = dervalue.getOctetString();             
            } catch (NoClassDefFoundError e) {}
         
            /**
             * Fall back to org.bouncycastle.asn1.DERInputStream
             */
View Full Code Here

TOP

Related Classes of sun.security.util.DerValue

Copyright © 2018 www.massapicom. 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.