forked from pool/libica
053908a9ac
Major rework of package to conform to shared library policy, including being renamed from libica2 to libica. Additional bugfixes from previous version. Please also make me the maintainer of the package. OBS-URL: https://build.opensuse.org/request/show/484290 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory/libica?expand=0&rev=1
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
Index: libica-2.6.2/src/s390_prng.c
|
|
===================================================================
|
|
--- libica-2.6.2.orig/src/s390_prng.c
|
|
+++ libica-2.6.2/src/s390_prng.c
|
|
@@ -76,10 +76,9 @@ int s390_prng_init(void)
|
|
// available. However, the old prng is still initialized but
|
|
// only used as a fallback.
|
|
if(sha512_switch || sha512_drng_switch){
|
|
- const char *pers = "ica_drbg_global";
|
|
ica_drbg_instantiate(&ica_drbg_global, 256, true,
|
|
- ICA_DRBG_SHA512, (unsigned char *)pers,
|
|
- strlen(pers));
|
|
+ ICA_DRBG_SHA512,
|
|
+ (unsigned char *)"GLOBAL INSTANCE", 15);
|
|
}
|
|
|
|
// The old prng code starts here:
|
|
@@ -181,7 +180,7 @@ int s390_prng(unsigned char *output_data
|
|
unsigned char *ptr = output_data;
|
|
size_t i = 0;
|
|
for(; i < q; i++){
|
|
- status = ica_drbg_generate(ica_drbg_global, 256, true,
|
|
+ status = ica_drbg_generate(ica_drbg_global, 256, false,
|
|
NULL, 0, ptr,
|
|
ICA_DRBG_SHA512
|
|
->max_no_of_bytes_per_req);
|
|
@@ -191,7 +190,7 @@ int s390_prng(unsigned char *output_data
|
|
ptr += ICA_DRBG_SHA512->max_no_of_bytes_per_req;
|
|
}
|
|
if(!status){
|
|
- status = ica_drbg_generate(ica_drbg_global, 256, true,
|
|
+ status = ica_drbg_generate(ica_drbg_global, 256, false,
|
|
NULL, 0, ptr, r);
|
|
if(!status)
|
|
return 0;
|