Solved

How to do SHA1 signing with private key like OpenSSL

Posted on 2006-11-15
9
1,746 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

807 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