SSF - verify digital signatures in C ( or other Microsoft language )

Hi Experts,
Could you please tell me where to find examples of / information on verifying a digita signature from SAP externally using C ( or other microsoft language ).
The SSF Progrsammers Guide refers to header files such as ssfxxlib.h and a c program called ssfxxsup.c
On SDN, The 'Christophe Solution' refers to a header file called ssfxxapi.h
Do you have any idea where to obtain these header files
Thanking you for all help -
Andy

Hi,
you can download whole SSF specification from this [link|ftp://ftp.sap.com/pub/icc/bc-ssf45/SSF_Specifications.zip]. You can get to this link from [ICC|http://www.sdn.sap.com/irj/sdn/icc]. It's nicely hidden
Cheers

Similar Messages

  • On windows 8 adobe touch reader, where do i get options to validate/verify digital signatures in pdf?

    i have windows 8 OS in my laptop, i need to verify digital signatures present in my pdf. the steps to verify/validate them are-
    1. Open the PDF file in PDF Reader.
    2. Left-click on the Digital Signature field.
    3. Click "Verify/Validate Signature".
    4. Click "Signature Properties".
    5. Click "Validate Signature or Verify Identity".
    6. Add "Contact information for certificate owner:"
    7. Click "Add to List".
    8. Click "Close".
    but i cannot find such options in adobe touch reader.
    please help to verify the digital signatures.
    thank you

    Unfotunately, this functionality is not supported in current version of Adobe Reader Touch. But, we have noted down your feature request and we might consider it for our future releases.

  • How to Verify digital signature in ABAP web dynpro enviroment

    Hi,
    I have few questions regarding, how we can Verify digital signature in ABAP WebDynpro ?
    Do we have class or function modules to verify digital signature on WAS once signed offline or online interactive form is uploaded back?
    can we use function modules in function group SSFG for validating authors signature? Or any other classes or interfaces are available in NetWeaver environment.
    I searched to find any sample for validating signatures in ABAP WebDynpro, however I could not find any thing. Any sample code will be very useful?
    Thanks,
    Nitesh Shelar.

    I Found that Interface IF_FP_PDF_OBJECT can be used to extract signatures from document.
    Thanks,
    Nitesh Shelar.

  • Verify digital signature  mobile 5.0

    i have a jad file d2link and i get this error msg [unable to verify digital signature ] can any one help its on a 8525 phone with wm5 on it with the java program 6.1 i have downloaded opera it seem to work fine plus the golf tracker and gmail and them seem to work fine or is there any way to bypass this or add something to make it work
    Message was edited by:
    [email protected]

    Hi, I was wondering if you solved already the digital signature verifying error on the MDA.
    I am also trying to install something on my MDA and I get the error message "Unable to verify the digital signature"!
    I am desperate because I really dont know where the problem is!!!
    I would really appreciate if you could give me any hint!
    Thank you so much in advance.
    Clara Fdz

  • Cannot verify digital signature

    Hi i have sap b1 2005 pl 34. due to some reason, the server is formatted. now i installed sap b1 2005 pl 05 base installation and than upgrading to pl 34. now while importing lic file i gor error "cann't verify digital signature". now i updated the path from file B1200xLS00P_00.zip. now wile importing the lic i got the error coorupt service manager reinstall it.
    what to do now.

    Hi Ash
    Even i got the same error follow the same what i have done
    Get these two files from Portal Or ask Ur team manager to give those files
    1)B1LASVerify.pse
    2).B1License.exe
    place these files under follow this path
    C:\Program Files\SAP\SAP Business One ServerTools\License
    Replace those two files
    Hope this helps u
    Regards
    Jenny

  • How to get verified digital signature for applets?

    Hi All,
    I run a small website with an applet ( [http://www.tozsdeasz.hu/grafikonrajzolo/inditas.html|http://www.tozsdeasz.hu/grafikonrajzolo/inditas.html] ). Visitors can load files into the applet, so the applet needs to ask for permission from the user to access files on the visitor's computer. When doing so an unfriendly window pops up telling that the digital signature of the application cannot be verified (you can see it for yourself by the link). Some users keep complaining about it fearing of the security risk.
    What is the proper way of getting a properly signed applet? (how to get a verified digital signature?)
    Please help me!
    Best wishes:
    Szabolcs Kelemen

    Thanks for the links.
    As far as I saw in the documents I need a "digital certification authority" to sign the jar.
    Do you know any of these authorities that is free? The entire application does not worth much, I can't afford expensive certifications.
    Best regards:
    Szabolcs Kelemen

  • Verifying digital signatures in PDF documents

    I'm working on verifying PDFs digital signatures.
    I know that when a PDF is signed, a byterange is defined, the certificates get embedded, and from what i've read, the signed message digest and the timestamp are also stored in the PDF.
    I already can extract the certificates and validate them. Now I'm trying to validate the pdf's integrity and my problem is I don't know where the signed message digest is located.
    In this sample signed pdf (http://blogs.adobe.com/security/SampleSignedPDFDocument.pdf), I can clearly identify the digest since it is down below the embedded certificates: /DigestMethod/MD5/DigestValue/ (line 1520).
    But that PDF sample seems to be from 2009, and I suspect the message digest is stored in a different way now, because I signed a PDF with Adobe Reader and I can't find any message digest field like the previous one. Can someone tell if the digests are now stored in a different way? Where are they located?
    Anyway, for now I'm using that sample document, and trying to verify its integrity. I'm getting the document's bytes to be signed acording to the specified byterange, and digesting them with MD5 algorithm, but the digest value I get doesn't match with the one from the message digest field... Am I doing something wrong? Is the digest also signed with the signer's private key?
    I appreciate any help.

    You cannot rely on the digest to be in a certain place in PDF. If you want to manually verify the digest in a PDF signature here's what you need to do.
    1. Open PDF in a Text Editor.
    2. Find Signature Dictionary for your signature.
    3. Get the Hex String which is the value of the /Contents entry in the Signature Dictionary.
    4. Convert Hex String to binary string and discard trailing zeros. Remember that in a Hex string each byte is represented with two characters and the last one might be a zero. So, when you discard zeros make sure that what you get left has even number of bytes.
    5. Use one of the commercially available BER Viewers (you can find free BER Viewers on the Web) to convert the binary string to ANSI.1 representation.
    6. Analyze the BER-decoded PKCS#7 signature object (RFC 2315 describes it) and find the digest that you are looking for in it. It is an OCTET STRING.
    If you want to programmatically validate a signature, you need to write code that does all that. Signature validation includes much more than checking the digest. You need to build chain, validate each certificate in the chain, check revocation for each certificate in the chain, etc. RFC 5280 is the guide what to do.
    Good luck!

  • Java SSF for Digital Signatures and Document Encryption

    Hello,
    I have read in "SAP Help - Java Development Manual" that there is a Java SSF library for Digital Signatures and Document Encryption API.
    http://help.sap.com/saphelp_nw04s/helpdata/en/4f/65c3b32107964996a56e4165077e24/frameset.htm
    I am trying to develop an example application in NWDS using Interfaces/classes (ISsfData, SsfDataXml...), but NWDS does not find this classes in any library.
    I have searched for Javadocs in NWDS plugins directory and this classes and interfaces should be in JAR com.sap.security.api.jar, but they aren't there.
    Our WAS version is: NW04s WAS 7.0 SP11 and he have downloaded Java Crypto Library (IAIK) and also SAP XML Toolkit.
    Does anyone know how to find or obtain this library?
    Thanks in advance,
    Jorge Linares

    Hello Francesco,
    I want to  generate a digital signature (PKCS#7,XML) using SAP SSF API as explained in
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/65c3b32107964996a56e4165077e24/content.htm and in Amol Joshi's reply in
    Digital Signatures and Document Encryption api
    so my question  is From which PI/XI version and its SPS this SAP SSF LIBRARY is supported ?
    Kind Regards,
    Kubra fatima.

  • SSF and digital signatures

    Hi Guys!
    I need to exchange XML documents with third-party. The aproach is to generate it from SAP and then sign it with Digital Signature.
    I found information, that I could use SSF to achieve it. On help.sap.com I found information, that I could use SAP Cryptographic library.
    I have installed SAP Crypto and I maintained ssfrfc.ini file:
    SSF_LIBRARY_PATH = D:\CRYPTO\sapcrypto.dll
    SSF_TRACE_LEVEL  = 3
    SSF_MD_ALG       = MD5
    SSF_SYMENCR_ALG  = DES-CBC
    Now I want to test it with report SSF01 - but I'm getting an error:
    Result:  SSF_API_NOSECTK
    Version information:                                       61
             SSFRFC V1.46.3 No security toolkit version information found.
    So I thought I will manually run ssfrfc.exe. And again I'm getting an error:
    =================================================
    === SSF INITIALIZATION:
    ===... SSF initialization file ssfrfc.ini found.
    ===...SSF library is D:\CRYPTO\sapcrypto.dll .
    ===...SSF trace level is 3 .
    ===...SSF hash algorithm is MD5 .
    ===...SSF symmetric encryption algorithm is DES-CBC .
    ===...completed.
    =================================================
    =================================================
    === LOAD SSF FUNCTIONS:
    ===...could not load SSF library D:\CRYPTO\sapcrypto.dll .
    I checked two libraries:
    SAPCRYPTOLIBP_8412-20011729
    SAPCRYPTOLIB_36-10010888
    I checked all file destinations and so on at least three times. I don't have any new idea to make it working. Please help me.
    Best regards
    Ana

    Hello Anatoly,
    I had exactly the same issue with a SSF library provided by SBKontur (RU). Their library "KonturSSF.dll" could not be loaded by ssfrfc.exe on the frontend, the trace file contained something like:
    =================================================
    === SSF INITIALIZATION:
    ===... SSF initialization file C:\Program Files (x86)\SAP\FrontEnd\SAPgui\ssfrfc.ini found.
    ===...SSF library is C:\Program Files (x86)\SAP\FrontEnd\SAPgui\KonturSSF.dll .
    ===...SSF trace level is 5 .
    ===...SSF hash algorithm is SHA1 .
    ===...SSF symmetric encryption algorithm is DES-CBC .
    ===...completed.
    =================================================
    =================================================
    === LOAD SSF FUNCTIONS:
    ===...could not load SSF library C:\Program Files (x86)\SAP\FrontEnd\SAPgui\KonturSSF.dll .
    After some investigation I found out by calling the ssfrfc.exe directly in a Windows command box with option -D, that the library had dependencies to Microsoft's C runtime libraries MSVCP120.DLL and MSVCR120.DLL.
    Unfortunately, this is not logged into the SSF RFC Trace File dev_ssfa*, but only shown as error message in a popup window if you execute ssfrfc.exe directly as mentioned before.
    So you should try this in order to find out if there are dependencies with your special library.
    Kind regards
    Heiko

  • Configuring SSF for Digital Signature.

    Hi, All,
    I m created a Status network for docuemnt.
    For 'release' status i fixed Signaure Strategy.
    For 'Releasing ' the document the authorized person should 'sign' ie digital signaure.
    During digiatal Signature, the system gives this mensage 'SSF information for the SAP user not found'
    note:I have only one signaure for 'Release' status.
    How i can config SSF
    Rgds,
    Ben

    Hi,
    I think this link will help you.
    http://help.sap.com/saphelp_nw70/helpdata/en/53/251a355d0c4d78e10000009b38f83b/frameset.htm
    Regards,
    Sunny

  • Unable to verify Digital Signature in workspace

    Hi All,
    I m trying to use VerifyPDFSignature DSC from Digital Signitures. The process works fine when i invoke it from the workbench but i am unable to get it working from the workspace. So i guess that must have something to do with the rendering service.
    My form variable is a PDF document of type xfaForm
    I am using Default Render ES update 1 as my renderer.
    The error i m getting while invoking the process from workspace is
    Caused By: ALC-DSS-300-002 Problem in processing the input PDF (in the operation : getPDFDocFromDocument)
      Caused By: Stream does not represent a PDF document.(CosDocument.java436)
    com.adobe.livecycle.signatures.service.impl.DocumentSecurityService.getSignatureFieldList (DocumentSecurityService.java:477)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
    com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
    com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:342)
    com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:212)
    sun.reflect.GeneratedMethodAccessor578.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
    org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
    org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
    org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:363)
    org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    org.jboss.ejb.Container.invoke(Container.java:873)
    org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    $Proxy269.doSupports(Unknown Source)
    com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
    com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
    com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:132)
    com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
    com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
    com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:91)
    com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 5)
    com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:724)
    com.adobe.workflow.engine.SynchronousBranch.handleInvokeAction(SynchronousBranch.java:465 )
    com.adobe.workflow.engine.SynchronousBranch.execute(SynchronousBranch.java:862)
    com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBea n.java:2773)
    com.adobe.workflow.engine.ProcessEngineBMTBean.asyncContinueBranchCommand(ProcessEngineBM TBean.java:2528)
    sun.reflect.GeneratedMethodAccessor1138.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
    org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
    org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:1 58)
    org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
    org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
    org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
    org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
    org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    org.jboss.ejb.Container.invoke(Container.java:873)
    org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
    org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
    $Proxy302.asyncContinueBranchCommand(Unknown Source)
    com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControll erBean.java:144)
    com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandController Bean.java:99)
    sun.reflect.GeneratedMethodAccessor1059.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:585)
    org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j ava:475)
    org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
    org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc eptor.java:101)
    org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
    org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
    org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
    org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
    org.jboss.ejb.Container.invoke(Container.java:873)
    org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
    org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerI nvoker.java:1379)
    org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
    org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904 )
    org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
    org.jboss.mq.SpySession.run(SpySession.java:333)
    org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
    EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
    java.lang.Thread.run(Thread.java:595)
    Caused By: com.adobe.livecycle.signatures.service.types.exceptions.internal.DSSInternalPDFException
    com.adobe.livecycle.signatures.service.impl.PDFUtilities.getPDFDocFromDocument(PDFUtiliti es.java:252)
      com.adobe.livecycle.signatures.service.impl.PDFUtilities.getPDFDocFromDocument(PDFUtiliti es.java:223)
      com.adobe.livecycle.signatures.service.impl.DocumentSecurityService.getSignatureFieldList (DocumentSecurityService.java:474)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
      com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
      com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:342)
      com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:212)
      sun.reflect.GeneratedMethodAccessor578.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
      org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
      org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
      org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:363)
      org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
      org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      org.jboss.ejb.Container.invoke(Container.java:873)
      org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
      org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
      $Proxy269.doSupports(Unknown Source)
      com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
      com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:132)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
      com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
      com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:91)
      com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 5)
      com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
      com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
      com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:724)
      com.adobe.workflow.engine.SynchronousBranch.handleInvokeAction(SynchronousBranch.java:465 )
      com.adobe.workflow.engine.SynchronousBranch.execute(SynchronousBranch.java:862)
      com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBea n.java:2773)
      com.adobe.workflow.engine.ProcessEngineBMTBean.asyncContinueBranchCommand(ProcessEngineBM TBean.java:2528)
      sun.reflect.GeneratedMethodAccessor1138.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
      org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
      org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:1 58)
      org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
      org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
      org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
      org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      org.jboss.ejb.Container.invoke(Container.java:873)
      org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
      org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
      $Proxy302.asyncContinueBranchCommand(Unknown Source)
      com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControll erBean.java:144)
      com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandController Bean.java:99)
      sun.reflect.GeneratedMethodAccessor1059.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j ava:475)
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
      org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc eptor.java:101)
      org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
      org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
      org.jboss.ejb.Container.invoke(Container.java:873)
      org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
      org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerI nvoker.java:1379)
      org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
      org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904 )
      org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
      org.jboss.mq.SpySession.run(SpySession.java:333)
      org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
      java.lang.Thread.run(Thread.java:595)
      Caused By: com.adobe.internal.pdftoolkit.core.exceptions.PDFCosParseException
      com.adobe.internal.pdftoolkit.core.cos.CosDocument.init(CosDocument.java:436)
      com.adobe.internal.pdftoolkit.core.cos.CosDocument.<init>(CosDocument.java:138)
      com.adobe.internal.pdftoolkit.core.cos.CosDocument.newDocument(CosDocument.java:192)
      com.adobe.internal.pdftoolkit.pdf.document.PDFDocument.<init>(PDFDocument.java:270)
      com.adobe.internal.pdftoolkit.pdf.document.PDFDocument.newInstance(PDFDocument.java:202)
      com.adobe.pdfdocumentmanager.client.SharedPdfDocumentContext.toPDFDocument(SharedPdfDocum entContext.java:745)
      com.adobe.livecycle.signatures.service.impl.PDFUtilities.getPDFDocFromDocument(PDFUtiliti es.java:243)
      com.adobe.livecycle.signatures.service.impl.PDFUtilities.getPDFDocFromDocument(PDFUtiliti es.java:223)
      com.adobe.livecycle.signatures.service.impl.DocumentSecurityService.getSignatureFieldList (DocumentSecurityService.java:474)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
      com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
      com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:342)
      com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:212)
      sun.reflect.GeneratedMethodAccessor578.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
      org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
      org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
      org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:363)
      org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
      org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      org.jboss.ejb.Container.invoke(Container.java:873)
      org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
      org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
      $Proxy269.doSupports(Unknown Source)
      com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
      com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:132)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
      com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
      com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
      com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
      com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:91)
      com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 5)
      com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
      com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
      com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:724)
      com.adobe.workflow.engine.SynchronousBranch.handleInvokeAction(SynchronousBranch.java:465 )
      com.adobe.workflow.engine.SynchronousBranch.execute(SynchronousBranch.java:862)
      com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBea n.java:2773)
      com.adobe.workflow.engine.ProcessEngineBMTBean.asyncContinueBranchCommand(ProcessEngineBM TBean.java:2528)
      sun.reflect.GeneratedMethodAccessor1138.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
      org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
      org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:1 58)
      org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
      org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
      org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
      org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      org.jboss.ejb.Container.invoke(Container.java:873)
      org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
      org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
      $Proxy302.asyncContinueBranchCommand(Unknown Source)
      com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControll erBean.java:144)
      com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandController Bean.java:99)
      sun.reflect.GeneratedMethodAccessor1059.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:585)
      org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j ava:475)
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
      org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc eptor.java:101)
      org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)
      org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)
      org.jboss.ejb.Container.invoke(Container.java:873)
      org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)
      org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerI nvoker.java:1379)
      org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
      org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904 )
      org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)
      org.jboss.mq.SpySession.run(SpySession.java:333)
      org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
      java.lang.Thread.run(Thread.java:595)
    Any help regarding above is appreciated.

    Steve,
    yes, you were right i was passing my xfaForm variable to the VerifyPDFSignature DSC which was the cause for its failure, but somehow i am not able to find a way to convert the data in my xfaForm variable into PDF. i am basically facing two problems.
    1. How to extract the data a workspace user fills in the form. The two services usually used to extract the data; exportData from FormDataIntegration Serivice and ProcessFormSubmission from Form service both expect the input to be a PDF.
    2.I tried using Rendering service along with xfaForm(by selecting the renderer in the advanced settings when we create a variable of type xfaForm) but this still does not seem to solve my problem because although the Rendering service claims to render form into PDF, but the services i mentioned in point 1, dont seem to recognize it as PDF. i am getting an error saying "Malformed input PDF".
    I seem to be cluelessly lost in this process.

  • Verify digital signature??

    I've seen the tutorials from java and so on but I cant get the thing work.
    I have a .cer certificate so i want it to read like:
    FileInputStream keyfis = new FileInputStream("C:\\Work\\java\\editorDeTexto\\cert.der");
            byte[] encKey = new byte[keyfis.available()];
            keyfis.read(encKey);
            keyfis.close();
            X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(encKey);
            KeyFactory keyFactory1 = KeyFactory.getInstance("RSA");
            PublicKey pubKey = keyFactory1.generatePublic(pubKeySpec); ........The program cant read the FileStream, anyway when it reads the stream i get this error:
    derInputStream.getLenght(): lenghtTag = 111 too big
    I dont know how to solve this problem at all... this is my main problem.

    Finally did it... after a lot of days searching:
    public static PublicKey get(String filename)
            throws Exception {
            File f = new File(filename);
            FileInputStream fis = new FileInputStream(f);
            DataInputStream dis = new DataInputStream(fis);
            byte[] keyBytes = new byte[(int)f.length()];
            dis.readFully(keyBytes);
            dis.close();
            X509EncodedKeySpec spec =
              new X509EncodedKeySpec(keyBytes);
            KeyFactory kf = KeyFactory.getInstance("RSA");
            return kf.generatePublic(spec);
    public static boolean verifySig(byte[] data, PublicKey key, byte[] sig) throws Exception {
            Signature signer = Signature.getInstance("SHA1withRSA");
            signer.initVerify(key);
            signer.update(data);
            return (signer.verify(sig));
          }The main problem is the public key, java dont read PEM files so you have to convert it.
    The solution for all your problems are here:
    [http://codeartisan.blogspot.com/2009/05/public-key-cryptography-in-java.html|http://codeartisan.blogspot.com/2009/05/public-key-cryptography-in-java.html]
    [http://www.keyzam.com/forum/index.php?topic=4.0|http://www.keyzam.com/forum/index.php?topic=4.0]
    Remember to stay put, and not become crazy... this is really difficult (The prove is that noone helps me).
    Anyway thanks to all.
    Good signing/checking.
    Edited by: alrik11es on Aug 24, 2009 2:00 PM

  • Verifying digital signature

    Hi, I am a newbie to security. All I want is to sign a message with a private key and check the signature with corresponding public key.
    But running below program I always keep getting "Signature failed. Possible imposter found."
    What am I doing wrong in below program. Any help is greatly appreciated.
    import java.security.KeyPairGenerator;
    import java.security.NoSuchAlgorithmException;
    import java.security.KeyPair;
    import java.security.interfaces.RSAPrivateKey;
    import java.security.interfaces.RSAPublicKey;
    public class GetKeys1 {
         public static void main(String[] args) throws Exception {
              KeyPair keyPair = KeyPairGenerator.getInstance("RSA").generateKeyPair();
              RSAPublicKey pubKey = (RSAPublicKey) keyPair.getPublic();
              RSAPrivateKey privKey = (RSAPrivateKey) keyPair.getPrivate();          
    //data to be signed
    String str = "Testing Keys";
         Signature mySig = Signature.getInstance("MD5withRSA");
         mySig.initSign(privKey);
         mySig.update(str.getBytes());
         byte[] byteSignedData = mySig.sign();
         //decode the signature
         Signature theirSig = Signature.getInstance("MD5withRSA");
         theirSig.initVerify(pubKey);
         theirSig.update(byteSignedData);
         if (theirSig.verify(str.getBytes())) {
         System.out.println("Signature checks out." );
         } else {
         System.out.println("Signature failed. Possible imposter found.");
    Thanks
    Kolli

    Well isn;t the verification like:
    1. Sign the message with private key
    2. Decode the message with public key
    3. compare the the decoded message and original message
    right?
    I actually change d the decoding part of my program by doing below update. it still did not work
    //decode the signature
         Signature theirSig = Signature.getInstance("MD5withRSA");
         theirSig.initVerify(pubKey);
         theirSig.update(str.getBytes());
         if (theirSig.verify(byteSignedData)) {
         System.out.println("Signature checks out." );
         } else {
         System.out.println("Signature failed. Possible imposter found.");
    Thank you very much for replying for the post.

  • SSF and Digital Signature

    Dear Team,
    We need to setup the SSF and wants the DS in place for all the document getting created.
    I have been to sdn site and also on help.sap.com and found
    http://help.sap.com/saphelp_nw04/helpdata/EN/53/251a355d0c4d78e10000009b38f83b/frameset.htm
    But from where do we download he SSF? What is SAPSECULIB is used for? I mean does SSF and SAPSECULIB related in any configuration?
    Has anybody done this setting?
    Regards
    Prash

    Hi Sunny,
    Thanks for your reply.
    I have already checked the url before, but how do I use it or test it?
    How to verify, everything is there default?
    Please give some example to demonstrate or any configuration required
    Regards
    Prash

  • Verifying digital signature error

    Hi
    I´m doing a xml signer and xml signer verifier to be used as java mapping, in XI.
    I followed the examples described in:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a4/d0201854fb6a4cb9545892b49d4851/frameset.htm
    The function to sign the data has worked and my xml signs sucessfully. But when I try to verify it using the "verify" function, it ALWAYS return false. I´m testing the xml previously signed by "sign" function.
    The public certificate was extracted from the keypar certificate used to sign.
    The function "pab.getCertificates()" returns me the right certificated.
    Can anyone help me?
    Thanks

    Hi
    I´m doing a xml signer and xml signer verifier to be used as java mapping, in XI.
    I followed the examples described in:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a4/d0201854fb6a4cb9545892b49d4851/frameset.htm
    The function to sign the data has worked and my xml signs sucessfully. But when I try to verify it using the "verify" function, it ALWAYS return false. I´m testing the xml previously signed by "sign" function.
    The public certificate was extracted from the keypar certificate used to sign.
    The function "pab.getCertificates()" returns me the right certificated.
    Can anyone help me?
    Thanks

Maybe you are looking for

  • Date & Day & Month please help

    Hi Scripters, I have creat a diary book in InDesign CS4. Probelm: I want to alert the date and day for each time like this. But after the 7 saturday after alert the 8th day is undefined result. Date     Day 1          Sunday 2          Monday 3      

  • How can I make a photograph large enough for large format printing?

    Is there a way to make an image larger on photoshop or illustrator? I will be printing on a large format latex printer. So the printer itself is excellent but its the image that i am struggling to acquire. I have basic knowledge of the programmes but

  • Google images not displaying properly

    I have recently downloaded some add-ons, for the first time, and since then google image searches on display about eight images. Deleting the add-ons, except for Flagfox, has not helped.

  • What do i need to do to get an imac repaired

    what do i need to do to get an Imac repaired

  • Trigger UNIX Script from SAP

    Hi.. The requirement is as follows : SAP drops a file into a folder and triggers a UNIX script using a File Port partner destination. Unix script will perform a secure copy to the Webmethods server.  If a Unix script error occurs, an Rfc function wil