7de1c71dd2
CryptoPkg/BaseCryptLib:time overflow
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4167
In CrtLibSupport.h, time_t is defined as INT32, and its maximum value
is 2147483647. That is, the corresponding maximum timestamp is
2038-01-19 11:14:07. Therefore, overflow occurs when the test time
exceeds 2038-01-19 11:14:07. So change the type of time_t to INT64 and
also change the type of variables in function gmtime which calculated
with time_t.
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Xiaoyu Lu <xiaoyu1.lu@intel.com >
Cc: Guomin Jiang <guomin.jiang@intel.com >
Signed-off-by: Zihong Yi <yizihong@huawei.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
2022-12-03 09:01:38 +00:00
3c9e2f239a
CryptoPkg: Fix integer overflow
...
SECSPERDAY is 86400 which exceeds the limit of a UINT16 which is 65536.
Therefore DayRemainder cannot use UINT16. This patch makes it UINT32.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Anthony Perard <anthony.perard@citrix.com >
Cc: Julien Grall <julien@xen.org >
Signed-off-by: Yuan Yu <yuanyu@google.com >
Reviewed-by: Ard Biesheuvel <ardb+tianocore@kernel.org >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
2022-10-10 00:58:26 +00:00
7c34237831
CryptoPkg: Apply uncrustify changes
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the CryptoPkg package
Cc: Andrew Fish <afish@apple.com >
Cc: Leif Lindholm <leif@nuviainc.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com >
2021-12-07 17:24:28 +00:00
2009f6b4c5
CryptoPkg: Replace BSD License with BSD+Patent License
...
https://bugzilla.tianocore.org/show_bug.cgi?id=1373
Replace BSD 2-Clause License with BSD+Patent License. This change is
based on the following emails:
https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html
RFCs with detailed process for the license change:
V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com >
2019-04-09 09:10:22 -07:00
630f67ddfe
CryptoPkg: Clean up source files
...
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com >
2018-06-28 11:19:40 +08:00
ab187ae25a
CryptoPkg/BaseCryptLib: Add error handling for time() wrapper
...
In time() wrapper implementation, the gRT->GetTime() call may be not
available. This patch adds the extra error handling to avoid the
potential dead loop.
Cc: Star Zeng <star.zeng@intel.com >
Cc: Ting Ye <ting.ye@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com >
Reviewed-by: Star Zeng <star.zeng@intel.com >
2018-01-22 14:28:15 +08:00
fc9fa685d6
CryptoPkg: Clean-up CRT Library Wrapper.
...
Cleaning-up CRT Library Wrapper for the third-party cryptography
library building. The changes includes
1. Rename OpenSslSupport.h to CrtLibSupport.h for future alternative
crypto provider support.
2. Remove all un-referenced CRT APIs and headers.
(NOTE: More cleans-up could be possible after OpenSSL integrate the
extra PR request: https://github.com/openssl/openssl/pull/2961 )
Cc: Ting Ye <ting.ye@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Gary Lin <glin@suse.com >
Cc: Ronald Cron <ronald.cron@arm.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com >
Reviewed-by: Ting Ye <ting.ye@intel.com >
Tested-by: Laszlo Ersek <lersek@redhat.com >
Tested-by: Gary Lin <glin@suse.com >
2017-03-29 16:13:58 +08:00
5e2318dd37
CryptoPkg: Fix the potential system hang issue
...
This patch is used to fix the potential system hang
caused by the NULL 'time' parameter usage.
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Long Qin <qin.long@intel.com >
Cc: Ye Ting <ting.ye@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com >
Reviewed-by: David Woodhouse <David.Woodhouse@intel.com >
2016-03-15 09:04:20 +08:00
04a3cfa78a
Per gmtime manpage, tm_mon is the number of months since January
...
while MonthNo is the month of the year, so tm_mon should be MonthNo-1.
Similarly, tm_mday is the day of the month, and DayNo is the number
of days since the first day of the month. Assigning DayNo+1 to
tm_mday to fit the definition.
This commit also corrected miscalculated MonthNo and DayNo for the
first day of the month. (Thanks to Laszlo Ersek!)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Long Qin <qin.long@intel.com >
Reviewed-by: Ye Ting <ting.ye@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14481 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-17 07:53:04 +00:00
b7d320f811
Add new interfaces to support PKCS7#7 signed data and authenticode signature. Update Cryptest to validate functionality of new interfaces.
...
Signed-off-by: tye1
Reviewed-by: hhuan13
Reviewed-by: qlong
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12142 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-16 06:46:52 +00:00
97f98500c1
Add CryptoPkg (from UDK2010.UP3)
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10987 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-01 06:30:58 +00:00