summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunchipnacho2021-10-08 22:47:23 -0500
committersunchipnacho2021-10-08 22:47:23 -0500
commitf7dcb7372080db0c149a2c056d5c43d2956da834 (patch)
treed64ada0046124cda898efe60bbaa653894d63380
parent66d376900d032c79e1e23ee5fb63eedfe48414ec (diff)
downloadaur-f7dcb7372080db0c149a2c056d5c43d2956da834.tar.gz
update ldid
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD10
-rw-r--r--password-p12.patch62
3 files changed, 74 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 94315843bb1d..9d2e46518735 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,18 @@
pkgbase = ldid
pkgdesc = a tool used for ad-hoc codesigning iOS binaries - CRKatri's mirror
- pkgver = 2.1.2
- pkgrel = 2
+ pkgver = 2.1.4
+ pkgrel = 1
url = https://git.saurik.com/ldid
arch = x86_64
license = AGPL
- makedepends = clang
depends = openssl
depends = libplist
depends = libxml2
provides = ldid
provides = ldid2
- source = https://github.com/CRKatri/ldid/archive/2.1.2.tar.gz
- md5sums = 8af2d65766f11fef4e90b26a4694c8b6
+ source = https://github.com/sbingner/ldid/archive/v2.1.4.tar.gz
+ source = password-p12.patch
+ b2sums = 1241cfde82259918bc4590b52e23ffc1f955e80ff2095eb9c47d2c465024288748f45b666da50bd6428dbf18ef2ed806845f025ef9dc99d61aad56d256025e66
+ b2sums = 63781c6ebd916356f6c499984a5f48d53042bfcd836d7b13b68b5874d04ca96f17562676509d04176f40833d5381523206c7608e893f14b44078462fe2d1ce3a
pkgname = ldid
-
diff --git a/PKGBUILD b/PKGBUILD
index b6f814be3d79..cb1576d14077 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,21 @@
# Maintainer: Cameron Katri <katri.cameron@gmail.com>
pkgname=ldid
-pkgver=2.1.2
-pkgrel=2
+pkgver=2.1.4
+pkgrel=1
pkgdesc="a tool used for ad-hoc codesigning iOS binaries - CRKatri's mirror"
provides=('ldid' 'ldid2')
arch=('x86_64')
url="https://git.saurik.com/ldid"
license=('AGPL')
depends=('openssl' 'libplist' 'libxml2')
-source=("https://github.com/CRKatri/ldid/archive/$pkgver.tar.gz")
-md5sums=('8af2d65766f11fef4e90b26a4694c8b6')
+source=("https://github.com/sbingner/ldid/archive/v$pkgver.tar.gz" "password-p12.patch")
+b2sums=('1241cfde82259918bc4590b52e23ffc1f955e80ff2095eb9c47d2c465024288748f45b666da50bd6428dbf18ef2ed806845f025ef9dc99d61aad56d256025e66'
+ '63781c6ebd916356f6c499984a5f48d53042bfcd836d7b13b68b5874d04ca96f17562676509d04176f40833d5381523206c7608e893f14b44078462fe2d1ce3a')
build() {
cd ldid-$pkgver
+ patch -p1 < ${srcdir}/password-p12.patch
cc ${CFLAGS} -I. -c -o lookup2.o lookup2.c
c++ ${CXXFLAGS} -std=c++11 -o ldid lookup2.o ldid.cpp -I. -lcrypto -lplist-2.0 -lxml2
}
diff --git a/password-p12.patch b/password-p12.patch
new file mode 100644
index 000000000000..2171e51dd32d
--- /dev/null
+++ b/password-p12.patch
@@ -0,0 +1,62 @@
+From 517bae5ce953cbade73a64cb7a6d91c9af800e7e Mon Sep 17 00:00:00 2001
+From: sunchipnacho <22717474+sunflsks@users.noreply.github.com>
+Date: Fri, 8 Oct 2021 11:59:49 -0500
+Subject: [PATCH] p12 password support
+
+---
+ ldid.cpp | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/ldid.cpp b/ldid.cpp
+index b017ebe..3d01ff4 100644
+--- a/ldid.cpp
++++ b/ldid.cpp
+@@ -47,6 +47,7 @@
+ #include <openssl/pem.h>
+ #include <openssl/pkcs7.h>
+ #include <openssl/pkcs12.h>
++#include <openssl/ui.h>
+ #endif
+
+ #ifdef __APPLE__
+@@ -141,6 +142,10 @@
+ #define _packed \
+ __attribute__((packed))
+
++#ifndef LDID_NOSMIME
++std::string password;
++#endif
++
+ template <typename Type_>
+ struct Iterator_ {
+ typedef typename Type_::const_iterator Result;
+@@ -1784,8 +1789,14 @@ class Stuff {
+ ca_(NULL)
+ {
+ _assert(value_ != NULL);
+- _assert(PKCS12_parse(value_, "", &key_, &cert_, &ca_) != 0);
+
++ if (!PKCS12_verify_mac(value_, "", 0) && password.empty()) {
++ char passbuf[2048];
++ UI_UTIL_read_pw_string(passbuf, 2048, "Enter password: ", 0);
++ password = passbuf;
++ }
++
++ _assert(PKCS12_parse(value_, password.c_str(), &key_, &cert_, &ca_) != 0);
+ _assert(key_ != NULL);
+ _assert(cert_ != NULL);
+
+@@ -3286,6 +3298,10 @@ int main(int argc, char *argv[]) {
+ flag_M = true;
+ break;
+
++ case 'U':
++ password = argv[argi] + 2;
++ break;
++
+ case 'K':
+ if (argv[argi][2] != '\0')
+ key.open(argv[argi] + 2, O_RDONLY, PROT_READ, MAP_PRIVATE);
+--
+2.33.0
+