@@ -164,6 +164,11 @@ echo "Testing 'sign/verify' certificate when in subdir of model directory and us
164
164
165
165
rm -f " $( basename " ${sigfile} " ) "
166
166
mkdir subdir
167
+
168
+ # Create a symlink'ed file
169
+ echo " foo" > subdir/symlinked
170
+ ln -s subdir/symlinked symlink
171
+
167
172
pushd subdir 1> /dev/null || exit 1
168
173
169
174
if ! python -m model_signing \
@@ -173,6 +178,7 @@ if ! python -m model_signing \
173
178
--signing_certificate " ${DIR} /keys/certificate/signing-key-cert.pem" \
174
179
--certificate_chain " ${DIR} /keys/certificate/int-ca-cert.pem" \
175
180
--ignore-paths " ../$( basename " ${ignorefile} " ) " \
181
+ --allow_symlinks \
176
182
.. ; then
177
183
echo " Error: 'sign key' failed"
178
184
exit 1
@@ -185,14 +191,15 @@ if ! python -m model_signing \
185
191
--signature " $( basename " ${sigfile} " ) " \
186
192
--certificate_chain " ${DIR} /keys/certificate/ca-cert.pem" \
187
193
--ignore-paths " $( basename " ${ignorefile} " ) " \
194
+ --allow_symlinks \
188
195
. ; then
189
196
echo " Error: 'sign key' failed"
190
197
exit 1
191
198
fi
192
199
193
200
# Check which files are part of signature
194
201
res=$( get_signed_files " ${sigfile} " )
195
- exp=' ["signme-1","signme-2"]'
202
+ exp=' ["signme-1","signme-2","subdir/symlinked","symlink" ]'
196
203
if [ " ${res} " != " ${exp} " ]; then
197
204
echo " Error: Unexpected files were signed"
198
205
echo " Expected: ${exp} "
0 commit comments