Commit Graph

4 Commits

Author SHA1 Message Date
Gary Lin
9bc647e2b2 Cryptlib: implement strcmp() and strcasecmp()
strcmp() and strcasecmp() are widely used in openssl. Implement those
two functions to eliminate the gcc warnings and the potential crash.

Signed-off-by: Gary Lin <glin@suse.com>
2017-04-11 10:42:19 -04:00
Gary Lin
e883479f35 Cryptlib: amend the headers and fix signness
- Declare some functions in the proper headers
  + We missed them for a long time...

- Cast offsetof to UINTN
  + The original casting triggers the gcc warning since int can not
    present the offset for the 64bit machines.

- Cast the "char" array to "CHAR8 *" to avoid the gcc warnings

- Implement atoi correctly

Signed-off-by: Gary Lin <glin@suse.com>
2017-04-11 10:42:19 -04:00
Gary Lin
ab9a05a10f Cryptlib: Rename OpenSslSupport.h as CrtLibSupport.h
Edk2 renamed OpenSslSupport.h, so we have to follow the change.
Also merge some changes from edk2 CrtLibSupport.h

Signed-off-by: Gary Lin <glin@suse.com>
2017-04-11 10:42:18 -04:00
Matthew Garrett
9579a36336 Add crypto libraries 2012-06-18 17:49:57 -04:00