Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pkgar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
pkgar
Commits
24e2a959
Commit
24e2a959
authored
4 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Plain Diff
Merge branch 'libsodium-fix' into 'master'
Libsodium fix See merge request
!5
parents
060de420
47023719
No related branches found
No related tags found
1 merge request
!5
Libsodium fix
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bin.rs
+1
-2
1 addition, 2 deletions
src/bin.rs
test.sh
+14
-4
14 additions, 4 deletions
test.sh
with
15 additions
and
6 deletions
src/bin.rs
+
1
−
2
View file @
24e2a959
...
@@ -191,8 +191,7 @@ pub fn create(secret_path: &str, archive_path: &str, folder: &str) -> Result<(),
...
@@ -191,8 +191,7 @@ pub fn create(secret_path: &str, archive_path: &str, folder: &str) -> Result<(),
//TODO: ensure file size matches
//TODO: ensure file size matches
let
sig
=
unsafe
{
sign
::
sign
(
&
plain
::
as_bytes
(
&
header
)[
64
..
],
&
secret_key
)
};
header
.signature
=
sign
::
sign_detached
(
unsafe
{
&
plain
::
as_bytes
(
&
header
)[
64
..
]
},
&
secret_key
)
.0
;
header
.signature
.copy_from_slice
(
&
sig
);
// Write archive header
// Write archive header
archive_file
.seek
(
SeekFrom
::
Start
(
0
))
archive_file
.seek
(
SeekFrom
::
Start
(
0
))
...
...
This diff is collapsed.
Click to expand it.
test.sh
+
14
−
4
View file @
24e2a959
#!/usr/bin/env bash
#!/usr/bin/env bash
build
=
release
if
[[
"
$1
"
==
"-d"
]]
;
then
build
=
debug
fi
set
-ex
set
-ex
rm
-rf
target/test
rm
-rf
target/test
mkdir
-p
target/test
mkdir
-p
target/test
cargo build
--release
if
[[
"
$build
"
==
debug
]]
;
then
cargo build
else
cargo build
--release
fi
time
target/
release
/pkgar
\
time
target/
$build
/pkgar
\
keygen
\
keygen
\
--secret
target/test/secret.key
\
--secret
target/test/secret.key
\
--public
target/test/public.key
--public
target/test/public.key
time
target/
release
/pkgar
\
time
target/
$build
/pkgar
\
create
\
create
\
--secret
target/test/secret.key
\
--secret
target/test/secret.key
\
--file
target/test/src.pkg
\
--file
target/test/src.pkg
\
src
src
time
target/
release
/pkgar
\
time
target/
$build
/pkgar
\
extract
\
extract
\
--public
target/test/public.key
\
--public
target/test/public.key
\
--file
target/test/src.pkg
\
--file
target/test/src.pkg
\
target/test/src
target/test/src
diff
-ruwN
src target/test/src
diff
-ruwN
src target/test/src
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment