Problem resizing Viewport with WebDeveloper in WinXP and Vista

I'm having a problem resizing the Viewport with WebDeveloper running in FF10 & FF11 on my WinXP and Vista machines. Quite simply, I'm trying to resize the Viewport to 320x420pixels (to represent an iPhone) but can't get it to go below 510px.
There's no problem in FF1 on Win7. I have contacted Chris Pederick, the developer of WebDeveloper, and he says his code is tha same in all cases, and pretty basic JS. So possibly the fault lies in the browser. I've not noticed this problem in earlier versions of FF (i.e around 3.5)

Try to hide all toolbars or open a second window and hide them there to see if that allows to make the window smaller.

Similar Messages

  • I have the new iPad3 with Verizon.  I am constantly having problems trying to connect to 3G.  I had no problems like this with my older iPad and AT

    I have the new iPad3 with Verizon.  I am constantly having problems trying to connect to 3G.  I had no problems like this with my older iPad and AT&T as the carrier.  In fact, I find that if I cannot connect via Verizon, I can pick up my original iPad and connect right away !  Anyone else having this problem?

    I fixed the problem. Sorry apple for wondering if it was on your end.
    These are what helped me:
    http://productforums.google.com/forum/#!category-topic/youtube/safari/CPW7r7OY5C o
    http://mitchribar.com/2013/02/time-warner-cable-*****-for-youtube-twitchtv/
    The solution worked instantly and my youtube plays super fast in hd just like verizons T.V. adds say they do. Now, that is. 

  • Problem opening files with Mac OS Mavericks and Elements

    I have recently installed Mac OS 10.9.x Mavericks.  Since this I have had problems opening files in Elements 11.  I upgraded to Elements 12, blindly hoping the problem would fix itself, however it hasn't.   When I try to open a file the Finder window pops up then disappears immediately.  Occasionally it will stay open until I scroll down but then closes.   I keep the files on an external drive but the drive is working with all other applications, so I don't think it is that.  If anyone has had a similar problem and has any ideas I would be grateful as the program is unusable for now.  Thanks very much in anticipation

    Hi Sjmitc, I followed Barbara's instructions about only about 24 hours ago and since then my files have been opening perfectly.  I tried it again before replying to you and they are still opening fine.
    I did have to go through my files a couple of times to find all the Elements preferences, but the solution is working fine so far.  I will let you know if I have any further problems.  It is maddening when it happens, so I hope you can fix yours.
    Best of Luck 
    Date: Wed, 6 Nov 2013 18:23:28 -0800
    From: [email protected]
    To: [email protected]
    Subject: Problem opening files with Mac OS Mavericks and Elements
        Re: Problem opening files with Mac OS Mavericks and Elements
        created by sjmitc in Photoshop Elements - View the full discussion
    Henwen, Is this solution still working for you? I tried this same solution on mine a few days ago and had no luck. However, it actually let me open files this afternoon then when I went back in later today, it was doing the disappearing act again.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5821793#5821793
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5821793#5821793
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5821793#5821793. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Photoshop Elements at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Adobe Flash Player 10 Fix for WinXP and Vista, IE7, IE8, Firefox, ect.(New Fast Fix)

    (This is a possible solution for most users) I have found that inside the folder C:\WINDOWS\system32\Macromed\Flash (WinXP Home/Pro) (Computer > C: Drive > Windows > System32 > Macromed > Flash for Vista) there should be a file named FlashUtil10b.exe (IF NOT YOU SHOULD UPDATE AS SPECIFIED!) (or FlashUtil10a.exe or for older versions something similar depending on your version), which is the update utility for flash player. Click on this and if it updates, you will have to restart your computer. This should fix any missing files, and update you to the latest version.
    On a side note to all those who read this, I downloaded and installed 5 different times, the same version, from different websites, all for the "new" flash version, and they didn't work (this also included trying to update Shockwave player itself). Apparently, going directly to the website and downloading a new version of Adobe Flash Player, and installing, doesn't uninstall the older version, (though it says it does nor does the uninstaller work directly from the website) nor fixes the problem. I assume they are aware of this problem, because they included this bug fix in revision 10b. This fix should work for those of you whom cannot view/see flash images as well. There also appears to be a bug/reference problem with the installation of IE8 giving the error "Missing Shockwave Decompression XTRA", when trying to play a Shockwave/Flash file, which seems also to affect Firefox and other browsers. It doesn't recognize that the folder or files that it needs in it, exist. I never had his problem before, until IE8 was installed. I checked which version I had in the system32 folder and found this updater built in to Adobe. Version 10a does NOT automatically update, but version 10b includes this fix. I currently had version 10a when I received this error, and began digging for a solution. Doing the update as described above fixed the problem, and updated it to version 10b.
    The new flash version 10b has some new features, such as volume control, auto-updating, and several rendering options for those who may have a faster or slower computer/video card.
    I found this works great for XP users but unsure of the Vista users. The process is the same  for Vista and the update should still work the same, as long as you run it as Administrator, I assume. I have this also posted on wwwdslreports.com at http://www.dslreports.com/forum/r22115254-IE-IE8-and-Adobe-Flash-Question and here http://www.dslreports.com/forum/r22361930-Adobe-Flash-Player-10-Fix-for-WinXP-IE 8-Firefox-ect. It appears to work for everyone so far. I have not heard of any problems from users with this problem running the RC (Release Canidate) for Windows 7 yet.
    I hope this works to your benefit.
    Please leave a reply to help Adobe and other users know if this fix worked for you or not. If not, please explain what you did, and the effects your seeing, including operating system, site of the flash file trying to view, browser type (ex. IE6, IE7, IE8, Firefox, Opera, ect.), and I will try to help you as best I can.
    (I would strongly recommend those not using IE8, or Firefox 3.5, get the updated versions)
    If your looking for uninstallers go to this site: http://kb2.adobe.com/cps/141/tn_14157.html
    If your looking for a true full install, you can download this developer version for Windows and Mac: http://download.macromedia.com/pub/flashplayer/updaters/10/flash_player_update2_flash10.zi p (44MB) (If you download this, I would recommend you still follow my instructions for the Flash Utility before restarting your computer.)

    I would recommend all users having problems try the above solution first.
    I have posted this on a couple of websites, and so far it has fixed everyones problems.
    Firefox 3.5 Beta 4 has Adobe Flash Player coding built into the browser so that it not only loads faster but works better.
    You still need to have the Adobe ActiveX plug-in and Adobe Flash Player for both browsers.
    I would also recommend you download Shockwave Player 11.
    IE8 has tried this as well, but it still has a couple bugs in it.
    If you have IE8 or FireFox 3.5 Beta 4, and you are still having problems, then I recommend that you go to www.windowsupdate.com and get all of the latest updates (including SP3), then try this fix again.
    Your auto-updater built into windows (If you even have it on) doesn't always pull down every update available for your computer. It only pulls down the manditory ones.
    Sometimes you HAVE to go to the website and manually get them yourself. I recommend when you go to the website, you click on custom install and pick every last one of them to install, which includes, hardware and software fixes for your computer.
    What a lot of people don't know is that when you have installed and tried all of the recommended fixes that Adobe gives you, and it still doesn't work, is that you are having registry conflicts within your Operating System (OS ex. WinXP, Vista, Linux, ect.), and that it is not the Adobe software at all.
    Those are usually repaired by making sure your computer stays up to date.
    The fact is the computer world is changing so rapidly that everyone can't keep up. You have to check for updates weekly.
    If you fall behind on those updates, then you start having problems with your computer and/or software.
    One problem then can turn into many and people get frustrated when something all the sudden just quits working.
    Take a day or two at least once a month, and make sure you update and maintain your computer.
    This includes disk defragmenting, disk cleanup, and making sure you have all the lastest updates.
    You can get to Disk Defrag, and Disk Cleanup by going to Start, All Programs, Accessories, then to System Tools.
    I would do Disk Cleanup first, then Defrag.
    I hope you take this advise into consideration, and that it is very helpful for you.
    If you find this useful, please come back and reply to this forum, and let everyone know so that others will be encouraged to do this.
    Thanks and goodluck, from another user like you.

  • Adobe Reader 9.3 PDF's freeze/hang with IE 8 Browser and Vista:  Solution Provided

    I have been using Internet Explorer 8 well for some time but I am now having repeated difficulty with Adobe Reader 9.3 because PDF's continually freeze or hang up while I am in the browser -- forcing me to close the browser completely.
    Incidentally, Resetting IE 8 to its Default settings did not help to prevent the browser from still freezing while trying to read PDF's.
    The only way I solved this problem is to uninstall Adobe Reader 9.3 completely, Restart the computer, and then install Adobe Reader 8.2.0 .  Now, I have absolutely no difficulty with PDF's freezing or hanging up.  
    Adobe has simply to debug Reader 9.3 in order to make it more compatible with IE 8 and Vista.....

    What I would try if I were in your situation
    uninstall your current Adobe Reader;
    reboot Windows to make sure that all components are removed;
    download this installer http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.3/enu/AdbeRdr930_en_US.msi (save to disk);
    close all browser windows, then run the downloaded installer.
    If the problem reoccurs, and if no-one else in this forum has any better advice, then maybe you should try an alternate PDF reader such as Foxit Reader.  (But make sure that you don't install the bundled toolbar!)

  • Using an Osprey 100 card with Acrobat Connect Pro and Vista

    Intrigued by a comment I saw on another forum, I tried setting each of the EXE files associated with an Osprey 100 card install in Vista to run in compatability mode for XP SP2, and my Osprey card analog inputs started working (at LAST!!) with Acrobat Connect Pro in Vista. This lets me attach VCRs/DVDs or any device with analog outputs to Acrobat Connect Pro without having to buy a new generation of Osprey or other Vista compatible analog capture cards.
    Perhaps this will help someone.

    I believe I figured it was somewhere between Flash 5 and Flash 6. I say this because while the resulting presentations could be opened in QuickTime (which only uses Flash 5) a better result would be achieved by viewing in the browser. Either that, or QuickTime's Flash 5 support isn't complete.

  • WinXP and Vista memory usage with Illustrator CS2 - is Vista winning?

    Dear forum.
    I have an AI-template file where I insert some very large PNG files into it, modifies the template a bit and then I print the the resulting document in PS-format. The PNG files may be as large as 100 MB (24-bits, approx. 100 mil. pixels in total). It appears that while a Vista-based machine has no problem loading one or even two copies of these huge files into memory, a WinXP-based machine can't even load a single file into memory. Instead, I a dialog box with the message: "Could not read the file because the plug-in could not understand this file". Is it really a faulty plug-in or is it just CS2's way of saying "not enough memory" in a quirky way?
    All in all, I would like to hear whether someone has the same experience with Vista, ie. it seems to be better at memory management or better at allocating memory for Illustrator CS2, enabling it to load large PNG files.
    The specifications of the WinXP-based machine:
    Pentium 4 2.6 GHz
    3 GB RAM
    Virtual memory 4095 MB in a physically separate drive from the OS disk
    All Visual Effects are turned off
    Has Illustrator CS2, Adobe Acrobat 7 and Distiller installed (and a few auxilliary programs)
    The specifications of the Vista-based machine:
    Dell OptiPlex 740SF
    AMD x2 5000 (2.6 GHHz)
    2 GB RAM (667 MHz, 2 x 1 GB)
    250 GB SATA disk
    Windows Vista
    Adobe Creative Suite 2 Standard + Adobe Creative Suite 3
    Thanks!

    Hi, everyone
         I got a new t440p 20ANA00UHH (8GB RAM, win8 64bits) about one week ago. It works really well, but its memory usage  confused me. In Task Manager, the "Performance" option shows memory is 68% (5.4G in use), but "Users" option shows memory usage 66% (1019.5M in use). Is that normal ? I just opened some websites and word files.

  • A problem with my ipod shuffle and vista

    Hello all,
    was wondering if anyone could offer some ideas on this. My flat mate just moved and I was using his mac for my ipod shuffle. I have just bought a Dell with windows vista and have put itunes on it. When I put my ipod in the USB port, vista says it does not recognised it and my ipod does not show up in the source area of itunes. I have tried to reformat it but the recomended program is incompatible with vista (it says only it works for XP).Is there any other way to reformat my ipod for vista? or is there a vista program available somewhere else.
    many thanks Kim

    Hi there.
    I have similar problem with my ipod nano.
    I recently bought a new PC with Vista, and for some strange reason, initially my ipod was recognised as I was able to transfer purchased music from my ipod to my itunes.
    However now, a week or so later, every time I connect my ipod in the dock, it says "USB Device Not Recognised".
    I have tried to restore my ipod software, but it wont let me do that, saying that it has a fault and needs to be replaced!
    I initially thought it might be an ipod problem, but the store say it works fine, and restored (and wiped!) my ipod but it still doesnt work!
    I connected a friend's ipod and the same thing happened.
    So although I can listen to music in my itunes I cannot synchronise my ipod... what am I supposed to do?!
    Its very frustrating... does anyone know the solution please please please!

  • Problem sorting list with virtual layout = false (and also with true)

    Hi,
    I've a problem sorting a list... or better... I've a problem showing the sorted list ;-)
    I've a list of xml item. The list is shown with an item renderer.
    my needs: a button to refresh data and a button to sort data.
    useVirtualLayout = false
    -> refresh works correctly, sort does not affect the view (even if the list is sorted correctly when printed with trace)
    useVirtualLayout = true
    -> sort works correctly, refresh reverse the list each time I press it (even if the list remain the same when printed with trace)
    does any one have an idea?
    thank you!!
    MXML
    <s:List dataProvider="{xmlListCollection}" width="100%" itemRenderer="myRenderer" minHeight="0" id="test" useVirtualLayout="false" >
    <s:layout>
      <s:VerticalLayout clipAndEnableScrolling="true"/>
    </s:layout>
    </s:List>
    XML example
    <unit sortField1="First Floor" sortField2="7">
      <employee>
        <id>3040684</id>
        <name>PIFFARETTI Vasco</name>
        <birthdate>20.05.1983</birthdate>
        <beginDate>2012-02-25 08:55:00</beginDate>
        <endDate>9999-12-31 00:00:00</endDate>
        <annotation/>
      </employee>
    </unit>

    You can tell when the scroll position has changed by handling the propertyChange event coming from the DataGroup:
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   creationComplete="list1.dataGroup.addEventListener('propertyChange', handle)">
        <fx:Script>
            <![CDATA[
                import mx.events.PropertyChangeEvent;
                private function handle(e:PropertyChangeEvent):void {
                    if (e.property == 'verticalScrollPosition'){
                        trace('vsp changed');               
                    if (e.property == 'horizontalScrollPosition'){
                        trace('hsp changed');               
            ]]>
        </fx:Script>
        <s:List id="list1" width="100" height="50">
            <s:layout>
                <s:VerticalLayout />
            </s:layout>
            <s:dataProvider>
                <s:ArrayList>
                    <fx:String>0</fx:String>
                    <fx:String>1</fx:String>
                    <fx:String>2</fx:String>
                    <fx:String>3</fx:String>
                    <fx:String>4</fx:String>
                    <fx:String>5</fx:String>
                    <fx:String>6</fx:String>
                    <fx:String>7</fx:String>
                </s:ArrayList>
            </s:dataProvider>
        </s:List>
    </s:Application>
    You might also want to read and consider voting for http://bugs.adobe.com/jira/browse/SDK-21357

  • Problem using SmartCard with 2 Certificates stored and SunPKCS11

    Hi,
    I'm trying to access one SmartCard token in Java 1.5 using SunPKCS11 provider for crypt, decrypt and digital signature operations.
    I have 2 certificates stored on Token:
    - CertA;
    - CertB.
    There are also 2 PIN:
    - PIN1;
    - PIN2.
    I use:
    - PIN1 for logging into the token;
    - PIN1 for operation involving CertA;
    - PIN2 for operation involving CertB;
    There is no problem to logging into the token using Java and, without any troubles, I can read certificates and key from the
    cryptographic card.
    There is no problem using CertA for all my operation, but every attempt of using Private Key of CertB (for the same operations) returns with an Exception:
    java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_DEVICE_ERROR
    Here there's an extract of my source code.
    public void loginToken() {
    Provider UserProvider = new sun.security.pkcs11.SunPKCS11(C:\\pkcs11.cfg);
    Security.addProvider(UserProvider);
    try {
    KeyStore ks = null;
    X509Certificate UserCert = null;
    PrivateKey UserCertPrivKey = null;
    PublicKey UserCertPubKey = null;
    //PIN
    char PIN1[] = "11111".toCharArray();
    char PIN2[] = "22222".toCharArray();
    //logging into token
    ks = KeyStore.getInstance("PKCS11", UserProvider);
    ks.load(null, PIN1);
    //enumeration alias
    String alias = "";
    Enumeration e = ks.aliases();
    while (e.hasMoreElements()) {
    alias = (String) e.nextElement();
    //Certificate
    UserCert = (X509Certificate) ks.getCertificate(alias);
    //PublicKey
    UserCertPubKey = (PublicKey) ks.getCertificate(alias).getPublicKey();
    if (alias.compareToIgnoreCase("Cert1") == 0) {
         //PrivateKey reference     
    UserCertPrivKey = (PrivateKey) ks.getKey(alias, PIN1);
    } else if (alias.compareToIgnoreCase("Cert2") == 0) {
    //PrivateKey reference
    UserCertPrivKey = (PrivateKey) ks.getKey(alias, PIN2);
    } else {
    System.out.println("ALIAS UNKNOW");
    System.exit(1);
    //Signature Test
    if (!MakeSignature(UserCertPrivKey, UserProvider))
    System.out.println(" *** SIGNATURE OK *** ");
    else
    System.out.println(" *** SIGNATURE KO *** ");
    catch (Exception ex) {
    System.out.println("ERROR: " + ex);
    public boolean MakeSign(PrivateKey PrivKey, Provider p) {
    try {
    //File I/O
    FileInputStream txtfis = new FileInputStream("C:\\Test.txt");
    FileOutputStream sigfos = new FileOutputStream("C:\\Test_Signature.txt");
    //Signature Obj init
    Signature dsa = Signature.getInstance("SHA1withRSA", p.getName());
    dsa.initSign(PrivKey);
    //Update data
    BufferedInputStream bufin = new BufferedInputStream(txtfis);
    byte[] buffer = new byte[1024];
    int len;
    while (bufin.available() != 0) {
    len = bufin.read(buffer);
    dsa.update(buffer, 0, len);
    bufin.close();
    //Make signature
    byte[] realSig = dsa.sign();
    //save signature on file
    sigfos.write(realSig);
    sigfos.close();
    return true;
    catch (Exception ex) {
    System.out.println("ERROR: " + ex);
    return false;
    Any help would be grateful...
    Thanks in advance.
    P.S. Sorry for my English

    This is the same my initial problem.
    I resolved it using IAIK-PKCS#11Wrapper (it is FREE) insted of sun.security.pkcs11.SunPKCS11.
    You can find it here:
    http://jce.iaik.tugraz.at/sic/products/core_crypto_toolkits/pkcs_11_wrapper
    Here an exemple of code.
    The main class:
    import iaik.pkcs.pkcs11.Module;
    import iaik.pkcs.pkcs11.DefaultInitializeArgs;
    import java.util.Hashtable;
    import iaik.pkcs.pkcs11.Token;
    import iaik.pkcs.pkcs11.Slot;
    import iaik.pkcs.pkcs11.Session;
    import iaik.pkcs.pkcs11.objects.RSAPrivateKey;
    import java.util.Vector;
    import iaik.pkcs.pkcs11.objects.PrivateKey;
    import iaik.pkcs.pkcs11.objects.X509PublicKeyCertificate;
    import java.util.Enumeration;
    import iaik.pkcs.pkcs11.objects.Key;
    import java.security.cert.CertificateFactory;
    import java.io.ByteArrayInputStream;
    import iaik.pkcs.pkcs11.Mechanism;
    import java.security.Security;
    import org.bouncycastle.jce.provider.BouncyCastleProvider;
    import java.io.File;
    import java.io.FileInputStream;
    import org.bouncycastle.cms.CMSSignedDataGenerator;
    import org.bouncycastle.cms.CMSProcessableByteArray;
    import java.util.ArrayList;
    import java.security.cert.CertStore;
    import java.security.cert.CollectionCertStoreParameters;
    import org.bouncycastle.cms.CMSSignedData;
    import java.io.FileOutputStream;
    import java.security.cert.X509Certificate;
    import iaik.pkcs.pkcs11.TokenInfo;
    import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
    public class MakeSignature {
      public static void main(String[] args) {
         String USER_PIN = "12345678";
         String DLL_NAME = "C:\\windows\\system32\\dll_P11_name.dll";
         String OBJ_LABEL1 = "CNS0"; //this is the label of my 1th cert
         String OBJ_LABEL2 = "CNS1"; //this is the label of my 2th cert
         String INPUT_FILE = "C:\\Temp\\test.txt";
         String OUTPUT_FILE = "C:\\Temp\\test.p7m";
        try {
           // ********** INITIALIZE PKCS#11 MODULE WITH DEFAULT PARAMETERS **********
          Module pkcs11Module = Module.getInstance(DLL_NAME);
          pkcs11Module.initialize(new DefaultInitializeArgs());
           // ********** SELECT TOKEN **********
          Slot[] slotsWithToken = pkcs11Module.getSlotList(Module.SlotRequirement.TOKEN_PRESENT);
          Token[] tokens = new Token[slotsWithToken.length];
          Hashtable tokenIDtoToken = new Hashtable(tokens.length);
          long tokenID = -1;
          Token tokenUsed = null;
          //enum readers
          for (int i = 0; i < slotsWithToken.length; i++) {
            tokens[i] = slotsWithToken.getToken();
    tokenID = tokens[i].getTokenID();
    tokenIDtoToken.put(new Long(tokenID), tokens[i]);
    System.out.println("Active tokens:");
    System.out.println("Token ID: " + tokenID);
    if (tokens.length == 0) { //No SC found
    System.out.println("No SC presents");
    else {
    System.out.println("Using token: " + tokens[0].getTokenID());
    tokenUsed = tokens[0];
         //Note: if you have more reader and more SC inserted, you have to write
         //here the code for select the right token
         // ********** OPEN SESSION VS THE TOKEN AND IF REQUIRED SUBMIT PIN **********
    TokenInfo tokenInfo = tokenUsed.getTokenInfo();
    Session session = tokenUsed.openSession(Token.SessionType.SERIAL_SESSION, false, null, null);
    if (tokenInfo.isLoginRequired()) {
    session.login(Session.UserType.USER, USER_PIN.toCharArray());
         // ********** SET SEARCH TEMPLATE FOR THE P11 OBJECT **********
    RSAPrivateKey privateSignatureKeyTemplate = new RSAPrivateKey();
    privateSignatureKeyTemplate.getSign().setBooleanValue(Boolean.TRUE);
    privateSignatureKeyTemplate.getLabel().setCharArrayValue(OBJ_LABEL2.toCharArray());
         // ********** SEARCH P11 OBJECT USING TEMPLATE **********
    Vector keyList = new Vector(4);
    session.findObjectsInit(privateSignatureKeyTemplate);
    Object[] matchingKeys;
    while ( (matchingKeys = session.findObjects(1)).length > 0) {
    keyList.addElement(matchingKeys[0]);
    session.findObjectsFinal();
         //Try to find the corresponding certificates for the signature keys
    Hashtable keyToCertificateTable = new Hashtable(4);
    Enumeration keyListEnumeration = keyList.elements();
    while (keyListEnumeration.hasMoreElements()) {
    PrivateKey signatureKey = (PrivateKey) keyListEnumeration.nextElement();
    byte[] keyID = signatureKey.getId().getByteArrayValue();
    X509PublicKeyCertificate certificateTemplate = new X509PublicKeyCertificate();
    certificateTemplate.getId().setByteArrayValue(keyID);
    session.findObjectsInit(certificateTemplate);
    Object[] correspondingCertificates = session.findObjects(1);
    if (correspondingCertificates.length > 0) {
    keyToCertificateTable.put(signatureKey, correspondingCertificates[0]);
    session.findObjectsFinal();
         //There are three cases now: 1 no obj found; 2 found only one obj, 3 found more obj
    Key selectedKey = null;
    X509PublicKeyCertificate correspondingCertificate = null;
    //no object found for template
    if (keyList.size() == 0) {
    System.out.println("No object found for template");
    throw new Exception("No object found for template");
    //Founf only one object
    else if (keyList.size() == 1) {
    selectedKey = (Key) keyList.elementAt(0);
    // create a IAIK JCE certificate from the PKCS11 certificate
              correspondingCertificate = (X509PublicKeyCertificate)keyToCertificateTable.get(selectedKey);
    System.out.println("One object Found");
    //Found more object ... user can select one
    else {
         System.out.println("Many obj found!!!");
    //write here the code for select the right object
         // ********** GET THE OBJECT **********
    RSAPrivateKey signerPriKey = (RSAPrivateKey) selectedKey;
    java.security.cert.CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
    byte[] derEncodedCertificate = correspondingCertificate.getValue().getByteArrayValue();
    //Cast to java.security.cert.X509Certificate
    java.security.cert.X509Certificate signerCert = (java.security.cert.X509Certificate) certificateFactory.
    generateCertificate(new ByteArrayInputStream(derEncodedCertificate));
         // ********** SIGNATURE OPERATION **********
    //Add BouncyCastle as provider
    Security.addProvider(new BouncyCastleProvider());
    //initialize signature operation
    session.signInit(Mechanism.RSA_PKCS, (PrivateKey) signerPriKey);
    //get input data
    File src = new File(INPUT_FILE);
    int sizecontent = ( (int) src.length());
    byte[] contentData = new byte[sizecontent];
    FileInputStream freader = new FileInputStream(src);
    freader.read(contentData, 0, sizecontent);
    freader.close();
         //calculate digest of the input data
    byte[] toEncrypt = buildBits(contentData); //I've already posted the code for this function
    //make signature
    byte[] signature = session.sign(toEncrypt);
         // ********** MAKE P7 WELL FORMAT DOCUMENT **********
    //CMSSignedDataGenerator fact = new CMSSignedDataGenerator();
    Signature2CMSSignedData fact = new Signature2CMSSignedData();
    CMSProcessableByteArray content = new CMSProcessableByteArray(contentData);
    //Creation of BC CertStore
    ArrayList certList = new ArrayList();
    certList.add(signerCert);
    CertStore certs = CertStore.getInstance("Collection", new CollectionCertStoreParameters(certList), "BC");
    //Signature Alg
    String algorithm = CMSSignedDataGenerator.DIGEST_SHA1;
    //add element to P7
    fact.addSignature(signature, signerCert, algorithm);
    fact.addCertificatesAndCRLs(certs);
    //generate enveloped using Bouncycastle provider
         CMSSignedData envdata = fact.generate(PKCSObjectIdentifiers.data.getId(), content, true);
    byte[] enveloped = envdata.getEncoded();
    //Write P7 file
    FileOutputStream efos = new FileOutputStream(OUTPUT_FILE);
    efos.write(enveloped);
    efos.close();
    // ********** END **********
    session.closeSession();
    pkcs11Module.finalize(null);
    catch (Exception ex) {
    ex.printStackTrace();
    }Main class uses buildBits function (already posted in this topic) and Signature2CMSSignedData class.import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import java.security.cert.CertStore;
    import java.security.cert.X509CRL;
    import java.security.cert.X509Certificate;
    import org.bouncycastle.asn1.ASN1EncodableVector;
    import org.bouncycastle.asn1.ASN1InputStream;
    import org.bouncycastle.asn1.ASN1OctetString;
    import org.bouncycastle.asn1.ASN1Sequence;
    import org.bouncycastle.asn1.ASN1Set;
    import org.bouncycastle.asn1.BERConstructedOctetString;
    import org.bouncycastle.asn1.DEREncodable;
    import org.bouncycastle.asn1.DERNull;
    import org.bouncycastle.asn1.DERObject;
    import org.bouncycastle.asn1.DERObjectIdentifier;
    import org.bouncycastle.asn1.DEROctetString;
    import org.bouncycastle.asn1.DERSet;
    import org.bouncycastle.asn1.cms.ContentInfo;
    import org.bouncycastle.asn1.cms.IssuerAndSerialNumber;
    import org.bouncycastle.asn1.cms.SignedData;
    import org.bouncycastle.asn1.cms.SignerIdentifier;
    import org.bouncycastle.asn1.cms.SignerInfo;
    import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
    import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
    import org.bouncycastle.asn1.x509.CertificateList;
    import org.bouncycastle.asn1.x509.TBSCertificateStructure;
    import org.bouncycastle.asn1.x509.X509CertificateStructure;
    import org.bouncycastle.cms.CMSProcessable;
    import org.bouncycastle.cms.CMSSignedData;
    * class for generating a RSA pkcs7-signature message.
    public class Signature2CMSSignedData2 {
    CertStore certStore;
    List certs = new ArrayList();
    List crls = new ArrayList();
    List signerInfs = new ArrayList();
    List signers = new ArrayList();
    public static final String DATA = PKCSObjectIdentifiers.data.getId();
    public static final String ENCRYPTION_RSA = "1.2.840.113549.1.1.1";
    private byte[] signatureData = null;
    private X509Certificate cert = null;
    private String digestOID = null;
    private String encOID = null;
    public Signature2CMSSignedData2() {
    public void addSignature(byte[] signatureData, X509Certificate cert, String digestOID) {
    this.signatureData = signatureData;
    this.cert = cert;
    this.digestOID = digestOID;
    this.encOID = ENCRYPTION_RSA;
    public void addCertificatesAndCRLs(CertStore certStore) throws Exception{
    try {
    Iterator it = certStore.getCertificates(null).iterator();
    while (it.hasNext()) {
    X509Certificate c = (X509Certificate) it.next();
    certs.add(new X509CertificateStructure((ASN1Sequence) makeObj(c.getEncoded())));
    Iterator it2 = certStore.getCRLs(null).iterator();
    while (it2.hasNext()) {
    X509CRL c = (X509CRL) it2.next();
    crls.add(new CertificateList((ASN1Sequence) makeObj(c.getEncoded())));
    catch (Exception e) {
    throw new Exception(e.getMessage());
    private DERObject makeObj(byte[] encoding) throws Exception {
    if (encoding == null) {
    return null;
    ByteArrayInputStream bIn = new ByteArrayInputStream(encoding);
    ASN1InputStream aIn = new ASN1InputStream(bIn);
    return aIn.readObject();
    public CMSSignedData generate(String signedContentType, CMSProcessable content, boolean encapsulate) throws Exception {
    try {
    ASN1EncodableVector digestAlgs = new ASN1EncodableVector();
    ASN1EncodableVector signerInfos = new ASN1EncodableVector();
    DERObjectIdentifier contentTypeOID = new DERObjectIdentifier(signedContentType);
    // add the SignerInfo objects
    Iterator it = signerInfs.iterator();
    AlgorithmIdentifier digAlgId = new AlgorithmIdentifier(new DERObjectIdentifier(digestOID), new DERNull());
    AlgorithmIdentifier encAlgId;
    encAlgId = new AlgorithmIdentifier(new DERObjectIdentifier(encOID), new DERNull());
    digestAlgs.add(digAlgId);
    ASN1Set signedAttr = null;
    ASN1Set unsignedAttr = null;
    ASN1OctetString encDigest = new DEROctetString(signatureData);
    ByteArrayInputStream bIn = new ByteArrayInputStream(cert.getTBSCertificate());
    ASN1InputStream aIn = new ASN1InputStream(bIn);
    TBSCertificateStructure tbs = TBSCertificateStructure.getInstance(aIn.readObject());
    IssuerAndSerialNumber encSid = new IssuerAndSerialNumber(tbs.getIssuer(), tbs.getSerialNumber().getValue());
    signerInfos.add(new SignerInfo(new SignerIdentifier(encSid), digAlgId, signedAttr, encAlgId, encDigest, unsignedAttr));
    ASN1Set certificates = null;
    if (certs.size() != 0) {
    ASN1EncodableVector v = new ASN1EncodableVector();
    it = certs.iterator();
    while (it.hasNext()) {
    v.add( (DEREncodable) it.next());
    certificates = new DERSet(v);
    ASN1Set certrevlist = null;
    if (crls.size() != 0) {
    ASN1EncodableVector v = new ASN1EncodableVector();
    it = crls.iterator();
    while (it.hasNext()) {
    v.add( (DEREncodable) it.next());
    certrevlist = new DERSet(v);
    ContentInfo encInfo;
    if (encapsulate) {
    ByteArrayOutputStream bOut = new ByteArrayOutputStream();
    content.write(bOut);
    ASN1OctetString octs = new BERConstructedOctetString(bOut.toByteArray());
    encInfo = new ContentInfo(contentTypeOID, octs);
    else {
    encInfo = new ContentInfo(contentTypeOID, null);
    SignedData sd = new SignedData(new DERSet(digestAlgs), encInfo, certificates, certrevlist, new DERSet(signerInfos));
    ContentInfo contentInfo = new ContentInfo(PKCSObjectIdentifiers.signedData, sd);
    return new CMSSignedData(content, contentInfo);
    catch (Exception e) {
    throw new Exception(e.getMessage());
    }Bye.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

  • Solution for "Firmware problem" Zen Touch with Media Player 11 and Windows XP

    Hello,?I like to share this information about my troubles with updating my Zen Touch. At first my Media Player would not detect my Zen Touch. As I hoped the update of the firmware would solve my problem I started a firmware update. Unfortunatly it went wrong as a result the Zen unit did not boot anymore an gave a "Firmware problem". Due to this problem I could not reinstall the firmware as Windows XP did not detect my Zen. I was ready to trow the unit out of the window when I found this solution. And it really worked for me. I hope it wil solve your problems too. And many thanks to DG?http://answers.yahoo.com/question/in...6280245AAiPliB?Best Answer - Chosen by Asker
    I had the same problem. You don't have to call Creative. You don't have to spend any money. Here's how I fixed it:
    1. If you have Windows Media Player uninstall it and reboot
    2. Uninstall the WMP Runtime format from add/remove programs ( you may have to check the "show updates" box) and reboot
    3. With the Zen Touch connected, go to Device Manager and uninstall it and then unplug the USB cable.
    4. Uninstall ALL Creative software including the Zen drivers and then Reboot
    5. From Device Manager, uninstall ALL USB root hubs and reboot
    6. Plug in the Zen and wait for windows to detect it. In my case windows showed it as "Creative Zen" and then changed it to "MTP Device."
    7. Run the firmware update again. It should go ahead and update now.
    You can reinstall WMP if you want after this. Be sure to get the latest version from microsoft's website.
    Hope this hel
    ps.

    Thanks for sharing this with us!

  • Problem in syncing with outlook for contacts and calender

    Hello, I bought Q10, I have been trying to syn it to outlook 2013 but it is simply not possible. I visited Blaberry Experts Service Centre in India as well as Dubai and they also could not help me.
    I understand that there is problem with 64 bit process. Is Blackberry doing anything about this problem? I'm sure that the same problem must be faced by many other users. Can anyone is having any solution to this problem?

    I can not offer a solution but I will share that I have found that Outlook 2013 (64 bit) on Windows 8.1 can not be synchronized with my Z10 using Link.  Link only provides the option to sync from the Windows calendar & contacts but not Outlook 2013 (installed version).  I have made numerous inquiries on the forums which largely go unanswered. 
    I bought an application called PC Outlook Sync but it does not work at all. Now trying to get my money back.
    It may well be that Blackberry will only support current and future versions of Outlook that are on Exchange servers and not on individual computers. i have read where there may be some way to employ the online version of Office to synchronize but I am not comfortable with that.  No security at all when one's stuff goes into the cloud.

  • Authorization Problems with iTunes 7.1 and Vista

    I'm running Windows Vista Business edition. Any time I try to play a purchased song, I get prompted that "you've already got 5 computers authorized to play this", but when I check my actual account settings, it says I've only got 3 computers our of 5 authorized (which is correct). I've tried updating to the latest version of iTunes (7.1) and it didn't help. I tried to run the "fix the seurity permissions issue in Vista" application that Apple released and it doesn't even appear to run (gives me the EULA, I hit 'accept' and it just closes the window).
    Iv'e checked all of the standard issues that I've seen bandied about. Yes, I'm using my administrator account (my only account on the machine is my admin acct.). I've tried right clicking and launching it as an admin (just in case..)...no change. Songs that I have purchased since upgrading to Vista work just fine and will play. Anything purchased before the upgrade WILL NOT WORK.
    I'm just kind of frustrated as other people have mentioned as well. I've got many many songs that I cannot listen to at all due to this issue. Plus to be honest, I'm afraid to plug in my iPod to update it. I don't want it to "update" and then all of a sudden I can't even play the songs from the iPod either. If anyone has any ideas, I would really appreciate it as it is getting a bit tiring.
    Thanks in advance.

    Hey there - It sounds like you have songs from more than one account in your library.
    When you try to play a song that needs to be authorized it'll have the account ID that it was purchased with listed in the pop-up window (where you enter your password).
    This is the important part: Make sure that the account ID that the song asks you for is the ID that you login to the iTunes store with when you check how many authorizations you have left.
    Hope this helps!

  • HT5137 Problem; App bought with iTunes gift card and cannot be downloaded.

    Hey there
    I bought an App. Bloons TD 5HD foor iPad 4 Retina. I paid for it with a gift card iTunes. System says, when app is activated, app is bougt and can be downloaded. Again an d again. It can't be activatedd Does anybody know what to do.

    Go to your account on your computer and set the credit card to none. This will allow you to use the gift card.

  • MOVED: Problem with K8N Neo4 Platinum and Vista Ultimate

    This topic has been moved to Vista problems.
    https://forum-en.msi.com/index.php?topic=110040.0

    Set the Maxtor hard drive to be a Sata I instead of Sata II hard drive with a jumper.  Also make certain that the Sata controllers in Integrated Peripherals-IDE Devices Configuration are enabled.

Maybe you are looking for

  • C# Code Example for Configuring SQL 2005 Reporting Services?

    I have found the MSDN articles describing the classes, public methods, etc. for configuring SQL Server 2005 Reporting Services via WMI. I need to initially configure them and just do this: - Report Server Virtual Directory - Windows Service Identity

  • Where is the display filenames option in web gallery export?

    adobe bridge CS4, as i'm understanding this feature went away in later versions. Just trying to export a web gallery that will include the file name beneath of it. I thought the feature was non-existnant so I have spent a couple hunded bucks and abou

  • LTE in vodafone CZ is blocked. Operator have not problem with Samsung. Why?

    Why is LTE VF CZ blocked ?

  • Problem with Jlabel

    Dear All, Please, is anybody could advise what's wrong with the following code? loading.setText("loading..."); loading.setVisible(true); launchProc(fields_array,cp, conn_string, username_, password_); loading.setText("completed.");the loading JLabel

  • Cannot view message on first click

    Sometimes when I click on a new message in Mail it will get selected but the message contents will not show up in the preview pane. To get around the problem, I have to click on another message and then click back to it. This is a regular occurrence