exception on verfiying PIN

I used this function for checking the PIN code. But today I'm trying to merge the two applets to finish my work. Check the PIN started cause problem.
/*****************************************************************/
     private void verify(APDU apdu) 
     {
          byte[] buffer = null;
          byte byteRead = 0;
          try
          {
          buffer = apdu.getBuffer();
          
          // receive the PIN data for validation.
          byteRead = (byte)(apdu.setIncomingAndReceive());
 
          // check pin
          // the PIN data is read into the APDU buffer
          // starting at the offset ISO7816.OFFSET_CDATA
          // the PIN data length = byteRead
          if (pin.check(buffer, ISO7816.OFFSET_CDATA,byteRead) == false)
               ISOException.throwIt(SW_VERIFICATION_FAILED);
          }
          catch( Exception exception)
          {
               ISOException.throwIt(byteRead);
          }
          
     } // end of verify method
/*****************************************************************/
cm>  /send A006000005010203040500
 => A0 06 00 00 05 01 02 03 04 05 00                   ...........
 (670992 nsec)
 <= 6F 00                                              o.
Status: No precise diagnosis
When I put
byteRead = (byte)(apdu.setIncomingAndReceive());
outside the try exception unhandled it means
the problem is with this statement. so please tell me what is the problem here?
and start again his value that he gives
0x0000
. This means that incoming data have a problem.
on call
ISOException.throwIt(exception.getReason());
the resutl is
cm>  /send A006000005010203040500
 => A0 06 00 00 05 01 02 03 04 05 00                   ...........
 (454950 nsec)
 <= 00 01                                              ..
Status: 0x0001
Published by: Muhammad Umer on April 18, 2011 17:55

Just to let you know it's because you're allowed to call setIncomingAndReceive() time in an APDU to indicate you read data. A card works in half-duplex mode, then you will need to indicate whether you are reading or writing :)

The doc of the APDU API covers this.

See you soon,.
Shane

Tags: Java

Similar Questions

  • Tabs, windows and lost after updating to Firefox and page seems gross

    I don't think that you have respect for those who use Firefox. Do you understand how many of us work for the House and need this platform to work for our COMPANY? I think you play games with users, at our expense.

    So furious that I must try to solve your problems when I have to work. Last night you gave me a message to try to refresh. You said that everything would be saved.

    I TRUSTED YOU. Available on the page at the top has been terrible, and I don't know where my addons went. Still, it seems impractical. but at least my tabs were all there.

    Today, you have LOST ALL MY TABS except the ones pinned. All the windows gone, too. I copied the sqlt places of my old Firefox Desktop data to the new folder AppData profile several times. Never worked. FF just kept coming back to show me the pinned tabs.

    Really, you evaluate these things first? I want to completely delete this useless refresh and come back when things worked.
    WPA

    Please, take a deep breath. Now:

    There is no way one click to cancel a refresh, but here is a procedure to return to your prior to refresh the data. It takes 5 minutes, but it's perhaps faster than the recovery of individual files and load those into your new profile.

    Check in the folder 'Old data Firefox' update adds a folder with a random semi name on your desktop. If there is only one, that probably has your old settings and Add-ons. If there is more than one, you'll want to work with one who has been updated recently.

    Once you have identified the profile folder, that you want to restore, here is my "old profile resurrection suggested procedure:

    Overview

    Here are the steps described in more detail below:

    1. Create a new Firefox profile
    2. Delete all of this profile folder
    3. Copy in all of the old profile folder

    Create a new profile for Firefox (Windows)

    Exit Firefox completely and start up in the Profile Manager by pasting the following text in the search box of the start menu, or the start > Run dialog box and pressing ENTER:

    firefox.exe -P
    

    Note: any time want to switch profiles, exit Firefox and return to this dialog box.

    Click on the button create a profile, give it a name like OldSettings and skip the option to change the location of the folder. Select the new profile from the dialog box, and then start Firefox.

    Open the new profile folder in Windows Explorer

    Firefox in the new profile should look like a new installation of the plant. Open the troubleshooting information page by using either:

    • button "3-bar" menu > "?" button > troubleshooting information
    • Menu help > troubleshooting information
    • type or paste everything: in the address bar and press Enter

    In the first table, click on the view file"" button. Firefox will launch your new profile folder in Windows Explorer.

    This folder open, switch back to Firefox and get out by using either:

    • "3-bar" menu button > button "power".
    • (menu bar) File > Exit

    Firefox is closed, the profile folder must be front and Center, or you can activate it by using the taskbar.

    Copy old data instead of new

    In this new profile folder you just popped open - NOT the one on your desktop - select all content (you can use Ctrl + a) and delete (you can press Delete on the keyboard).

    Leave this window open, open or switch to your folder of old data of Firefox. Consult your old profile folder. At this level, you should see a folder named bookmarkbackups among other things.

    Select all (Ctrl + a) and copy (or right-click > copy or Ctrl + c).

    Switch to the empty profile folder in another window and paste (or right-click > paste or Ctrl + v). This may take a few minutes because some files are large.

    Launch Firefox

    Firefox should start in this 'new' profile with the old resurrected profile data. Success?

  • Output 5V digital while gaining some HAVE

    Hello fans of LV,.

    I am confronted with (what I thought would be) a trivial task:

    I'm certain analog signals on a 6351 OR USB using DAQmx.  And I want to trigger an external device simultaneously.  So I want to start my task of AI, a digital to go HIGH output pin.  And when it stops, I want the PIN to go DOWNSTAIRS.

    I think actually that NEITHER provided an '' integrated '' signal for this... something I could easily move to one of the PFI PIN.  As a "HAVE busy signal."  But it does not appear that this exists.

    So instead, I thought I could do a task "HAVE simultaneous and DO."  It works well, except that the PIN HIGH when rest end tasks.

    Any ideas on how I can fix this?

    josborne wrote:

    Hmmm.  I don't think that the sample clock won't work because it is a pulse train.  It goes UP and DOWN for each point of the data acquired.  Actually, I want the signal stay high during the acquisition of all.

    I think you're right about using a PIN.  But I am confused how to implement in LabVIEW.

    I think I misunderstood what you mean by an acquisition, then.  I thought you meant just a single point.  Are say you that you will acquire a fixed number of samples and you need relaxation to remain high until there finishes the entire points series?

    As I said, I'm not an expert in routing of the signal, so there is probably a more efficient way to do this, but the simplest, you could take a signal from a digital output pin and split with one end going to the external device and the other end to the input trigger to HAVE it (probably that in software, but I don't know if you can split the signal in this case).  Configure separate tasks and the AI, no need to synchronize them.  When you start to DO it, the AI will trigger.  Then you just need to somehow disable DO when HAVE complete - but went too urgent?  If you do not need a precise timing for this purpose then just wait for the AI to finish, then turns off the DO.

  • Address pins security exception

    Hello

    I work on the DoorProject and get a security exception when you attempt to start the class GPIOLED:

    [CRITICAL] [SECURITY] iso = 3:Permission check failed: jdk.dio.DeviceMgmtPermission "GPIO24:24" 'open '.

    TRACK: java.security.AccessControlException: >, lanceApp generated an Exception

    java.security.AccessControlException:

    -com/oracle/meep/security/AccessControllerInternal.checkPermission (), bci = 128

    -java/security/AccessController.checkPermission (), bci = 1

    -jdk/dio/DeviceManager.open (), bci = 187

    -jdk/dio/DeviceManager.open (), bci = 3

    -jdk/dio/DeviceManager.open (), bci = 4

    -doorproject/GPIOLED.start(GPIOLED.java:43)

    -doorproject/DoorSensor.start(DoorSensor.java:39)

    -doorproject/DoorProject.startApp(DoorProject.java:24)

    -javax/microedition/midlet/MIDletTunnelImpl.callStartApp (), bci = 1

    -com/sun/midp/midlet/MIDletPeer.startApp (), bci = 5

    -com/sun/midp/midlet/MIDletStateHandler.startSuite (), bci = 264

    -com/sun/midp/main/AbstractMIDletSuiteLoader.startSuite (), bci = 38

    -com/sun/midp/main/CldcMIDletSuiteLoader.startSuite (), bci = 5

    -com/sun/midp/main/AbstractMIDletSuiteLoader.runMIDletSuite (), bci = 132

    -com/sun/midp/main/AppIsolateMIDletSuiteLoader.main (), bci = 26

    I've updated my project with the appropriate security permissions.  Here is my JAD file:

    MIDlet-1: DoorProject, doorproject. DoorProject

    MIDlet-Jar-Size: 16893

    MIDlet-Jar-URL: DoorProject.jar

    MIDlet-name: DoorProject

    MIDlet-Permission-1: jdk.dio.DeviceMgmtPermission ' *.» ' * ' 'open '.

    MIDlet-Permission-2: jdk.dio.gpio.GPIOPinPermission ' *.» * »

    3 MIDlet-permission-: jdk.dio.gpio.GPIOPinPermission ' *.» ' ' * 'setdirection '.

    MIDlet-vendor: eshneken

    MIDlet-Version: 1.0

    Microedition-Configuration: CLDC - 1.8

    Microedition-profile: MEEP - 8.0

    In addition, everything works very well with GPIOLEDTest.  What Miss me?

    Thank you

    Ed

    Figured it out.  I had a *. * instead of a *: * in my grants

  • My pinned tabs "app" disappear when I close firefox, I started syncing with another computer. Windows 7 and Windows 8.

    Got a new tablet of Windows 8 non - RT. Put regular firefox desktop. No subway. It synced with my portable firefox, which runs windows 7. Since that time my pinned tabs app do not remain once I close firefox and restart.

    In case you use "clear history of Firefox closing:

    • do not erase browsing history

    Note that compensation "Preferences of Site" clears all exceptions for cookies, images, windows pop up, installation of software and passwords.

  • JumpList to the taskbar is missing in the tabs recently pinned tabs, new tab options etc. How can I restore them?

    Install firefox on a new computer to find all the shortcuts jumplist disappeared except "Mozilla Firefox", "Delete" and "close". New tab, new window, recent and pinned tabs options are all absent. I tried uninstalling and reinstalling, as well by changing the browser.taskbar.lists.tasks.enabled in all: config from true to false and back again, but nothing seems to work.

    22 Firefox beta 4A was the fix. I have not tried myself.

    If you want to try an emergency, you can install the beta from here: http://www.mozilla.org/firefox/beta/

    Otherwise, it will be officially released in a few weeks.

  • I use windows 7. Pinned tabs disappear after a reboot. Privacy for firefox setting will be set to remember history. What could be wrong?

    I rebooted my tabs pin several times. They disappear just to restart. Any help would be appreciated.

    In case you use "clear history of Firefox closing:

    • do not erase browsing history

    Note that compensation "Preferences of Site" clears all exceptions for cookies, images, windows pop up, installation of software and passwords.

    (PIN) App tabs and groups of tabs (Panorama) are stored in session data in the sessionstore.js file in the Firefox profile folder.

    If you use a software like CCleaner cleaning then check the settings in the Firefox application.

  • Pinned tabs open as full tabs to restart Firefox 5.0

    Running Firefox 5.0, I put 4 tabs pinned apps and the other as a regular application. When I restart Firefox, all tabs open as regular tabs. I have Firefox set to open my homepage, and I home page, ready to open all 5 pages. I tried to set Firefox to open the last open pages, but then I got pinned tabs + all tabs 5. I also tried homepage as 1 tablet, but then none of the pinned tabs open. How do I put Firefox 5.0 to open with 4 pinned tabs and open a tab?

    Suggestions for the creation of four app-tabs + a homepage:

    Set up your home page (do not include those that PIN you)
    Tools > Options > general

    Begins when Firefox: view my homepage
    [
    Homepage: subject: empty (or your own page)]
    click on [|] [OK |]

    Reference:

    https://support.Mozilla.com/kb/how%20To%20set%20The%20home%20page

    Pin the four legs you want pinned, if not already done

    When you close Firefox use file > exit (not the X in the upper right corner to close a window).

    To bookmark tabs that PIN you

    I suggest you to bookmark the 4 tabs which must be pinned so you can recall as a group at any time. The fifth tab would be your homepage according to my understanding. You may have to precede the numbers to the name so sorting will not affect the order (or use bookmark separators).

    Time-saving tip

    After the loading of pages to be app-tabs of a bookmark file I use "Multiple Tab Handler" because I have - to select all tabs loaded with the help of the SHIFT key to select the active tab to shift + click tab, then pin them all at once.

    Another tip to use:

    , I want to put a yellow marker as my last app tab tab, then when I'm done with something I click on this tab and with the help of the "Multiple Tab Handler": extension, I choose "close right tabs". The page that I use on the occasion of this line is
    http://dmcritchie.mvps.org/firefox/tab_capacity/toplevel/e.htm

    While I have no difficulty in raising app-tabs from a previous session I like close all my tabs and recreate my app-tabs just to clear the cobwebs and tab history.

    App-tabs are pretty much like ordinary tabs except the tab is protected from the opening of a direct link or bookmark to another site within the app tab - which does not apply to bookmarks with javascript or substitution as they open in the same app - tab.

    App-tabs provide no protection more than normal legs against web pages like this site while composing a response where the typed text is often lost during the composition and to start.

    An article on how to use app-tabs

    http://support.Mozilla.com/kb/what-are-app-tabs

    The potential creation of problems with app tabs

    https://support.Mozilla.com/questions/840583
  • Portege R500 - remove 'Eject the PC' from the menu pinned using pyrite station

    We run for Toshiba Portege R500 laptop in Windows XP Professional SP2 environment.
    Toshiba tools are installed to allow UN/hot docking on laptops.
    Portege R500 laptop computers come with the Slim Port Replicator docking station.

    During the docking of the laptop, 2 "pinned" items appear in the start menu called 'Eject the PC' and ' Eject PC and sleep. "
    We found that because of our custom build and Toshiba tools, there are a few conflicts.
    Most of these conflicts have been resolved, except for one that was recently found.

    When a user selects the option "Eject PC", it works as expected, however when the user plug their docking station back in, the port replicator is inactive (in other words, all the functions of the mouse, keyboard, cable LAN, etc. which are connected to the Port Replicator become unusable).
    To remedy the situation, a restart of the computer is required to do and everything works then according to normal again.

    To avoid users to do this, is there a way to remove the icons "Eject PC" & "Eject PC and Sleep" be pinned?
    Of course the added items can be deleted under the user's profile, but when the laptop is returned, these added items return.

    I tried to add a few registry keys to see if NoEject can be set to prevent this.

    Hello

    > To avoid users to do this, is there a way to remove the icons "Eject PC" & "Eject PC and Sleep" be pinned?
    It is not known to me
    I think that everything can be changed by using the right registry and value, but I have never tried this.

    But my knowledge of the Toshiba * Mobile Extension * tool controls this function.
    On the page of Toshiba Europe, you might find a more recent version: 3.87.00

    I think you should update this tool.

  • Broken helmet pin

    Hit my helmet plug on a shoot and it broke leaving pin depth in

    socket for headphones. Anyone got any ideas on how to get it out? Or will.

    have to go far to remove...

    That *... I had the same problem once, but with another camera...

    I put a tiny metal rod with a small drop of tiny tiny Super ultra metallic glue into the socket, let dry for a few hours and he pulled out. (Other options I do not know, except to pull the entire plug is present inside the camera...)

    But be careful that you do not paste the plug itself!

    Good luck!

  • Z600 / 2 x 6-pin PCI-Express

    Hello

    I got a HP Z600 workstation, without any graphics card as a gift.

    I bought an ASUS 660 Ti, and when I tried to install it, I surprised a 6 pin PCI-Express power connector is "disappeared".

    A PCI Express power connector out of the PSU and I need 2 x molex to use an adapter, but there is only a single molex.

    I started reading some forums, manuals, documentation, documentation of spare parts, but I really still don't know what solution is the best regarding my problem.

    I checked and the power supply is good enough for this graphics card but... I can't install it.

    If you have any ideas or if you have already encountered this problem, thank you very much.

    NASK ".

    Skylarking, thank you very much for this detailed answer the so.

    I entirely agree with what you said, and that's why I asked here, to the community, they could think about it. Because it's a job and it is not dedicated to use this kind of graphics card. But this work station is a great computer. All I need are met by this workstation, but the last missing part is the graphics card.

    This workstation was delivered with a Quadro FX 1800, unfortunately, I didn't have any graphics card, even if the graphics card would not be enough for what I do.

    I checked on some of the comments, except if you make some points of reference long and high graphics card should not consume more 143W (tested in 10 minutes, bitmining, mainly GPGPU).

    As for the information I have now, I could sell this workstation and build a regular desktop computer.
    But I can't find any good as good as the HP Z600.

  • See the pine trees hotel

    Good afternoon. I put a lt1112 in the design, but I need to connect pins 6 and 8, which are not displayed. How can I do? It shows all pins except those

    Hello letitbleed

    You must add another component, when you place a LT1112 will appear a menu like this (attached image), you have to choose, new A and B and then new

    You'll get some like this second image attached)

    Greetings

  • SCB-68 digital pins returns incorrect values

    Hi all

    I use a SCB - 68 is connected to a PCI-MIO-16-4. I just want to use the digital pin on the SCB-68 to high/low otuput signals. I test the memory in 'Measurement & Automation Explorer', under 'panels of Test '.

    The analog output works as expected and return values of voltage is entered.

    The digital pins, however, give me really strange values. When I configure port0 to "all out", the voltage measured at all digital pins is 4.54V, no matter if my selected state is 'very high' or 'low', except pin19/DIO4, that always gives me 0V.

    Should it? What are some possible solutions?

    Thank you

    A

    No, it's not normal, assuming that you measure on a device output and referenced to dgnd. It passes self-test? The Council is an old model. Who used it before you? It could easily have been damaged. Taking the scb-68 and the cable out of the picture, have you looked at the output of the DAQ card with nothing plugged? How about the end of the scb-68 cable connected?

  • How to make your own Board BNC connector for 37 pins PCI-6010?

    This is first time I am doing data acquisition and the BNC-2110 present can be connected to PCI-6010. How to make a Board for it?

    I'm not sure what you mean by "some"; The BNC-2120 exposes all channels HAVE and AO on connector 0 of a standard feature of E, M or X series.

    • Eight BNC connectors are for eight differential channels of I. For example, for the BNC connector labeled 'I 0', the Center connects to the 'I 0' pine and the outside connects to pin 'HAVE 8'. (The BNC-2120 probably would not be a good choice for someone who wanted to use the channels in unbalanced mode).

    • Other two is for the analog output; the centres are ' AO 0' and 'AO 1' and transmissions are related to "AO GND".

    • There is another connector BNC for PFI 0; all other PFI (with the exception of the 10, 11 and 15) are broken down as screw terminals.

    • Other BNC connectors connect what either directly (the unit is powered by the + 5V line but otherwise works autonomously, and the "user defined signals' are connected to terminals to adjacent screws).

    It seems like it wouldn't be difficult to have a cable that was going on a PCI-6010 the 37 pins on the connector 68 pins on the BNC-2120. I'm a little curious as to why we do not have one. Possible reasons off the top of my head which may explain why not:

    • cards PFI/description would be a mistake (for example, on a series of E/M/X ' CTR 0 SRC "PFI 8; on the 6010 is PFI 0.)

    • No digital lines (E/M/x series P0.0 P0.7 via are independent; on the P0.0 6010 P0.5 and P1.0 by P1.3 are shared with PFI lines)

    • Confusion about being able to connect to other devices that we sell with connector d - SUB 37 pin, but who do not use a compatible pinout (for example, the PCI-6239, PCI-6510 or the NI 9237). Here again, a PCI-6703 also uses a 68 connector pins, but has a completely incompatible pinout as well.

    But it seems that those who would be pretty easy to deal with, because it is useful to be able to connect to the BNC-2010. Maybe it's an idea for the Exchange of ideas information Acquisition?

    Anyway, if you want to have pushed BNC for everything on your Board of homebrew will need you:

    • 8 or 16 BNC connectors to HAVE, depending on whether you want single-ended or differential. For differential, the centres are GOT by AI 7 0, and transmissions are AI by AI 15 8. For asymmetric, the centres are HAVE 0 through 15 AI and transmissions should all connect to GND AI.

    • HAVE a sense (I think that you only need this if you use channels Nonreferenced Single - Ended (NRSE). See also: noise considerations for analog signals and field wiring.)

    • Two for AO (centers are AO 0 and 1 AO, outers times connect to AO GND).

    • Ten for PFI/digital lines. Outers will connect to GND D.

    Up to a maximum of 29. You want maybe less, depending on your application.

  • Application Builder: pin distribution to the taskbar

    Hello community,

    I have a program I am building an executable file, then an installer.

    This installer contains of course the RTE LabVIEW and other things which makes the very broad distribution.

    To distribute the patches, I use a second installer I created by making a copy of the first and then deselect the RTE, etc..

    This creates a much smaller package and voila, with the exception of a whim:

    If the executable file from the original installation is pinned to the taskbar it will stay pinned to the taskbar after patched at ONCE.

    But if I build Installer "patch" a second time immediately (even without having to build a new exe) to install this patch will cause pinning break.

    I can't understand the settings to keep intact pinning.

    Does anyone have experience with this?

    Best regards Florian

    Hi Florian.

    The problem is not directly related to the copy of the installer - this would happen if you rebuilt and then reinstalled the new version of the installer of origin as well. The problem is that version 2 of the installation program performs an action to upgrade MSI on the shortcut file that was installed in version 1.0. This action of upgrade first uninstalls the shortcut file having been pinned after installation of version 1.0, which eliminates so the pin of the Windows taskbar. Upgrade action ends then, by installing the file shortcut again. At this point, there is no pin code, because Windows is not a mechanism to associate the new version of the file with the old version of the file.

    Note that the problem does not occur when you install the first version of the copy of the installer, because in this case, the MSI upgrade code is different from the original installer, and no update MSI action (and therefore uninstalling) occurs on the shortcut file. Instead, the MSI file installs just the new shortcut file over the existing, which does not affect the pinning.

    To work around this problem, you should consider not installing the shortcut in the copy of your Installer. In this way, you can continue to rebuild the patch without losing the axis that the user does after they installed the original installer.

Maybe you are looking for