Skip to content

Commit c5e1a91

Browse files
committed
checkout submodules and disable MacOS build
1 parent 2c9b6aa commit c5e1a91

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
- ubuntu-22.04-arm
1111
- ubuntu-24.04
1212
- ubuntu-24.04-arm
13-
- macos-13
14-
- macos-14
15-
- macos-15
13+
#- macos-13
14+
#- macos-14
15+
#- macos-15
1616
#- windows-2019
1717
steps:
1818
- name: Install system dependencies (Ubuntu)
@@ -45,6 +45,7 @@ jobs:
4545
uses: actions/checkout@v4
4646
with:
4747
fetch-depth: 0
48+
submodules: true
4849
- name: Test (Posix)
4950
if: runner.os != 'Windows'
5051
run: |

git-incrypt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import pygit2
3535

3636
plugin = ctypes.cdll.LoadLibrary(os.path.join(os.path.dirname(__file__),
3737
'incrypt-plugin.so'))
38-
plugin.setkey.argtypes = [ctypes.c_void_p]
38+
plugin.setcryptkey.argtypes = [ctypes.c_void_p]
3939
plugin.encryptdata.argtypes = [
4040
ctypes.c_void_p, ctypes.c_size_t,
4141
ctypes.c_void_p, ctypes.POINTER(ctypes.c_size_t)]
@@ -77,7 +77,7 @@ decrypt the repository using
7777

7878
def encryptdata(data: bytes, key: bytes) -> (bytes, bytes):
7979
'encrypt raw data'
80-
plugin.setkey(key)
80+
plugin.setcryptkey(key)
8181
output = ctypes.create_string_buffer(len(data) + 16)
8282
poutput = ctypes.c_void_p(ctypes.addressof(output))
8383
outlen = ctypes.c_size_t(0)
@@ -88,7 +88,7 @@ def encryptdata(data: bytes, key: bytes) -> (bytes, bytes):
8888

8989
def decryptdata(ciphertext: bytes, key: bytes) -> bytes:
9090
'decrypt raw data'
91-
plugin.setkey(key)
91+
plugin.setcryptkey(key)
9292
output = ctypes.create_string_buffer(len(ciphertext) + 16)
9393
poutput = ctypes.c_void_p(ctypes.addressof(output))
9494
outlen = ctypes.c_size_t(0)
@@ -99,7 +99,7 @@ def decryptdata(ciphertext: bytes, key: bytes) -> bytes:
9999

100100
def encryptrefname(ref, key):
101101
'encrypt a refname'
102-
plugin.setkey(key)
102+
plugin.setcryptkey(key)
103103
output = ctypes.create_string_buffer(
104104
math.ceil((20 + len(ref) + 16) * 4 / 3) + 1)
105105
poutput = ctypes.c_void_p(ctypes.addressof(output))
@@ -109,7 +109,7 @@ def encryptrefname(ref, key):
109109

110110
def decryptrefname(ref, key):
111111
'decrypt a refname'
112-
plugin.setkey(key)
112+
plugin.setcryptkey(key)
113113
output = ctypes.create_string_buffer(math.floor(len(ref) * 3 / 4) - 20 + 1)
114114
poutput = ctypes.c_void_p(ctypes.addressof(output))
115115
plugin.decryptrefname(ref.encode('utf-8'), poutput)
@@ -119,7 +119,7 @@ def decryptrefname(ref, key):
119119
# pylint: disable=pointless-string-statement
120120
'''
121121
mykey = b'x123456789abcdefy123456789abcdefz123456789abcdef'
122-
plugin.setkey(mykey)
122+
plugin.setcryptkey(mykey)
123123
orig = 'o?o?o?~~~a'
124124
print(orig)
125125
encoded = encryptrefname(orig, mykey)

incrypt-plugin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "git-compat-util.h"
1010
#include "hash.h"
1111

12-
void setkey(const unsigned char* k);
12+
void setcryptkey(const unsigned char* k);
1313
unsigned char* encryptdata(const unsigned char* input, size_t inputlen,
1414
unsigned char* output, size_t* outputlen);
1515
unsigned char* decryptdata(const unsigned char* input, size_t inputlen,
@@ -19,7 +19,7 @@ char* decryptrefname(const char* input, char* output);
1919

2020
static unsigned char key[48];
2121

22-
void setkey(const unsigned char* k) {
22+
void setcryptkey(const unsigned char* k) {
2323
memcpy(key, k, 48);
2424
}
2525

0 commit comments

Comments
 (0)