Solved

How to do SHA1 signing with private key like OpenSSL

Posted on 2006-11-15
9
1,726 Views
Last Modified: 2012-05-05
I am using OpenSSL to sign a xml file for a request. Here is the command line:

openssl.exe dgst -sha1 -binary -out "myfile.out" -sign "certificate.pem" "myfile.xml"

How can I do the same with pure ASP or within a ActiveX DLL? I had allready developed a ActiveX DLL to call the OpenSSL command, but there are some problems with permissions, so the SHA1 signing is not done.

I do not know what the openssl comand line above does in detail. I only got this call from a third party to implement before sending requests to their internet gateway.

Can someone help me?? It's a very urgent problem!

P.S.: If there is a commercial ActiveX component with SHA-1 signing it would be also very helpful!
0
Comment
Question by:Sven
  • 3
  • 3
9 Comments
 
LVL 22

Expert Comment

by:WMIF
ID: 17950004
here is some code to do it using an already written javascript function.
http://forums.aspfree.com/code-bank-54/asp-classic-sha1-hash-82166.html

if you have a dll written and would like to use it though, we can try to track down the permissions issue with a tool called filemon from www.sysinternals.com
0
 
LVL 11

Author Comment

by:Sven
ID: 17954050
Okay, I need to explain some more. I figured out what the open ssl statement is doing:

-dgst -sha1 is creating a SHA1 Hash of the xml-file (no problem to do this with other components or code)

--binary -out "myfile.out" saves as binary file (without Base64 encoding) (also no problem)

--sign "certificate.pem" will sign with ssl certificate, not private key and it seems there is no third party component supporting this.

Is there some ActiveX supporting signing with ssl certificates?
0
 
LVL 22

Expert Comment

by:WMIF
ID: 17957986
>>Is there some ActiveX supporting signing with ssl certificates?

i havent heard of one, and doing a search right now doesnt come up with anything.  sounds like the dll you created will be the best option for you.  shall we hunt down the permissions problems?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 11

Author Comment

by:Sven
ID: 17977670
@WMIF: Permission problem is solved by putting the dll in component services. It's not a comfortable way, but it works.
0
 
LVL 22

Expert Comment

by:WMIF
ID: 17981431
glad you got it worked out.
0
 
LVL 11

Author Comment

by:Sven
ID: 18171888
Can you please delete the question and refund the points? I solved the problem myself.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18212174
PAQed with points refunded (370)

Computer101
EE Admin
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now