Solved

How to do SHA1 signing with private key like OpenSSL

Posted on 2006-11-15
9
1,754 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

Title # Comments Views Activity
Html fieldset fix its height and width 4 44
MS SQL 2008 and stored prodcures and dates 5 27
VB script help 23 36
JQuery on multiple lines 3 18
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 informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 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