2

I have done PKCS_7_ASN_ENCODING | X509_ASN_ENCODING in windows using wincrypt and I have to verify signature in linux. Can anyone tell by about good light crypto api on linux.

On searching I found http://home.gna.org/cryptodev-linux/ and on compiling it i am getting this error crypto/hash.h: No such file or directory

ashmish2
  • 2,885
  • 8
  • 40
  • 54
  • 4
    [OpenSSL](http://openssl.org/)? It's generally installed by default on most Linux distros. I can point a C++ wrapper I wrote ([sslpkix](https://github.com/jweyrich/sslpkix)) , but it's yet far from 1.0 - no docs, no sample code, etc. Anyway, maybe it sheds some light. – jweyrich Apr 05 '11 at 12:39
  • 2
    Well, normally OpenSSL is all you need. In what context do you need to verify a signature? Some code perhaps? On linux you might need to install some package that includes the kernel headers. For example on ubuntu - `sudo apt-get install linux-headers-generic` – Derick Schoonbee Apr 05 '11 at 12:46
  • linux kernel does have crypto api. right? i want to use that if possible. It will be light then i guess – ashmish2 Apr 05 '11 at 12:49

3 Answers3

4

This error occurs because you don't have the kernel headers for your system/kernel, therefore when you try to compile, it's unable to find those headers.

More on your end goal, do you want to validate whether a certificate is signed by someone else's certificate?

If so, and if you're open to use OpenSSL, take a look at this answer.

Community
  • 1
  • 1
jweyrich
  • 31,198
  • 5
  • 66
  • 97
  • yes.. certificate is signed by user in windows(using cryptoapi) and i have to validate it in linux machine... – ashmish2 Apr 06 '11 at 08:19
3

NSS

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
0

I would either go with GPG (it also has its own API, just look on the side) or Beecrypt which is probably a little easier to understand but not as complex in its functionality

Chris
  • 2,030
  • 1
  • 16
  • 22