RE: Difference between RSA_sign and CryptSignHash signature

2009-04-01 Thread Goblin_Queen
C++ mistakes I made! Goblin_Queen wrote: > > OK, I got your point, I'll ask what they meant by "the same results" then. > > You're saying that I'm not competent for this task. As I said before, I'm > a student, and I'm doing this project to g

RE: Difference between RSA_sign and CryptSignHash signature

2009-03-31 Thread Goblin_Queen
OK, I got your point, I'll ask what they meant by "the same results" then. You're saying that I'm not competent for this task. As I said before, I'm a student, and I'm doing this project to get my master degree. Everything security related is still very new to me, especially because it's in C++,

Re: Difference between RSA_sign and CryptSignHash signature

2009-03-30 Thread Goblin_Queen
If this is wrong again, could you please tell me what IS the correct way of getting the size of sha1_data2? I don't think I know other options than sizeof or strlen... Victor Duchovni wrote: > > On Mon, Mar 30, 2009 at 06:57:02AM -0700, Goblin_Queen wrote: > >> >>

Re: Difference between RSA_sign and CryptSignHash signature

2009-03-30 Thread Goblin_Queen
different, but I'll check if I can perhaps validate the signed XML document now. The ASN1 Viewer tool I downloaded can now read the generated signature, so it's a start. Dr. Stephen Henson wrote: > > On Mon, Mar 30, 2009, Goblin_Queen wrote: > >> >> This is the

RE: Difference between RSA_sign and CryptSignHash signature

2009-03-30 Thread Goblin_Queen
This is the code I used to test the signing mechanism: void sign_test (const pkcs11h_certificate_t cert) { string hash = "67Vz7or3fAge1eo0ahO/S1YiCmo="; //test base64 encoded hash value unsigned char* sha1_data2; sha1_data2 = (unsigned char*)malloc(sizeof(char)*4096);

Re: Difference between RSA_sign and CryptSignHash signature

2009-03-30 Thread Goblin_Queen
arched a lot but I think I'm out of ideas now... Thanks again to anyone who's trying to help me and who has already tried to help! Goblin_Queen wrote: > > Thanks for the examples. I'm gonna test them now! > > > > Carter Browne wrote: >> >> You

OpenSSL how to build certificate chain

2009-03-26 Thread Goblin_Queen
Hello, I'm working with a combination of pkcs11-helper and OpenSSL, and I was wondering how I could build a certificate chain from an X509 certificate? I need to be able to get the issuer from the certificate as an object of type X509. I didn't find how this was possible, I only found methods to

Re: Difference between RSA_sign and CryptSignHash signature

2009-03-19 Thread Goblin_Queen
pcBuffer[ i ] = pcBuffer[ i+uiLen-i-1 ]; >pcBuffer[ i+uiLen-i-1] = cTemp; >} > > Carter > > > Carter Browne > CBCS > cbro...@cbcs-usa.com > 781-721-2890 > > > > Goblin_Queen wrote: >> Yes, I know that, but I don't know

Re: Difference between RSA_sign and CryptSignHash signature

2009-03-18 Thread Goblin_Queen
ample on how to convert a char* to little endian? I know it's probably a stupid question and I'm taking up your time, but I have to learn it somehow... Thanks in advance! Goblin_Queen wrote: > > Thanks for your reply, I had thought of that too because my search lead me > to such an

Re: Difference between RSA_sign and CryptSignHash signature

2009-03-18 Thread Goblin_Queen
Thanks for your reply, I had thought of that too because my search lead me to such an answer. How can I convert a char* from big endian to little endian? I googled for conversion examples but I only found conversions for int. I know this is probably a stupid question, but I'm still learning C++.

Difference between RSA_sign and CryptSignHash signature

2009-03-18 Thread Goblin_Queen
Hello, I'm writing a program that has to sign a SHA1-hash value. I'm using OpenSSL to do this. My program has to do the same thing as another program which makes use of Microsoft Crypto API. In that program the method "CryptSignHash" was used in order to sign the hash value. When I try to sign a