VLC  3.0.21
update.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * update.h: VLC PGP update private API
3  *****************************************************************************
4  * Copyright © 2007-2008 VLC authors and VideoLAN
5  *
6  * Authors: Rafaël Carré <funman@videolanorg>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either release 2 of the License, or
11  * (at your option) any later release.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22 
23 #include <vlc_update.h>
24 #include <vlc_atomic.h>
25 
26 enum /* Packet types */
27 {
28  SIGNATURE_PACKET = 0x02,
29  PUBLIC_KEY_PACKET = 0x06,
30  USER_ID_PACKET = 0x0d
31 };
32 
33 enum /* Signature types */
34 {
36  TEXT_SIGNATURE = 0x01,
37 
38  /* Public keys signatures */
39  GENERIC_KEY_SIGNATURE = 0x10, /* No assumption of verification */
40  PERSONA_KEY_SIGNATURE = 0x11, /* No verification has been made */
41  CASUAL_KEY_SIGNATURE = 0x12, /* Some casual verification */
42  POSITIVE_KEY_SIGNATURE = 0x13 /* Substantial verification */
43 };
44 
45 enum /* Signature subpacket types */
46 {
48 };
49 
51 {
52 
53  uint8_t version; /* we use only version 4 */
54  uint8_t timestamp[4]; /* creation time of the key */
55  uint8_t algo; /* DSA or RSA */
56 
57  /* the multi precision integers, with their 2 bytes length header */
58  union {
59  struct {
60  uint8_t p[2+3072/8];
61  uint8_t q[2+256/8];
62  uint8_t g[2+3072/8];
63  uint8_t y[2+3072/8];
64  } dsa ;
65  struct {
66  uint8_t n[2+4096/8];
67  uint8_t e[2+4096/8];
68  } rsa;
69  } sig;
70 };
71 
72 /* used for public key and file signatures */
73 struct signature_packet_t
74 {
75  uint8_t version; /* 3 or 4 */
76 
77  uint8_t type;
78  uint8_t public_key_algo; /* DSA or RSA */
79  uint8_t digest_algo;
80 
81  uint8_t hash_verification[2];
82  uint8_t issuer_longid[8];
83 
84  union /* version specific data */
85  {
86  struct
87  {
88  uint8_t hashed_data_len[2]; /* scalar number */
89  uint8_t *hashed_data; /* hashed_data_len bytes */
90  uint8_t unhashed_data_len[2]; /* scalar number */
91  uint8_t *unhashed_data; /* unhashed_data_len bytes */
92  } v4;
93  struct
94  {
95  uint8_t hashed_data_len; /* MUST be 5 */
96  uint8_t timestamp[4]; /* 4 bytes scalar number */
97  } v3;
98  } specific;
99 
100 /* The part below is made of consecutive MPIs, their number and size being
101  * public-key-algorithm dependent.
102  */
103  union {
104  struct {
105  uint8_t r[2+256/8];
106  uint8_t s[2+256/8];
107  } dsa;
108  struct {
109  uint8_t s[2+4096/8];
110  } rsa;
111  } algo_specific;
112 };
113 
116 
117 struct public_key_t
118 {
119  uint8_t longid[8]; /* Long id */
120  uint8_t *psz_username; /* USER ID */
121 
122  public_key_packet_t key; /* Public key packet */
123 
124  signature_packet_t sig; /* Signature packet, by the embedded key */
125 };
126 
127 typedef struct public_key_t public_key_t;
128 
129 /**
130  * Non blocking binary download
131  */
132 typedef struct
133 {
135 
137  atomic_bool aborted;
138  update_t *p_update;
139  char *psz_destdir;
141 
142 /**
143  * Non blocking update availability verification
144  */
145 typedef struct
146 {
148 
149  update_t *p_update;
150  void (*pf_callback)( void *, bool );
151  void *p_data;
153 
154 /**
155  * The update object. Stores (and caches) all information relative to updates
156  */
157 struct update_t
158 {
161  struct update_release_t release; ///< Release (version)
165 };
166 
167 /*
168  * download a public key (the last one) from videolan server, and parse it
169  */
170 public_key_t *
172  vlc_object_t *p_this, const uint8_t *p_longid,
173  const uint8_t *p_signature_issuer );
174 
175 /*
176  * fill a public_key_t with public key data, including:
177  * * public key packet
178  * * signature packet issued by key which long id is p_sig_issuer
179  * * user id packet
180  */
181 int
183  const uint8_t *p_key_data, size_t i_key_len, public_key_t *p_key,
184  const uint8_t *p_sig_issuer );
185 
186 /*
187  * Verify an OpenPGP signature made on some hash, with some public key
188  */
189 int
191  uint8_t *p_hash );
192 
193 /*
194  * Download the signature associated to a document or a binary file.
195  * We're given the file's url, we just append ".asc" to it and download
196  */
197 int
199  vlc_object_t *p_this, signature_packet_t *p_sig, const char *psz_url );
200 
201 /*
202  * return a hash of a text
203  */
204 uint8_t *
206  const char *psz_text, signature_packet_t *p_sig );
207 
208 /*
209  * return a hash of a file
210  */
211 uint8_t *
213  const char *psz_file, signature_packet_t *p_sig );
214 
215 /*
216  * return a hash of a public key
217  */
218 uint8_t *
text_style_Merge
void text_style_Merge(text_style_t *p_dst, const text_style_t *p_src, bool b_override)
Merge two styles using non default values.
Definition: text_style.c:97
STYLE_NO_DEFAULTS
#define STYLE_NO_DEFAULTS
Definition: vlc_text_style.h:85
signature_packet_t::v4
struct signature_packet_t::@61::@63 v4
text_style_Create
text_style_t * text_style_Create(int i_defaults)
Create a text style.
Definition: text_style.c:38
vlc_fopen
FILE * vlc_fopen(const char *filename, const char *mode)
Opens a FILE pointer.
Definition: filesystem.c:46
STYLE_HAS_BACKGROUND_ALPHA
#define STYLE_HAS_BACKGROUND_ALPHA
Definition: vlc_text_style.h:95
signature_packet_t::hashed_data_len
uint8_t hashed_data_len[2]
Definition: update.h:87
VLC_COMMON_MEMBERS
#define VLC_COMMON_MEMBERS
Backward compatibility macro.
Definition: vlc_common.h:457
i_value
uint32_t i_value
Definition: vlc_text_style.h:215
vlc_sem_init
void vlc_sem_init(vlc_sem_t *sem, unsigned value)
Initializes a semaphore.
Definition: thread.c:325
vlc_cond_timedwait_daytime
int vlc_cond_timedwait_daytime(vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex, time_t deadline)
Definition: thread.c:297
signature_packet_t::hashed_data
uint8_t * hashed_data
Definition: update.h:88
public_key_packet_t::dsa
struct public_key_packet_t::@58::@59 dsa
vlc_stream_GetSize
static int vlc_stream_GetSize(stream_t *s, uint64_t *size)
Get the size of the stream.
Definition: vlc_stream.h:313
vlc_restorecancel
void vlc_restorecancel(int state)
Restores the cancellation state.
Definition: thread.c:323
vlc_cleanup_push
#define vlc_cleanup_push(routine, arg)
Registers a thread cancellation handler.
Definition: vlc_threads.h:975
vlc_gcrypt_init
static void vlc_gcrypt_init(void)
Definition: vlc_gcrypt.h:28
thread
static thread_local struct vlc_thread * thread
Definition: thread.c:162
strcasecmp
int strcasecmp(const char *, const char *)
public_key_packet_t::rsa
struct public_key_packet_t::@58::@60 rsa
text_segment_t
Text segment for subtitles.
Definition: vlc_text_style.h:131
vlc_dialog_wait_question
#define vlc_dialog_wait_question(a, b, c, d, e, f, g,...)
Definition: vlc_dialog.h:149
update_t::release
struct update_release_t release
Release (version)
Definition: update.h:160
text_segment_New
text_segment_t * text_segment_New(const char *psz_text)
This function will create a new text segment.
Definition: text_style.c:158
mdate
vlc_tick_t mdate(void)
Precision monotonic clock.
Definition: thread.c:406
vlc_sem_destroy
void vlc_sem_destroy(vlc_sem_t *sem)
Deinitializes a semaphore.
Definition: thread.c:331
verify_signature
int verify_signature(signature_packet_t *sign, public_key_packet_t *p_key, uint8_t *p_hash)
Definition: update_crypto.c:586
text_segment_Copy
text_segment_t * text_segment_Copy(text_segment_t *p_src)
This function will copy a text_segment and its chain into a new one.
Definition: text_style.c:208
libvlc_int_t
Definition: vlc_main.h:33
update_GetRelease
update_release_t * update_GetRelease(update_t *p_update)
Definition: update.c:754
update_check_thread_t::thread
vlc_thread_t thread
Definition: update.h:146
vlc_dialog_display_progress
#define vlc_dialog_display_progress(a, b, c, d, e, f,...)
Definition: vlc_dialog.h:185
STYLE_OUTLINE
#define STYLE_OUTLINE
Definition: vlc_text_style.h:103
text_style_t::i_background_alpha
uint8_t i_background_alpha
The transparency of the background.
Definition: vlc_text_style.h:89
text_style_t::i_spacing
int i_spacing
The spaceing between glyphs in pixels.
Definition: vlc_text_style.h:75
text_style_Duplicate
text_style_t * text_style_Duplicate(const text_style_t *p_src)
Duplicate a text style.
Definition: text_style.c:138
vlc_common.h
STYLE_HAS_OUTLINE_COLOR
#define STYLE_HAS_OUTLINE_COLOR
Definition: vlc_text_style.h:90
text_style_t::i_outline_alpha
uint8_t i_outline_alpha
The transparency of the outline.
Definition: vlc_text_style.h:79
update_check_thread_t::pf_callback
void(* pf_callback)(void *, bool)
Definition: update.h:149
VLC_THREAD_PRIORITY_LOW
#define VLC_THREAD_PRIORITY_LOW
Definition: vlc_threads.h:321
text_style_t::i_shadow_width
int i_shadow_width
The width of the shadow in pixels.
Definition: vlc_text_style.h:85
STYLE_HAS_FONT_COLOR
#define STYLE_HAS_FONT_COLOR
Definition: vlc_text_style.h:87
public_key_packet_t::q
uint8_t q[2+256/8]
Definition: update.h:60
msg_Info
#define msg_Info(p_this,...)
Definition: vlc_messages.h:80
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_common.h:150
update_download_thread_t::thread
vlc_thread_t thread
Definition: update.h:135
update_t::p_download
update_download_thread_t * p_download
Definition: update.h:162
text_segment_t::p_next
text_segment_t * p_next
next segment
Definition: vlc_text_style.h:134
size_str
static char * size_str(uint64_t l_size)
Convert a long int size in bytes to a string.
Definition: update.c:475
update_download_thread_t::obj
struct vlc_common_members obj
Definition: update.h:133
signature_packet_t::algo_specific
union signature_packet_t::@62 algo_specific
libvlc_Quit
void libvlc_Quit(libvlc_int_t *p_libvlc)
Posts an exit signal to LibVLC instance.
Definition: exit.c:60
UPDATE_VLC_STATUS_URL
#define UPDATE_VLC_STATUS_URL
Definition: update.c:83
update_t::p_check
update_check_thread_t * p_check
Definition: update.h:163
text_style_t::psz_monofontname
char * psz_monofontname
The name of the mono font.
Definition: vlc_text_style.h:64
STYLE_HAS_FONT_ALPHA
#define STYLE_HAS_FONT_ALPHA
Definition: vlc_text_style.h:88
signature_packet_t::issuer_longid
uint8_t issuer_longid[8]
Definition: update.h:81
text_style_t::i_style_flags
uint16_t i_style_flags
Formatting style flags.
Definition: vlc_text_style.h:67
vlc_sem_post
int vlc_sem_post(vlc_sem_t *sem)
Increments the value of a semaphore.
Definition: thread.c:343
public_key_packet_t::timestamp
uint8_t timestamp[4]
Definition: update.h:53
text_style_Copy
text_style_t * text_style_Copy(text_style_t *p_dst, const text_style_t *p_src)
Copy a text style into another.
Definition: text_style.c:72
GetUpdateFile
static bool GetUpdateFile(update_t *p_update)
Get the update file and parse it p_update has to be locked when calling this function.
Definition: update.c:181
vlc_dialog_id
Definition: dialog.c:102
msleep
#define msleep(d)
Definition: vlc_threads.h:878
vlc_common_members::libvlc
libvlc_int_t * libvlc
LibVLC instance.
Definition: vlc_common.h:445
msg_Dbg
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:86
vlc_stream_NewURL
#define vlc_stream_NewURL(a, b)
Definition: vlc_stream.h:404
text_segment_NewInheritStyle
text_segment_t * text_segment_NewInheritStyle(const text_style_t *p_style)
This function will create a new text segment and duplicates the style passed as argument.
Definition: text_style.c:170
POSITIVE_KEY_SIGNATURE
Definition: update.h:41
_
#define _(str)
Definition: vlc_fixups.h:371
MERGE
#define MERGE(var, fflag)
Definition: text_style.c:89
CASUAL_KEY_SIGNATURE
Definition: update.h:40
update_New
update_t * update_New(vlc_object_t *p_this)
Create a new update VLC struct.
Definition: update.c:102
update_release_t::i_minor
int i_minor
Version minor.
Definition: vlc_update.h:43
vlc_cond_broadcast
void vlc_cond_broadcast(vlc_cond_t *p_condvar)
Wakes up all threads waiting on a condition variable.
Definition: thread.c:262
public_key_t::key
public_key_packet_t key
Definition: update.h:121
vlc_addr_timedwait
bool vlc_addr_timedwait(void *addr, unsigned val, vlc_tick_t delay)
Waits on an address with a time-out.
Definition: thread.c:101
public_key_t::psz_username
uint8_t * psz_username
Definition: update.h:119
vlc_clone
int vlc_clone(vlc_thread_t *th, void *(*entry)(void *), void *data, int priority)
Creates and starts a new thread.
Definition: thread.c:263
public_key_packet_t::p
uint8_t p[2+3072/8]
Definition: update.h:59
update.h
update_CheckReal
static void * update_CheckReal(void *)
Definition: update.c:414
vlc_cond_signal
void vlc_cond_signal(vlc_cond_t *p_condvar)
Wakes up one thread waiting on a condition variable.
Definition: thread.c:256
PERSONA_KEY_SIGNATURE
Definition: update.h:39
parse_public_key
int parse_public_key(const uint8_t *p_key_data, size_t i_key_len, public_key_t *p_key, const uint8_t *p_sig_issuer)
Definition: update_crypto.c:604
vlc_cond_t
pthread_cond_t vlc_cond_t
Condition variable.
Definition: vlc_threads.h:279
vlc_rwlock_unlock
void vlc_rwlock_unlock(vlc_rwlock_t *lock)
Releases a read/write lock.
Definition: thread.c:393
asprintf
int asprintf(char **, const char *,...)
update_t::p_pkey
public_key_t * p_pkey
Definition: update.h:161
signature_packet_t::digest_algo
uint8_t digest_algo
Definition: update.h:78
vlc_cond_timedwait
int vlc_cond_timedwait(vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex, vlc_tick_t deadline)
Waits on a condition variable up to a certain date.
Definition: thread.c:273
vlc_dialog_update_progress_text
#define vlc_dialog_update_progress_text(a, b, c, d,...)
Definition: vlc_dialog.h:227
text_style_t::e_wrapinfo
enum text_style_t::@200 e_wrapinfo
STYLE_HAS_K_BACKGROUND_ALPHA
#define STYLE_HAS_K_BACKGROUND_ALPHA
Definition: vlc_text_style.h:97
signature_packet_t::s
uint8_t s[2+256/8]
Definition: update.h:105
USER_ID_PACKET
Definition: update.h:48
STYLE_HAS_K_BACKGROUND_COLOR
#define STYLE_HAS_K_BACKGROUND_COLOR
Definition: vlc_text_style.h:96
text_style_t::i_features
uint16_t i_features
Feature flags (means non default)
Definition: vlc_text_style.h:66
vlc_cancel_addr_clear
static void vlc_cancel_addr_clear(void *addr)
Definition: vlc_threads.h:1020
text_style_t::i_outline_width
int i_outline_width
The width of the outline in pixels.
Definition: vlc_text_style.h:80
public_key_packet_t::e
uint8_t e[2+4096/8]
Definition: update.h:66
CLOCK_FREQ
#define CLOCK_FREQ
Definition: vlc_config.h:45
text_segment_ChainDelete
void text_segment_ChainDelete(text_segment_t *segment)
This function will destroy a list of text segments allocated by text_segment_New.
Definition: text_style.c:196
vlc_html_color
unsigned int vlc_html_color(const char *psz_value, bool *ok)
Returns an integer representation of an HTML color.
Definition: text_style.c:236
lock
static vlc_mutex_t lock
Definition: interface.c:62
signature_packet_t::timestamp
uint8_t timestamp[4]
Definition: update.h:95
msg_Warn
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:84
signature_packet_t
Definition: update.h:72
STYLE_HAS_OUTLINE_ALPHA
#define STYLE_HAS_OUTLINE_ALPHA
Definition: vlc_text_style.h:91
STYLE_DEFAULT_REL_FONT_SIZE
#define STYLE_DEFAULT_REL_FONT_SIZE
Definition: vlc_text_style.h:115
update_release_t::i_revision
int i_revision
Version revision.
Definition: vlc_update.h:44
vlc_object_release
#define vlc_object_release(a)
Definition: vlc_objects.h:63
update_release_t
Describes an update VLC release number.
Definition: vlc_update.h:40
STYLE_HAS_WRAP_INFO
#define STYLE_HAS_WRAP_INFO
Definition: vlc_text_style.h:98
vlc_rwlock_wrlock
void vlc_rwlock_wrlock(vlc_rwlock_t *lock)
Acquires a read/write lock for writing.
Definition: thread.c:387
vlc_unlink
int vlc_unlink(const char *filename)
Removes a file.
Definition: filesystem.c:180
text_style_t::i_font_color
int i_font_color
The color of the text 0xRRGGBB (native endianness)
Definition: vlc_text_style.h:72
vlc_testcancel
void vlc_testcancel(void)
Issues an explicit deferred cancellation point.
Definition: thread.c:331
TIME_UTC
#define TIME_UTC
Definition: vlc_fixups.h:254
vlc_atomic.h
text_style_t::i_background_color
int i_background_color
The color of the background 0xRRGGBB.
Definition: vlc_text_style.h:88
STYLE_FULLY_SET
#define STYLE_FULLY_SET
Definition: vlc_text_style.h:86
VLC_DIALOG_QUESTION_NORMAL
Definition: vlc_dialog.h:54
vlc_gcrypt.h
EmptyRelease
static void EmptyRelease(update_t *p_update)
Empty the release struct.
Definition: update.c:164
hash_from_public_key
uint8_t * hash_from_public_key(public_key_t *p_pkey)
Definition: update_crypto.c:844
download_key
public_key_t * download_key(vlc_object_t *p_this, const uint8_t *p_longid, const uint8_t *p_signature_issuer)
Definition: update_crypto.c:929
videolan_public_key_longid
static const uint8_t videolan_public_key_longid[8]
Definition: vlc_pgpkey.h:17
timespec_get
int timespec_get(struct timespec *, int)
vlc_interface.h
vlc_dialog_is_cancelled
#define vlc_dialog_is_cancelled(a, b)
Definition: vlc_dialog.h:262
update_DownloadReal
static void * update_DownloadReal(void *)
Definition: update.c:526
vlc_strings.h
public_key_packet_t::algo
uint8_t algo
Definition: update.h:54
signature_packet_t::rsa
struct signature_packet_t::@62::@66 rsa
public_key_packet_t::version
uint8_t version
Definition: update.h:52
update_Check
void update_Check(update_t *p_update, void(*pf_callback)(void *, bool), void *p_data)
Check for updates.
Definition: update.c:392
PUBLIC_KEY_PACKET
Definition: update.h:47
text_style_t::i_font_size
int i_font_size
The font size in pixels.
Definition: vlc_text_style.h:71
STYLE_HAS_SHADOW_COLOR
#define STYLE_HAS_SHADOW_COLOR
Definition: vlc_text_style.h:92
vlc_rwlock_init
void vlc_rwlock_init(vlc_rwlock_t *lock)
Initializes a read/write lock.
Definition: thread.c:369
GENERIC_KEY_SIGNATURE
Definition: update.h:38
vlc_cond_init_daytime
void vlc_cond_init_daytime(vlc_cond_t *p_condvar)
Initializes a condition variable (wall clock).
Definition: thread.c:222
vlc_sem_wait
void vlc_sem_wait(vlc_sem_t *sem)
Waits on a semaphore.
Definition: thread.c:357
text_style_New
text_style_t * text_style_New(void)
Create a default text style.
Definition: text_style.c:33
psz_name
const char * psz_name
Definition: vlc_codecs.h:315
STYLE_ALPHA_OPAQUE
#define STYLE_ALPHA_OPAQUE
Definition: vlc_text_style.h:81
vlc_thread_t
Thread handle.
Definition: vlc_threads.h:252
update_release_t::psz_desc
char * psz_desc
Release description.
Definition: vlc_update.h:47
vlc_mutex_init
void vlc_mutex_init(vlc_mutex_t *p_mutex)
Initializes a fast mutex.
Definition: thread.c:85
text_segment_Delete
void text_segment_Delete(text_segment_t *segment)
Delete a text segment and its content.
Definition: text_style.c:186
public_key_packet_t::y
uint8_t y[2+3072/8]
Definition: update.h:62
stream_t
stream_t definition
Definition: vlc_stream.h:46
STYLE_HAS_BACKGROUND_COLOR
#define STYLE_HAS_BACKGROUND_COLOR
Definition: vlc_text_style.h:94
vlc_cleanup_pop
#define vlc_cleanup_pop()
Unregisters the last cancellation handler.
Definition: vlc_threads.h:983
text_style_Delete
void text_style_Delete(text_style_t *p_style)
Delete a text style created by text_style_New or text_style_Duplicate.
Definition: text_style.c:149
update_Download
void update_Download(update_t *p_update, const char *psz_destdir)
Download the file given in the update_t.
Definition: update.c:500
text_style_t::i_font_alpha
uint8_t i_font_alpha
The transparency of the text.
Definition: vlc_text_style.h:74
update_check_thread_t::p_data
void * p_data
Definition: update.h:150
static_assert
#define static_assert
Definition: vlc_fixups.h:367
vlc_rwlock_destroy
void vlc_rwlock_destroy(vlc_rwlock_t *lock)
Destroys an initialized unused read/write lock.
Definition: thread.c:375
signature_packet_t::r
uint8_t r[2+256/8]
Definition: update.h:104
text_style_t::i_shadow_alpha
uint8_t i_shadow_alpha
The transparency of the shadow.
Definition: vlc_text_style.h:84
update_release_t::psz_url
char * psz_url
Download URL.
Definition: vlc_update.h:46
text_style_t::i_shadow_color
int i_shadow_color
The color of the shadow 0xRRGGBB.
Definition: vlc_text_style.h:83
vlc_stream_Read
ssize_t vlc_stream_Read(stream_t *s, void *buf, size_t len)
Reads data from a byte stream.
Definition: stream.c:453
public_key_t::sig
signature_packet_t sig
Definition: update.h:123
text_style_t::i_outline_color
int i_outline_color
The color of the outline 0xRRGGBB.
Definition: vlc_text_style.h:78
vlc_fs.h
update_t::p_libvlc
libvlc_int_t * p_libvlc
Definition: update.h:158
dialog_FatalWait
#define dialog_FatalWait(p_obj, psz_title, psz_fmt,...)
Definition: update.c:88
update_release_t::i_extra
int i_extra
Version extra.
Definition: vlc_update.h:45
text_style_t
Text style.
Definition: vlc_text_style.h:39
signature_packet_t::public_key_algo
uint8_t public_key_algo
Definition: update.h:77
text_segment_t::style
text_style_t * style
style applied to this segment
Definition: vlc_text_style.h:133
likely
#define likely(p)
Definition: vlc_common.h:113
vlc_object_t
The main vlc_object_t structure.
Definition: vlc_objects.h:39
vlc_savecancel
int vlc_savecancel(void)
Disables thread cancellation.
Definition: thread.c:313
public_key_t
Definition: update.h:116
update_t
The update object.
Definition: update.h:156
vlc_stream.h
vlc_mutex_t
pthread_mutex_t vlc_mutex_t
Mutex.
Definition: vlc_threads.h:267
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:353
p_html_colors
static const struct @199 p_html_colors[]
signature_packet_t::v3
struct signature_packet_t::@61::@64 v3
FREENULL
#define FREENULL(a)
Definition: vlc_common.h:770
strdup
char * strdup(const char *)
psz_value
char psz_value[8]
Definition: vout_intf.c:91
vlc_update.h
vlc_custom_create
#define vlc_custom_create(o, s, n)
Definition: libvlc.h:108
text_style_t::psz_fontname
char * psz_fontname
The name of the font.
Definition: vlc_text_style.h:63
hash_from_file
uint8_t * hash_from_file(const char *psz_file, signature_packet_t *p_sig)
Definition: update_crypto.c:824
vlc_cond_destroy
void vlc_cond_destroy(vlc_cond_t *p_condvar)
Deinitializes a condition variable.
Definition: thread.c:228
vlc_addr_broadcast
void vlc_addr_broadcast(void *addr)
Wakes up all thread on an address.
Definition: thread.c:91
update_NeedUpgrade
bool update_NeedUpgrade(update_t *p_update)
Definition: update.c:434
vlc_cond_init
void vlc_cond_init(vlc_cond_t *p_condvar)
Initializes a condition variable.
Definition: thread.c:216
hash_from_text
uint8_t * hash_from_text(const char *psz_text, signature_packet_t *p_sig)
Definition: update_crypto.c:789
STYLE_HAS_SHADOW_ALPHA
#define STYLE_HAS_SHADOW_ALPHA
Definition: vlc_text_style.h:93
vlc_cond_wait
void vlc_cond_wait(vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
Waits on a condition variable.
Definition: thread.c:267
vlc_rwlock_t
pthread_rwlock_t vlc_rwlock_t
Read/write lock.
Definition: vlc_threads.h:304
public_key_packet_t::g
uint8_t g[2+3072/8]
Definition: update.h:61
update_t::lock
vlc_mutex_t lock
Definition: update.h:159
download_signature
int download_signature(vlc_object_t *p_this, signature_packet_t *p_sig, const char *psz_url)
Definition: update_crypto.c:994
ISSUER_SUBPACKET
Definition: update.h:46
vlc_addr_signal
void vlc_addr_signal(void *addr)
Wakes up one thread on an address.
Definition: thread.c:86
text_style_t::i_karaoke_background_color
int i_karaoke_background_color
Background color for karaoke 0xRRGGBB.
Definition: vlc_text_style.h:90
vlc_mutex_destroy
void vlc_mutex_destroy(vlc_mutex_t *p_mutex)
Deinitializes a mutex.
Definition: thread.c:110
update_download_thread_t
Non blocking binary download.
Definition: update.h:131
update_check_thread_t
Non blocking update availability verification.
Definition: update.h:144
public_key_packet_t::n
uint8_t n[2+4096/8]
Definition: update.h:65
signature_packet_t::specific
union signature_packet_t::@61 specific
vlc_mutex_unlock
void vlc_mutex_unlock(vlc_mutex_t *p_mutex)
Releases a mutex.
Definition: thread.c:138
public_key_t::longid
uint8_t longid[8]
Definition: update.h:118
VLC_MAX_MUTEX
Definition: vlc_threads.h:1060
unlikely
#define unlikely(p)
Definition: vlc_common.h:114
STYLE_DEFAULT_FONT_SIZE
#define STYLE_DEFAULT_FONT_SIZE
Definition: vlc_text_style.h:114
text_style_t::f_font_relsize
float f_font_relsize
The font size in video height %.
Definition: vlc_text_style.h:70
BINARY_SIGNATURE
Definition: update.h:34
TEXT_SIGNATURE
Definition: update.h:35
update_download_thread_t::aborted
atomic_bool aborted
Definition: update.h:136
signature_packet_t::unhashed_data_len
uint8_t unhashed_data_len[2]
Definition: update.h:89
vlc_sem_t
sem_t vlc_sem_t
Semaphore.
Definition: vlc_threads.h:297
vlc_rwlock_rdlock
void vlc_rwlock_rdlock(vlc_rwlock_t *lock)
Acquires a read/write lock for reading.
Definition: thread.c:381
update_release_t::i_major
int i_major
Version major.
Definition: vlc_update.h:42
signature_packet_t::type
uint8_t type
Definition: update.h:76
SIGNATURE_PACKET
Definition: update.h:46
timespec
Definition: vlc_fixups.h:443
signature_packet_t::version
uint8_t version
Definition: update.h:74
MERGE_SIZE
#define MERGE_SIZE(var)
Definition: text_style.c:93
signature_packet_t::unhashed_data
uint8_t * unhashed_data
Definition: update.h:90
vlc_text_style.h
public_key_packet_t::sig
union public_key_packet_t::@58 sig
VLC_OBJECT
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition: vlc_common.h:468
vlc_dialog_release
#define vlc_dialog_release(a, b)
Definition: vlc_dialog.h:251
signature_packet_t::dsa
struct signature_packet_t::@62::@65 dsa
update_download_thread_t::psz_destdir
char * psz_destdir
Definition: update.h:138
text_style_t::i_karaoke_background_alpha
uint8_t i_karaoke_background_alpha
The transparency of the karaoke bg.
Definition: vlc_text_style.h:91
signature_packet_t::hash_verification
uint8_t hash_verification[2]
Definition: update.h:80
mwait
#define mwait(d)
Definition: vlc_threads.h:879
text_segment_t::psz_text
char * psz_text
text string of the segment
Definition: vlc_text_style.h:132
vlc_cancel_addr_set
static void vlc_cancel_addr_set(void *addr)
Definition: vlc_threads.h:1015
videolan_public_key
static const uint8_t videolan_public_key[]
Definition: vlc_pgpkey.h:22
VLC_STATIC_MUTEX
#define VLC_STATIC_MUTEX
Static initializer for (static) mutex.
Definition: vlc_threads.h:272
update_download_thread_t::p_update
update_t * p_update
Definition: update.h:137
vlc_addr_wait
void vlc_addr_wait(void *addr, unsigned val)
Waits on an address.
Definition: thread.c:96
update_check_thread_t::p_update
update_t * p_update
Definition: update.h:148
vlc_mutex_lock
void vlc_mutex_lock(vlc_mutex_t *p_mutex)
Acquires a mutex.
Definition: thread.c:123
update_Delete
void update_Delete(update_t *p_update)
Delete an update_t struct.
Definition: update.c:132
public_key_packet_t
Definition: update.h:49
vlc_dialog.h
msg_Err
#define msg_Err(p_this,...)
Definition: vlc_messages.h:82
vlc_object_t::obj
struct vlc_common_members obj
Definition: vlc_objects.h:42
vlc_pgpkey.h
vlc_join
void vlc_join(vlc_thread_t handle, void **result)
Waits for a thread to complete (if needed), then destroys it.
Definition: thread.c:270
vlc_global_mutex
void vlc_global_mutex(unsigned n, bool acquire)
Internal handler for global mutexes.
Definition: threads.c:31
mutex_cleanup_push
#define mutex_cleanup_push(lock)
Definition: vlc_threads.h:1013
vlc_stream_Delete
void vlc_stream_Delete(stream_t *s)
Destroy a stream.
Definition: stream.c:120