Package org.jboss.seam.security.external.jaxb.xmldsig

Examples of org.jboss.seam.security.external.jaxb.xmldsig.X509DataType


    private void setPublicKey(List<KeyDescriptorType> keyDescriptors) {
        for (KeyDescriptorType keyDescriptor : keyDescriptors) {
            if (keyDescriptor.getUse().equals(KeyTypes.SIGNING)) {
                for (Object content : keyDescriptor.getKeyInfo().getContent()) {
                    if (content instanceof JAXBElement<?> && ((JAXBElement<?>) content).getValue() instanceof X509DataType) {
                        X509DataType X509Data = (X509DataType) ((JAXBElement<?>) content).getValue();
                        for (Object object : X509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName()) {
                            if (object instanceof JAXBElement<?>) {
                                JAXBElement<?> el = (JAXBElement<?>) object;
                                if (el.getName().getLocalPart().equals("X509Certificate")) {
                                    byte[] certificate = (byte[]) el.getValue();
                                    try {
View Full Code Here


            X509Certificate = signatureFactory.createX509DataTypeX509Certificate(certificate.getEncoded());
        } catch (CertificateEncodingException e) {
            throw new RuntimeException(e);
        }

        X509DataType X509Data = signatureFactory.createX509DataType();
        X509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(X509Certificate);

        KeyInfoType keyInfo = signatureFactory.createKeyInfoType();
        keyInfo.getContent().add(signatureFactory.createX509Data(X509Data));

        KeyDescriptorType keyDescriptor = metaDataFactory.createKeyDescriptorType();
View Full Code Here

         {
            for (Object content : keyDescriptor.getKeyInfo().getContent())
            {
               if (content instanceof JAXBElement<?> && ((JAXBElement<?>) content).getValue() instanceof X509DataType)
               {
                  X509DataType X509Data = (X509DataType) ((JAXBElement<?>) content).getValue();
                  for (Object object : X509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName())
                  {
                     if (object instanceof JAXBElement<?>)
                     {
                        JAXBElement<?> el = (JAXBElement<?>) object;
                        if (el.getName().getLocalPart().equals("X509Certificate"))
View Full Code Here

      catch (CertificateEncodingException e)
      {
         throw new RuntimeException(e);
      }

      X509DataType X509Data = signatureFactory.createX509DataType();
      X509Data.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(X509Certificate);

      KeyInfoType keyInfo = signatureFactory.createKeyInfoType();
      keyInfo.getContent().add(signatureFactory.createX509Data(X509Data));

      KeyDescriptorType keyDescriptor = metaDataFactory.createKeyDescriptorType();
View Full Code Here

TOP

Related Classes of org.jboss.seam.security.external.jaxb.xmldsig.X509DataType

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.