Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
01f224b8
Commit
01f224b8
authored
May 10, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: use gcrypt enums, they are mapped to the spec already
parent
03f53a77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
16 deletions
+3
-16
src/misc/update.h
src/misc/update.h
+0
-13
src/misc/update_crypto.c
src/misc/update_crypto.c
+3
-3
No files found.
src/misc/update.h
View file @
01f224b8
...
@@ -40,18 +40,6 @@
...
@@ -40,18 +40,6 @@
#include <vlc_update.h>
#include <vlc_update.h>
#include <vlc_atomic.h>
#include <vlc_atomic.h>
enum
/* Public key algorithms */
{
/* we will only use DSA public keys */
PUBLIC_KEY_ALGO_DSA
=
0x11
};
enum
/* Digest algorithms */
{
/* and DSA use SHA-1 digest */
DIGEST_ALGO_SHA1
=
0x02
};
enum
/* Packet types */
enum
/* Packet types */
{
{
SIGNATURE_PACKET
=
0x02
,
SIGNATURE_PACKET
=
0x02
,
...
@@ -237,4 +225,3 @@ hash_sha1_from_file(
...
@@ -237,4 +225,3 @@ hash_sha1_from_file(
*/
*/
uint8_t
*
uint8_t
*
hash_sha1_from_public_key
(
public_key_t
*
p_pkey
);
hash_sha1_from_public_key
(
public_key_t
*
p_pkey
);
src/misc/update_crypto.c
View file @
01f224b8
...
@@ -105,7 +105,7 @@ static int parse_public_key_packet( public_key_packet_t *p_key,
...
@@ -105,7 +105,7 @@ static int parse_public_key_packet( public_key_packet_t *p_key,
memcpy
(
p_key
->
timestamp
,
p_buf
,
4
);
p_buf
+=
4
;
i_read
+=
4
;
memcpy
(
p_key
->
timestamp
,
p_buf
,
4
);
p_buf
+=
4
;
i_read
+=
4
;
p_key
->
algo
=
*
p_buf
++
;
i_read
++
;
p_key
->
algo
=
*
p_buf
++
;
i_read
++
;
if
(
p_key
->
algo
!=
PUBLIC_KEY_ALGO
_DSA
)
if
(
p_key
->
algo
!=
GCRY_PK
_DSA
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
READ_MPI
(
p_key
->
p
,
1024
);
READ_MPI
(
p_key
->
p
,
1024
);
...
@@ -282,10 +282,10 @@ static int parse_signature_packet( signature_packet_t *p_sig,
...
@@ -282,10 +282,10 @@ static int parse_signature_packet( signature_packet_t *p_sig,
if
(
i_read
==
0
)
/* signature packet parsing has failed */
if
(
i_read
==
0
)
/* signature packet parsing has failed */
goto
error
;
goto
error
;
if
(
p_sig
->
public_key_algo
!=
PUBLIC_KEY_ALGO
_DSA
)
if
(
p_sig
->
public_key_algo
!=
GCRY_PK
_DSA
)
goto
error
;
goto
error
;
if
(
p_sig
->
digest_algo
!=
DIGEST_ALGO
_SHA1
)
if
(
p_sig
->
digest_algo
!=
GCRY_MD
_SHA1
)
goto
error
;
goto
error
;
switch
(
p_sig
->
type
)
switch
(
p_sig
->
type
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment