Examples of ContentInfo


Examples of codec.pkcs7.ContentInfo

     * @param safe
     *                the SafeContents to be added to the AuthenticatedSafe
     */
    public void addSafeContents(SafeContents safe) throws IOException,
      ASN1Exception {
  ContentInfo cinfo = makeData(safe);
  add(cinfo);
    }
View Full Code Here

Examples of com.jada.content.data.ContentInfo

 
  public PageHeaderInfo getPageContentInfo() throws Exception {
    PageHeaderInfo pageHeaderInfo = new PageHeaderInfo();
    String contentNaturalKey = getContentKey();
    boolean updateStatistics = false;
    ContentInfo contentInfo = api.getContent(contentNaturalKey, updateStatistics);
    if (contentInfo == null) {
      pageHeaderInfo.setPageTitle(siteName + " - " + getLanguageByValue("Page not found"));
          pageHeaderInfo.setMetaKeywords("");
          pageHeaderInfo.setMetaDescription("");
          return pageHeaderInfo;
    }
   
    pageHeaderInfo.setPageTitle(contentInfo.getPageTitle());
    pageHeaderInfo.setMetaKeywords(contentInfo.getMetaKeywords());
    pageHeaderInfo.setMetaDescription(contentInfo.getMetaDescription());

    return pageHeaderInfo;
  }
View Full Code Here

Examples of com.jada.content.data.ContentInfo

     */
    @Deprecated
  public String getPageContentTitle() throws Exception {
    String contentNaturalKey = getContentKey();
    boolean updateStatistics = false;
    ContentInfo contentInfo = api.getContent(contentNaturalKey, updateStatistics);
    return siteName + " - " + contentInfo.getPageTitle();
  }
View Full Code Here

Examples of com.jada.content.data.ContentInfo

  }
 
  public ContentInfo getContent() throws Exception {
    String contentNaturalKey = getContentKey();
    boolean updateStatistics = true;
    ContentInfo contentInfo = api.getContent(contentNaturalKey, updateStatistics);
    return contentInfo;
  }
View Full Code Here

Examples of com.sun.star.ucb.ContentInfo

                }
            }
            // create a folder
            XContent xNewFolder = null;
            log.println("Create new folder "+ folderName);
            ContentInfo contentInfo = new ContentInfo();
            contentInfo.Type = "application/vnd.sun.star.tdoc-folder";
            XContentCreator xContentCreator = (XContentCreator)UnoRuntime.queryInterface(XContentCreator.class, xContent);
            xNewFolder = xContentCreator.createNewContent(contentInfo);
            XCommandProcessor xFolderCommandProcessor = (XCommandProcessor)UnoRuntime.queryInterface(XCommandProcessor.class, xNewFolder);
            log.println("Got the new folder: " + utils.getImplName(xNewFolder));
View Full Code Here

Examples of nu.fw.jeti.plugins.jingle.jingle.media.ContentInfo

        public void startElement(String name, Attributes attr) {
          if (audioInfo != null) {
                result = audioInfo;
            } else {
                // Try to get an Audio content info
                ContentInfo mi = ContentInfo.Audio.fromString(name);
                if (mi != null) {
                    result = new JingleContentInfo.Audio(mi);
                }
            }
        }
View Full Code Here

Examples of org.apache.harmony.security.pkcs7.ContentInfo

            if (encodingsArr[0].equals(encoding)) {
                // generate the object from PkiPath encoded form
                return (X509CertPathImpl) ASN1.decode(in);
            } else {
                // generate the object from PKCS #7 encoded form
                ContentInfo ci = (ContentInfo) ContentInfo.ASN1.decode(in);
                SignedData sd = ci.getSignedData();
                if (sd == null) {
                    throw new CertificateException(
                        Messages.getString("security.160")); //$NON-NLS-1$
                }
                List certs = sd.getCertificates();
                if (certs == null) {
                    // empty chain of certificates
                    certs = new ArrayList();
                }
                List result = new ArrayList();
                for (int i=0; i<certs.size(); i++) {
                    result.add(new X509CertImpl((Certificate) certs.get(i)));
                }
                return new X509CertPathImpl(result, PKCS7, ci.getEncoded());
            }
        } catch (IOException e) {
            throw new CertificateException(Messages.getString("security.15E", //$NON-NLS-1$
                    e.getMessage()));
        }
View Full Code Here

Examples of org.apache.harmony.security.pkcs7.ContentInfo

            if (encodingsArr[0].equals(encoding)) {
                // generate the object from PkiPath encoded form
                return (X509CertPathImpl) ASN1.decode(in);
            } else {
                // generate the object from PKCS #7 encoded form
                ContentInfo ci = (ContentInfo) ContentInfo.ASN1.decode(in);
                SignedData sd = ci.getSignedData();
                if (sd == null) {
                    throw new CertificateException(
                        Messages.getString("security.160")); //$NON-NLS-1$
                }
                List certs = sd.getCertificates();
                if (certs == null) {
                    certs = new ArrayList();
                }
                List result = new ArrayList();
                for (int i=0; i<certs.size(); i++) {
                    result.add(new X509CertImpl((Certificate) certs.get(i)));
                }
                return new X509CertPathImpl(result, PKCS7, ci.getEncoded());
            }
        } catch (IOException e) {
            throw new CertificateException(Messages.getString("security.15E", //$NON-NLS-1$
                    e.getMessage()));
        }
View Full Code Here

Examples of org.apache.harmony.security.pkcs7.ContentInfo

            return getEncoded();
        } else {
            // PKCS7 encoded form
            if (pkcs7Encoding == null) {
                SignedData sd = new SignedData(1, new ArrayList(),
                        new ContentInfo(ContentInfo.DATA, null), certificates,
                        null, new ArrayList());
                ContentInfo ci = new ContentInfo(ContentInfo.SIGNED_DATA, sd);
                pkcs7Encoding = ci.getEncoded();
            }
            byte[] result = new byte[pkiPathEncoding.length];
            System.arraycopy(pkcs7Encoding, 0, result, 0,
                                        pkcs7Encoding.length);
            return result;
View Full Code Here

Examples of org.apache.harmony.security.pkcs7.ContentInfo

                        Messages.getString("security.155")); //$NON-NLS-1$
            }
            // else: check if it is PKCS7
            if (second_asn1_tag == ASN1Constants.TAG_OID) {
                // it is PKCS7 ContentInfo structure, so decode it
                ContentInfo info = (ContentInfo)
                    ((encoding != null)
                        ? ContentInfo.ASN1.decode(encoding)
                        : ContentInfo.ASN1.decode(inStream));
                // retrieve SignedData
                SignedData data = info.getSignedData();
                if (data == null) {
                    throw new CertificateException(
                            Messages.getString("security.154")); //$NON-NLS-1$
                }
                List certs = data.getCertificates();
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.