Commit 01f224b8 authored by Rafaël Carré's avatar Rafaël Carré

update: use gcrypt enums, they are mapped to the spec already

parent 03f53a77
......@@ -40,18 +40,6 @@
#include <vlc_update.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 */
{
SIGNATURE_PACKET = 0x02,
......@@ -237,4 +225,3 @@ hash_sha1_from_file(
*/
uint8_t *
hash_sha1_from_public_key( public_key_t *p_pkey );
......@@ -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;
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;
READ_MPI(p_key->p, 1024);
......@@ -282,10 +282,10 @@ static int parse_signature_packet( signature_packet_t *p_sig,
if( i_read == 0 ) /* signature packet parsing has failed */
goto error;
if( p_sig->public_key_algo != PUBLIC_KEY_ALGO_DSA )
if( p_sig->public_key_algo != GCRY_PK_DSA )
goto error;
if( p_sig->digest_algo != DIGEST_ALGO_SHA1 )
if( p_sig->digest_algo != GCRY_MD_SHA1 )
goto error;
switch( p_sig->type )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment