Solved

How to do SHA1 signing with private key like OpenSSL

Posted on 2006-11-15
9
1,733 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

28 Experts available now in Live!

Get 1:1 Help Now