void-packages/srcpkgs/kdelibs4support/patches/ksslcertificate.patch
Đoàn Trần Công Danh dd9d4a1979 srcpkgs/k*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

71 lines
1.8 KiB
Diff

--- a/src/kssl/ksslcertificate.cpp 2017-11-05 01:28:12.000000000 -0700
+++ b/src/kssl/ksslcertificate.cpp 2017-11-13 01:45:27.716000000 -0700
@@ -168,7 +168,7 @@
return rc;
}
rc = t;
- d->kossl->OPENSSL_free(t);
+ d->kossl->OPENSSL_sk_free(t);
#endif
return rc;
}
@@ -356,12 +356,12 @@
rc += x[i];
}
rc += '\n';
- d->kossl->OPENSSL_free(x);
+ d->kossl->OPENSSL_sk_free(x);
x = d->kossl->BN_bn2hex(e);
rc += i18n("Exponent: 0x") + QLatin1String(x) +
QLatin1String("\n");
- d->kossl->OPENSSL_free(x);
+ d->kossl->OPENSSL_sk_free(x);
}
#endif
#ifndef NO_DSA
@@ -383,7 +383,7 @@
rc += x[i];
}
rc += '\n';
- d->kossl->OPENSSL_free(x);
+ d->kossl->OPENSSL_sk_free(x);
x = d->kossl->BN_bn2hex(q);
rc += i18n("160 bit prime factor: ");
@@ -396,7 +396,7 @@
rc += x[i];
}
rc += '\n';
- d->kossl->OPENSSL_free(x);
+ d->kossl->OPENSSL_sk_free(x);
x = d->kossl->BN_bn2hex(g);
rc += QString("g: ");
@@ -409,7 +409,7 @@
rc += x[i];
}
rc += '\n';
- d->kossl->OPENSSL_free(x);
+ d->kossl->OPENSSL_sk_free(x);
const BIGNUM *pub_key;
d->kossl->DSA_get0_key(dsa, &pub_key, nullptr);
@@ -424,7 +424,7 @@
rc += x[i];
}
rc += '\n';
- d->kossl->OPENSSL_free(x);
+ d->kossl->OPENSSL_sk_free(x);
}
#endif
d->kossl->EVP_PKEY_free(pkey);
@@ -446,7 +446,7 @@
}
rc = t;
- d->kossl->OPENSSL_free(t);
+ d->kossl->OPENSSL_sk_free(t);
#endif
return rc;