Examples of DerValue


Examples of sun.security.util.DerValue

     * 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

Examples of sun.security.util.DerValue

         
            /**
             * 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

Examples of sun.security.util.DerValue

        break;
    case MATCH_SUBJECT_KEY_ID:
        byte[] extension = c.getExtensionValue("2.5.29.14");
        if (extension != null) {
      try {
          DerValue derValue = new DerValue(extension);
          DerValue derValue2 = new DerValue(derValue.getOctetString());
          byte[] extVal = derValue2.getOctetString();
         
          if (Arrays.equals(extVal, (byte[]) value)) {
        matchResult.add(c);
          }
      } catch (IOException ex) { }
View Full Code Here

Examples of sun.security.util.DerValue

        break;
    case MATCH_SUBJECT_KEY_ID:
        byte[] extension = c.getExtensionValue("2.5.29.14");
        if (extension != null) {
      try {
          DerValue derValue = new DerValue(extension);
          DerValue derValue2 = new DerValue(derValue.getOctetString());
          byte[] extVal = derValue2.getOctetString();
         
          if (Arrays.equals(extVal, (byte[]) value)) {
        matchResult.add(c);
          }
      } catch (IOException ex) { }
View Full Code Here

Examples of sun.security.util.DerValue

            X509CertificateCredential certcred = (X509CertificateCredential) cred;
            X509Certificate[] certchain = certcred.getX509CertificateChain();
                _logger.log(Level.FINE,"Certchain length = " + certchain.length);
            derval = new DerValue[certchain.length];
            for (int i = 0; i < certchain.length ; i++)
                derval[i] = new DerValue(certchain[i].getEncoded());
            dos.putSequence(derval);
            X509CertificateChainHelper.insert(any, dos.toByteArray());

            /* IdentityToken with CDR encoded certificate chain */
            idtok.certificate_chain(codec.encode_value(any));
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

     * 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

            X509CertificateCredential certcred = (X509CertificateCredential) cred;
            X509Certificate[] certchain = certcred.getX509CertificateChain();
                _logger.log(Level.FINE,"Certchain length = " + certchain.length);
            derval = new DerValue[certchain.length];
            for (int i = 0; i < certchain.length ; i++)
                derval[i] = new DerValue(certchain[i].getEncoded());
            dos.putSequence(derval);
            X509CertificateChainHelper.insert(any, dos.toByteArray());

            /* IdentityToken with CDR encoded certificate chain */
            idtok.certificate_chain(codec.encode_value(any));
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.