URG: Problem checking signature

Hi there!
Im in a serious problem. I have to use an applet that use MS cryptoAPI to sign with IE some data in client side.
Now i have to develop a servlet that can check if that signature is ok or not, the problem is that signature is not valid! Wow! I am cheking the signature this way:
------------------- BEGIN CODE ---------------------
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
String sign = "MIIE2wY ... yhA=";
String text = "1234567890";
Signature sig = Signature.getInstance( cert.getSigAlgName(), "BC");
sig.initVerify(cert.getPublicKey());
sig.update(texto.getBytes(), 0, texto.getByes().length );
System.out.println(" OK?: " + sig.verify(firma.getBytes() ));
------------------- END CODE ---------------------
Ive heard about problems with compatibility with MS crypto API, but it isnt my choice!!
How could i implement an applet that could sing text in cliente side applet with explorer using a Class 2 certificate instaled in explorer.
Thanks all!
ps: please, it is urgent

Hi,
original_text = "Hello how are you";
sign_text = "some junk values"; // signed value of
original_text
Signature sig = Signature.getInstance( "your
signature", "encoding" );
sig.initVerify( public_key );
sig.update( original_text );
boolean b1 = sign.verify( sign_text );
System.out.println( "Verify result = " + b1 );
There shouldn't be any issues.
You should know that on the applet you have used the
Class 2 certificate as Private Key. Hence you will
need the corresponding Certificate using which you
will generate the PublicKey for verification.
Hope this explains ...
- Nil.Thanks Nil, but I know now what was the problem. I signed the text using a Class 2 certificate in client, with an applet. This applet has been given to me by my boss and it uses "microsoft cryptoapi", so i cant check it directly.
Do you know how to get certificate store in windows os? I think that if i could acces to certificate store with java and not using "MS API" i wouldnt have problems.
To try to get the store i tried this code from Almanac
--------------- BEGIN CODE ----------------
try {
// Load the keystore in the user's home directory
File file = new File(System.getProperty("user.home") + File.separatorChar ".keystore");
FileInputStream is = new FileInputStream(file);
KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType());
String password = "my-keystore-password";
keystore.load(is, password.toCharArray());
// List the aliases
Enumeration enum = keystore.aliases();
for (; enum.hasMoreElements(); ) {
String alias = (String)enum.nextElement();
// Does alias refer to a private key?
boolean b = keystore.isKeyEntry(alias);
// Does alias refer to a trusted certificate?
b = keystore.isCertificateEntry(alias);
is.close();
} catch (java.security.cert.CertificateException e) {
} catch (NoSuchAlgorithmException e) {
} catch (FileNotFoundException e) {
// Keystore does not exist
} catch (KeyStoreException e) {
} catch (IOException e) {
--------------- END CODE ----------------
But i can find the file.
Thanks again.
My email is [email protected].

Similar Messages

  • Oracle SOA suite 11.1.1.7 on windows 8 OS, But, during installation i got a problem "Check OS Certification".

    I want to install Oracle SOA suite 11.1.1.7 on windows 8 OS, My personal HP Pavilion g6 laptop. But, during installation i got a problem "Check OS Certification". What is this certification. Please Help Me.
    Regards,
    Satish.

    Pl identify exact version of Windows 8. Have you verified that your OS is supported/certified by consulting the spreadsheet at Oracle Fusion Middleware Supported System Configurations

  • I used migration to send photos form my Mac Book to my I Mac now i get an error message "iPhoto can not be opened because of a problem"  Check with the developer to make sure iPhoto works with this version of Max OSX.  You may need to install any availabl

    I used migration to send photos form my Mac Book to my I Mac now i get an error message "iPhoto can not be opened because of a problem"  Check with the developer to make sure iPhoto works with this version of Max OSX.  You may need to install any available updates or reinstall IPhoto.
    I tried installing Iphoto it said it was downloaded successfully. I still get the error messafe, and can not open any photos of program,  any suggestions?

    What version of iPhoto do you have on the Macbook and on the iMac? What systems are you running on the Macbook and on the iMac?
    Does the message only refer to "a problem" or does it specify what it is?
    Happy Holidays

  • When trying to open Pages 4.0.1 I get a message stating "Pages cannot be opened because of a problem, check with the developer to make sure Pages works with this version of Mac OS X. You may need to reinstall the application." Using OS X 10.6.8

    When trying to open Pages 4.0.1 I get a message stating "Pages cannot be opened because of a problem, check with the developer to make sure Pages works with this version of Mac OS X. You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X."
    I've run the software update several times. Pages is located in my iWork '09 folder in Applications. Using OS X 10.6.8

    Delete and reinstall it.
    (104030)

  • Accounts Payable Check Signatures

    We have a requirement for check signatures that I am not certain how to satisfy;
    There are four people in the company who are authorized to sign checks but for each check run only two of the four will perform a review / audit. The Vice President wants only signatures of the two who reviewed the check run to appear on the checks.
    Any suggestions would be greatly appreciated!
    Thanks,
    Kelly

    Hi Kelly
    Check out the dynamic signatures for checks on the XMLP blog ...
    http://blogs.oracle.com/xmlpublisher
    regards
    Tim

  • Sorry there was a problem checking your details.

    Hi,
    When I go to run the broadband speed test on the BT website it says. Thought it was the website at first as it started doing this the other day.
    Sorry there was a problem checking your details. Please check you have entered the correct telephone number and then press 'Start Test' again.
    Then this:
    Sorry, but we've not been able to match all of your details
    You can continue and run our download speed test now, but please note that we will only be able to offer you a limited assessment on the meaning of your results.
    Yet it will let me continue and do the test anyway. Any Ideas?
    Thanks

    FAQ
    1. Best Effort Test: -provides background information.
    Download Speed
    55.44 Mbps
    0 Mbps
    57.38 Mbps
    Max Achievable Speed
     Download speedachieved during the test was - 55.44 Mbps
     For your connection, the acceptable range of speedsis 45.9 Mbps-57.38 Mbps .
     Additional Information:
     IP Profile for your line is - 57.38 Mbps
    2. Upstream Test: -provides background information.
    Upload Speed
    8.5 Mbps
    0 Mbps
    20 Mbps
    Max Achievable Speed
    Upload speed achieved during the test was - 8.5Mbps
     Additional Information:
     Upstream Rate IP profile on your line is - 20 Mbps
    We were unable to identify any performance problem with your service at this time.
    It is possible that any problem you are currently, or had previously experienced may have been caused by traffic congestion on the Internet or by the server you were accessing responding slowly.
    If you continue to encounter a problem with a specific server, please contact the administrator of that server in the first instance. 
    Please visit the FAQ if you are unable to understand the test results.

  • Check Signature Only Prints On First Check

    Hello,
    We're using the SAP-provided Check SAPScript, along with a printer that stores the check signature on the actual printer.  So far, we've been able to get the signature to print on the check form, however, when we try to print multiple checks in one single spool request, the signature only prints on the first check form, and does not print on the subsequent check forms.  On the other hand, if we create only one spool request per each check, the signature prints each time... Very strange...
    Has anyone ever run into this issue or have any recommendations?
    Thanks,
    Matt

    Hi,
    Remove that 'at Start of Table' check box and check it.
    Regards
    Muthappan.

  • Where to Check Signature Logs

    I am getting the following error during signing.Please Help
    SecurityException in method: verify( Message, byte[], CPALookupObject ). Message: SecurityException in method: verify( Message, byte[], CPALookupObject ). WSSEThread-Exception: SecurityException in method: run(). Message: [com.sap.ASJ.wssec.030191] The found signature was not valid. Check signature logs for details.. To-String: com.sap.security.core.policy.exceptions.VerifyException: [com.sap.ASJ.wssec.030191] The found signature was not valid. Check signature logs for details.; To-String: com.sap.aii.security.lib.exception.SecurityException: SecurityException in method: run(). Message: [com.sap.ASJ.wssec.030191] The found signature was not valid. Check signature logs for details.. To-String: com.sap.security.core.policy.exceptions.VerifyException: [com.sap.ASJ.wssec.030191] The found signature was not valid. Check signature logs for details.. To-String: com.sap.aii.security.lib.exception.SecurityException: SecurityException in method: verify( Message, byte[], CPALookupObject ). WSSEThread-Exception: SecurityException in method: run(). Message: [com.sap.ASJ.wssec.030191] The found signature was not valid. Check signature logs for details.. To-String: com.sap.security.core.policy.exceptions.VerifyException: [com.sap.ASJ.wssec.030191] The found signature was not valid. Check signature logs for details.; To-String: com.sap.aii.security.lib.exception.SecurityException: SecurityException in method: run(). Message: [com.sap.ASJ.wssec.030191] The found signature was not valid. Check signature logs for details.. To-String: com.sap.security.core.policy.exceptions.VerifyException: [com.sap.ASJ.wssec.030191] The found signature was not valid. Check signature logs for details.
    Thanks
    Mridul

    Hi Mridul,
    Use XPI Inspector to get detailed error log.
    Michal's PI tips: XPI inspector - help OSS and yourself
    Michal's PI tips: XPI inspector - new functions and features (graphical message flow display)
    Also check below useful links:
    How to Load keys and certificates in SAP PI 7.3, SAP PO 7.3 EHP1 NWA's Key Storage
    Configuring WSSE (digital signing and encryption) using SAP PI 7.11 AAE SOAP Adapter

  • Setting up Abode Digital Editions, when I try to Authorize with my Abode id information I get the message "Activation Server Problem - check connection to the internet" when I clearly am connected to the internet ?

    Hi can anyone help me please this is driving me crazy ! I download and install Abode Digital Editions and when I try to Authorize with my Abode ID information I get the message " Activation Server Problem - check connection to the internet when I clearly am connected to the internet ?

    <moved from Downloading, Installing, Setting Up to Adobe Digital Editions>

  • Fatal Error:  Problem parsing signature --D

    I get "Fatal Error: Problem parsing signature --D" followed by the name of the class that I'm attempting to initialize. This occurs when I run the program, however I don't get this when I am debugging. Does anyone know what this means and how I can fix it?
    Thanks,
    Tyler

    I figured it out. My problem was that there was some kind of error happening in my code. I believe is was a couple of null pointer exceoptions or something along those lines. Once I debugged the hell out of my code, I was able to run the app completely without the error. I'm sure the same thing is happening with you as well.

  • Problems checking gmail account using Safari

    Hi there! I am having problems checking my gmail account using Safari. I can get to the site, log in, but as soon as it starts loading the page, my safari just freezes. Does anyone else have this same problem? If anyone knows a solution, i would greatly appreciate a little help. Also, i've relocated to another country, so i don't have access to an apple support center. but i would really like to get this problem solved on my own. Thanks much!!

    Hi Louisa,
    Welcome to the Apple Discussions.
    Could you download and install Opera and see if it does the same using this alternative web browser.
    Here's a link for you: http://www.opera.com/download/index.dml?opsys=MacOS&lng=en&ver=7.54u2&platform=M acOS&local=y
    Let us know the results.

  • Problem with Signature tab drop down in Outlook for Mac 2011

    I am setting up Outlook 2011 on my mac and have run across a problem with the signatures that I have been unable to resolve.
    I have set up 2 signatures for my two different pop accounts and thought that if I defaulted them to their appropriate account they would automatically be seen in email when I had chosen the corresponding email account. I then discovered that it was not
    possible to do this in Outlook 2011 for Mac.
    So I selected NONE as the defaults for my two signatures, and thought I would be able to manually add the appropriate signature to each email as I compose or reply.  BUT NO!!!! THE PROBLEM LIES BELOW:
    The 2 signatures that I set up are visible in the drop down menu from the signature tab in an email, however they are greyed out and cannot be selected.  I have attempted selecting one of these signatures as the default, and whichever one
    I select dutifully appears when I compose a new email, but when I click on the drop down to change the signature, both are still greyed out.
    So effectively, I only have the option of one signature or none, despite being able to set up multiple signatures in my profile.
    Does anyone know why this is occurring and what the solution is?
    Thanking you in advance.

    Hi,
    Please remove the Signature and re-add it back to check whether the issue persists. We can follow the articles below to create signature in Outlook 2011 for Mac:
    How to create signature or customize it (add picture) in Outlook for Mac 2011
    http://support2.microsoft.com/kb/2455171/en-us
    Add a signature automatically to every message
    http://office.microsoft.com/en-001/mac-outlook-help/add-a-signature-automatically-to-every-message-HA102928243.aspx
    If the new created Signature is still greyed out in your Outlook, please restart the Outlook client in safe mode to confirm if the issue is caused by any third-party add-ins.
    If the issue persists in Outlook safe mode, I suggest you ask a question in Outlook for Mac forum for further troubleshooting:
    http://answers.microsoft.com/en-us/mac/forum/macoutlook?tab=Threads
    Regards,
    Winnie Liang
    TechNet Community Support

  • AP Checks Signature

    Hi,
    Does anyone have information on how to go about buying \ creating the signature image. We currently use BottomLine for the signature but it seems the signature image is only valid if used with BottomLine. We are hoping to use XML Publisher for checks instead of BottomLine.
    Any information would be greatly appreciated.

    Hi Tim,
    We are facing similar problem. Our client is currently using Bottomline to print checks and Client's signature is in PCL 5 font. It is in .sfp file format.
    We are proposing to print check using XMLP but for signature security , we
    will have to use signature image in PCL font. Does XMLP only supports
    GIF/JPG images. Can we use .SFP file in XMLP to get signature image ?
    Please advice. Thanks a lot in Advance.

  • Problem with Signature formatting

    Hi,
    My company has changed its email signature format. Everyone else is using PCs and they have no issue with format. Im always fighting to get them to use Macs but I cant get the signature to work in mail.
    looks like its too wide and is pushing wider lines into next line. Is there a limit on how wide a signature can be?
    Ive been trying to just cut and paste it into mail signature or via Pages. Perhaps I should create it from scratch to solve the problem.
    Im running Mac OSX 10.6.8 and mail 4.5.
    Many thanks,
    Mike

    Hi Mike,
    Might see if this helps...
    http://allforces.com/2006/04/14/css-signatures/

  • CS-4 Vista 64 Bit Installation problems - "checking system profile...."

    Hello All:
    I know that this has been discussed in the past, but I was hoping that perhaps someone has determined a fix for the following problem.
    Background: In the past, with Windows XP Professional, I never had problems with loading any Adobe products.  But just last week I reluctantly upgraded to Windows Vista Home Premium because it came with a new power system PC that I purchased (AMD quad-core 2.4 gHz Phenom CPU, 8 Gigs of RAM and 1 TB HD) and this is where my problems began:
    Nature of problem:  I loaded the latest versions of Lightroom and Adobe Elements just fine - absolutely no problems there.  But when I tried to load my Photoshop CS-4 upgrade disk, it never gets past the "checking system profile" bar at the very beginning of the install process.  I mean to say that you initially get the install window and when you click "install," a small window comes up which indicates "checking system profile."  Then the progress indicator goes all the way to the right - around 90% to the right but then just hangs there - and I mean stays there...period.  I tried this several times, eventually having to use control/ALT/Delete in each instance to get it to stop.  I even let it stay there for over 6 hours - all to no avail.  What I found interesting is that just about all of my older programs - even those dating back to 2001 - all installed without a problem at all.
    2.  Actions I took to try and correct this:
        a.  Then, in my attempt to find fixes for this, I made sure to close out any background programs that were running (and Vista has a million of 'em), to include Firewall, Windows Defender, any other malware and anti-virus programs, not to mention a bunch of smaller programs that have items running in the background.  Then I tried loading CS-4 again....but still no go, the "checking system profile" indicator just hangs at 90% complete.  Note that at no time did the install process ever load any files at all - I checked everything to ensure this wasn't the case, otherwise I would have removed them.
        b.  On my next try, I then I copied all of the files from the CD to a folder on my desktop and tried to run the program from there - still no go as the "checking system profile" window still hangs at 90%  I even tried loading the program by right clicking on the exe file and installing "as administrator," but that didn't do the trick either.
        c.  Then I rebooted into safe mode, trying both to load the programs first from the CD and then from the desktop folder - still no go, but in this case it told me right up front that the action was unable to be completed.  I assumed this meant that in Windows Safe Mode, the installer was not available.
    Help Needed:  So folks, I know this has been discussed in the past, but I don't know of any fixes that are available.  Can anybody help me through this process?  You can also send me direct emails at:  [email protected] - which means I'd get them right away.
    This has been driving me up a wall because some other folks with Vista 64 Bit systems report that they had no problems with installation.  Again - it never makes it to installation, but gets hung up at the "checking system profile" stage.
    Argggggggg......
    Thanks,
    Ben Herrmann
    Fuquay-Varina, North Carolina

    I believe you are falling victim to some known incombatibility of LR vs. PS CS4 installer. This should be covered in the knowledge base, so check there. A short way to happiness may be using the CS4 Clean Utility to remove the debris from the failed installs and unregister other Adobe installs, then install PS CS4, but since I don't use LR and never have tried this, I'm not sure if this specific case is covered.
    Mylenium

Maybe you are looking for