mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
all: fix spelling and typos
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
parent
ef540d1af0
commit
54eb375ff1
@ -2751,7 +2751,7 @@ data_hash (unsigned char *data, size_t data_n,
|
|||||||
allow the use of signature algorithms that implement the hashing
|
allow the use of signature algorithms that implement the hashing
|
||||||
internally (e.g. Ed25519). On success the created signature is
|
internally (e.g. Ed25519). On success the created signature is
|
||||||
stored in ssh format at R_SIG and it's size at R_SIGLEN; the caller
|
stored in ssh format at R_SIG and it's size at R_SIGLEN; the caller
|
||||||
must use es_free to releaase this memory. */
|
must use es_free to release this memory. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
data_sign (ctrl_t ctrl, ssh_key_type_spec_t *spec,
|
data_sign (ctrl_t ctrl, ssh_key_type_spec_t *spec,
|
||||||
const void *hash, size_t hashlen,
|
const void *hash, size_t hashlen,
|
||||||
|
@ -195,7 +195,7 @@ has_percent0A_suffix (const char *string)
|
|||||||
string with the passphrase, the buffer may optionally be padded
|
string with the passphrase, the buffer may optionally be padded
|
||||||
with arbitrary characters.
|
with arbitrary characters.
|
||||||
|
|
||||||
If DESC_TEXT is not NULL it can be used as further informtion shown
|
If DESC_TEXT is not NULL it can be used as further information shown
|
||||||
atop of the INFO message.
|
atop of the INFO message.
|
||||||
|
|
||||||
INFO gets displayed as part of a generic string. However if the
|
INFO gets displayed as part of a generic string. However if the
|
||||||
|
@ -851,7 +851,7 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
|
|||||||
|
|
||||||
case oLogFile:
|
case oLogFile:
|
||||||
if (!reread)
|
if (!reread)
|
||||||
return 0; /* not handeld */
|
return 0; /* not handled */
|
||||||
if (!current_logfile || !pargs->r.ret_str
|
if (!current_logfile || !pargs->r.ret_str
|
||||||
|| strcmp (current_logfile, pargs->r.ret_str))
|
|| strcmp (current_logfile, pargs->r.ret_str))
|
||||||
{
|
{
|
||||||
@ -1768,7 +1768,7 @@ main (int argc, char **argv )
|
|||||||
|
|
||||||
/* Unless we are running with a program given on the command
|
/* Unless we are running with a program given on the command
|
||||||
* line we can assume that the inotify things works and thus
|
* line we can assume that the inotify things works and thus
|
||||||
* we can avoid tye regular stat calls. */
|
* we can avoid the regular stat calls. */
|
||||||
if (!argc)
|
if (!argc)
|
||||||
reliable_homedir_inotify = 1;
|
reliable_homedir_inotify = 1;
|
||||||
}
|
}
|
||||||
@ -2108,7 +2108,7 @@ get_agent_scd_notify_event (void)
|
|||||||
GetCurrentProcess(), &h2,
|
GetCurrentProcess(), &h2,
|
||||||
EVENT_MODIFY_STATE|SYNCHRONIZE, TRUE, 0))
|
EVENT_MODIFY_STATE|SYNCHRONIZE, TRUE, 0))
|
||||||
{
|
{
|
||||||
log_error ("setting syncronize for scd notify event failed: %s\n",
|
log_error ("setting synchronize for scd notify event failed: %s\n",
|
||||||
w32_strerror (-1) );
|
w32_strerror (-1) );
|
||||||
CloseHandle (h);
|
CloseHandle (h);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ struct keypair_info_s
|
|||||||
char hexgrip[1]; /* The keygrip (i.e. a hash over the public key
|
char hexgrip[1]; /* The keygrip (i.e. a hash over the public key
|
||||||
parameters) formatted as a hex string.
|
parameters) formatted as a hex string.
|
||||||
Allocated somewhat large to also act as
|
Allocated somewhat large to also act as
|
||||||
memeory for the above ID field. */
|
memory for the above ID field. */
|
||||||
};
|
};
|
||||||
typedef struct keypair_info_s *KEYPAIR_INFO;
|
typedef struct keypair_info_s *KEYPAIR_INFO;
|
||||||
|
|
||||||
|
@ -1109,7 +1109,7 @@ agent_unprotect (ctrl_t ctrl,
|
|||||||
if (!protect_info[infidx].algo)
|
if (!protect_info[infidx].algo)
|
||||||
return gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM);
|
return gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM);
|
||||||
|
|
||||||
/* See wether we have a protected-at timestamp. */
|
/* See whether we have a protected-at timestamp. */
|
||||||
protect_list = s; /* Save for later. */
|
protect_list = s; /* Save for later. */
|
||||||
if (protected_at)
|
if (protected_at)
|
||||||
{
|
{
|
||||||
|
@ -408,7 +408,7 @@ static void
|
|||||||
store_alias( ARGPARSE_ARGS *arg, char *name, char *value )
|
store_alias( ARGPARSE_ARGS *arg, char *name, char *value )
|
||||||
{
|
{
|
||||||
/* TODO: replace this dummy function with a rea one
|
/* TODO: replace this dummy function with a rea one
|
||||||
* and fix the probelms IRIX has with (ALIAS_DEV)arg..
|
* and fix the problems IRIX has with (ALIAS_DEV)arg..
|
||||||
* used as lvalue
|
* used as lvalue
|
||||||
*/
|
*/
|
||||||
(void)arg;
|
(void)arg;
|
||||||
@ -439,7 +439,7 @@ ignore_invalid_option_p (ARGPARSE_ARGS *arg, const char *keyword)
|
|||||||
|
|
||||||
/* Add the keywords up to the next LF to the list of to be ignored
|
/* Add the keywords up to the next LF to the list of to be ignored
|
||||||
options. After returning FP will either be at EOF or the next
|
options. After returning FP will either be at EOF or the next
|
||||||
character read wll be the first of a new line. The function
|
character read will be the first of a new line. The function
|
||||||
returns 0 on success or true on malloc failure. */
|
returns 0 on success or true on malloc failure. */
|
||||||
static int
|
static int
|
||||||
ignore_invalid_option_add (ARGPARSE_ARGS *arg, FILE *fp)
|
ignore_invalid_option_add (ARGPARSE_ARGS *arg, FILE *fp)
|
||||||
@ -1280,7 +1280,7 @@ long_opt_strlen( ARGPARSE_OPTS *o )
|
|||||||
* this option
|
* this option
|
||||||
* - a description,ine which starts with a '@' and is followed by
|
* - a description,ine which starts with a '@' and is followed by
|
||||||
* any other characters is printed as is; this may be used for examples
|
* any other characters is printed as is; this may be used for examples
|
||||||
* ans such.
|
* and such.
|
||||||
* - A description which starts with a '|' outputs the string between this
|
* - A description which starts with a '|' outputs the string between this
|
||||||
* bar and the next one as arguments of the long option.
|
* bar and the next one as arguments of the long option.
|
||||||
*/
|
*/
|
||||||
|
@ -177,7 +177,7 @@ bin2hexcolon (const void *buffer, size_t length, char *stringbuf)
|
|||||||
string or a white space character. The function makes sure that
|
string or a white space character. The function makes sure that
|
||||||
the resulting string in BUFFER is terminated by a Nul byte. Note
|
the resulting string in BUFFER is terminated by a Nul byte. Note
|
||||||
that the returned string may include embedded Nul bytes; the extra
|
that the returned string may include embedded Nul bytes; the extra
|
||||||
Nul byte at the end is used to make sure tha the result can always
|
Nul byte at the end is used to make sure that the result can always
|
||||||
be used as a C-string.
|
be used as a C-string.
|
||||||
|
|
||||||
BUFSIZE is the available length of BUFFER; if the converted result
|
BUFSIZE is the available length of BUFFER; if the converted result
|
||||||
|
@ -140,7 +140,7 @@
|
|||||||
you pass (0) instead of (-1) the function does not wait in case the
|
you pass (0) instead of (-1) the function does not wait in case the
|
||||||
file is already locked but returns -1 and sets ERRNO to EACCES.
|
file is already locked but returns -1 and sets ERRNO to EACCES.
|
||||||
Any other positive value for the second parameter is considered a
|
Any other positive value for the second parameter is considered a
|
||||||
timeout valuie in milliseconds.
|
timeout value in milliseconds.
|
||||||
|
|
||||||
To release the lock you call:
|
To release the lock you call:
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@
|
|||||||
|
|
||||||
/*-- End configurable part. --*/
|
/*-- End configurable part. --*/
|
||||||
|
|
||||||
/* The size of the iobuffers. This can be chnages using the
|
/* The size of the iobuffers. This can be changed using the
|
||||||
* iobuf_set_buffer_size fucntion. */
|
* iobuf_set_buffer_size function. */
|
||||||
static unsigned int iobuf_buffer_size = DEFAULT_IOBUF_BUFFER_SIZE;
|
static unsigned int iobuf_buffer_size = DEFAULT_IOBUF_BUFFER_SIZE;
|
||||||
|
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ openpgp_oid_from_str (const char *string, gcry_mpi_t *r_mpi)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return a malloced string represenation of the OID in the opaque MPI
|
/* Return a malloced string representation of the OID in the opaque MPI
|
||||||
A. In case of an error NULL is returned and ERRNO is set. */
|
A. In case of an error NULL is returned and ERRNO is set. */
|
||||||
char *
|
char *
|
||||||
openpgp_oid_to_str (gcry_mpi_t a)
|
openpgp_oid_to_str (gcry_mpi_t a)
|
||||||
@ -221,7 +221,7 @@ openpgp_oid_to_str (gcry_mpi_t a)
|
|||||||
|
|
||||||
/* To calculate the length of the string we can safely assume an
|
/* To calculate the length of the string we can safely assume an
|
||||||
upper limit of 3 decimal characters per byte. Two extra bytes
|
upper limit of 3 decimal characters per byte. Two extra bytes
|
||||||
account for the special first octect */
|
account for the special first octet */
|
||||||
string = p = xtrymalloc (length*(1+3)+2+1);
|
string = p = xtrymalloc (length*(1+3)+2+1);
|
||||||
if (!string)
|
if (!string)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
failure.
|
failure.
|
||||||
|
|
||||||
Note that we also escape the quote character to work around a bug
|
Note that we also escape the quote character to work around a bug
|
||||||
in the mingw32 runtime which does not correcty handle command line
|
in the mingw32 runtime which does not correctly handle command line
|
||||||
quoting. We correctly double the quote mark when calling a program
|
quoting. We correctly double the quote mark when calling a program
|
||||||
(i.e. gpg-protect-tool), but the pre-main code does not notice the
|
(i.e. gpg-protect-tool), but the pre-main code does not notice the
|
||||||
double quote as an escaped quote. We do this also on POSIX systems
|
double quote as an escaped quote. We do this also on POSIX systems
|
||||||
|
@ -303,7 +303,7 @@ make_simple_sexp_from_hexstr (const char *line, size_t *nscanned)
|
|||||||
for (; n > 1; n -=2, s += 2)
|
for (; n > 1; n -=2, s += 2)
|
||||||
*p++ = xtoi_2 (s);
|
*p++ = xtoi_2 (s);
|
||||||
*p++ = ')';
|
*p++ = ')';
|
||||||
*p = 0; /* (Not really neaded.) */
|
*p = 0; /* (Not really needed.) */
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Name of the socket to be used. This is a kludge to keep on using
|
/* Name of the socket to be used. This is a kludge to keep on using
|
||||||
the existsing code despite that we only support a standard socket. */
|
the existing code despite that we only support a standard socket. */
|
||||||
static char *default_gpg_agent_info;
|
static char *default_gpg_agent_info;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1400,7 +1400,7 @@ parse_version_number (const char *s, int *number)
|
|||||||
|
|
||||||
|
|
||||||
/* This function breaks up the complete string-representation of the
|
/* This function breaks up the complete string-representation of the
|
||||||
version number S, which is of the following struture: <major
|
version number S, which is of the following structure: <major
|
||||||
number>.<minor number>[.<micro number>]<patch level>. The major,
|
number>.<minor number>[.<micro number>]<patch level>. The major,
|
||||||
minor, and micro number components will be stored in *MAJOR, *MINOR
|
minor, and micro number components will be stored in *MAJOR, *MINOR
|
||||||
and *MICRO. If MICRO is not given 0 is used instead.
|
and *MICRO. If MICRO is not given 0 is used instead.
|
||||||
|
@ -131,7 +131,7 @@ test_close_all_fds (void)
|
|||||||
free (array);
|
free (array);
|
||||||
|
|
||||||
/* Now let's check the realloc we use. We do this and the next
|
/* Now let's check the realloc we use. We do this and the next
|
||||||
tests only if we are allowed to open enought descriptors. */
|
tests only if we are allowed to open enough descriptors. */
|
||||||
if (get_max_fds () > 32)
|
if (get_max_fds () > 32)
|
||||||
{
|
{
|
||||||
int except[] = { 20, 23, 24, -1 };
|
int except[] = { 20, 23, 24, -1 };
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
length, meaning that corresponding hash table is empty.
|
length, meaning that corresponding hash table is empty.
|
||||||
|
|
||||||
Right after toc section, data section follows without any
|
Right after toc section, data section follows without any
|
||||||
alingment. It consists of series of records, each is a key length,
|
alignment. It consists of series of records, each is a key length,
|
||||||
value (data) length, key and value. Again, key and value length
|
value (data) length, key and value. Again, key and value length
|
||||||
are 4-byte unsigned integers. Each next record follows previous
|
are 4-byte unsigned integers. Each next record follows previous
|
||||||
without any special alignment.
|
without any special alignment.
|
||||||
@ -52,7 +52,7 @@
|
|||||||
beginning of a table). When hash value in question is found in
|
beginning of a table). When hash value in question is found in
|
||||||
hash table, look to key of corresponding record, comparing it with
|
hash table, look to key of corresponding record, comparing it with
|
||||||
key in question. If them of the same length and equals to each
|
key in question. If them of the same length and equals to each
|
||||||
other, then record is found, overwise, repeat with next hash table
|
other, then record is found, otherwise, repeat with next hash table
|
||||||
slot. Note that there may be several records with the same key.
|
slot. Note that there may be several records with the same key.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ cdb_find(struct cdb *cdbp, const void *key, cdbi_t klen)
|
|||||||
pos = cdb_unpack(htp); /* htab position */
|
pos = cdb_unpack(htp); /* htab position */
|
||||||
if (n > (cdbp->cdb_fsize >> 3) /* overflow of httodo ? */
|
if (n > (cdbp->cdb_fsize >> 3) /* overflow of httodo ? */
|
||||||
|| pos > cdbp->cdb_fsize /* htab start within file ? */
|
|| pos > cdbp->cdb_fsize /* htab start within file ? */
|
||||||
|| httodo > cdbp->cdb_fsize - pos) /* entrie htab within file ? */
|
|| httodo > cdbp->cdb_fsize - pos) /* htab entry within file ? */
|
||||||
{
|
{
|
||||||
gpg_err_set_errno (EPROTO);
|
gpg_err_set_errno (EPROTO);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1782,7 +1782,7 @@ crl_parse_insert (ctrl_t ctrl, ksba_crl_t crl,
|
|||||||
ksba_sexp_t keyid;
|
ksba_sexp_t keyid;
|
||||||
|
|
||||||
/* We need to look for the issuer only after having read
|
/* We need to look for the issuer only after having read
|
||||||
all items. The issuer itselfs comes before the items
|
all items. The issuer itself comes before the items
|
||||||
but the optional authorityKeyIdentifier comes after the
|
but the optional authorityKeyIdentifier comes after the
|
||||||
items. */
|
items. */
|
||||||
err = ksba_crl_get_issuer (crl, &crlissuer);
|
err = ksba_crl_get_issuer (crl, &crlissuer);
|
||||||
@ -1907,7 +1907,7 @@ get_crl_number (ksba_crl_t crl)
|
|||||||
|
|
||||||
|
|
||||||
/* Return the authorityKeyIdentifier or NULL if it is not available.
|
/* Return the authorityKeyIdentifier or NULL if it is not available.
|
||||||
The issuer name may consists of several parts - they are delimted by
|
The issuer name may consists of several parts - they are delimited by
|
||||||
0x01. */
|
0x01. */
|
||||||
static char *
|
static char *
|
||||||
get_auth_key_id (ksba_crl_t crl, char **serialno)
|
get_auth_key_id (ksba_crl_t crl, char **serialno)
|
||||||
|
@ -338,7 +338,7 @@ static int active_connections;
|
|||||||
* thread to run background network tasks. */
|
* thread to run background network tasks. */
|
||||||
static int network_activity_seen;
|
static int network_activity_seen;
|
||||||
|
|
||||||
/* A list of filenames registred with --hkp-cacert. */
|
/* A list of filenames registered with --hkp-cacert. */
|
||||||
static strlist_t hkp_cacert_filenames;
|
static strlist_t hkp_cacert_filenames;
|
||||||
|
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ my_strusage( int level )
|
|||||||
|
|
||||||
/* Callback from libksba to hash a provided buffer. Our current
|
/* Callback from libksba to hash a provided buffer. Our current
|
||||||
implementation does only allow SHA-1 for hashing. This may be
|
implementation does only allow SHA-1 for hashing. This may be
|
||||||
extended by mapping the name, testing for algorithm availibility
|
extended by mapping the name, testing for algorithm availability
|
||||||
and adjust the length checks accordingly. */
|
and adjust the length checks accordingly. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
my_ksba_hash_buffer (void *arg, const char *oid,
|
my_ksba_hash_buffer (void *arg, const char *oid,
|
||||||
@ -520,7 +520,7 @@ set_tor_mode (void)
|
|||||||
{
|
{
|
||||||
if (dirmngr_use_tor ())
|
if (dirmngr_use_tor ())
|
||||||
{
|
{
|
||||||
/* Enable Tor mode and when called again force a new curcuit
|
/* Enable Tor mode and when called again force a new circuit
|
||||||
* (e.g. on SIGHUP). */
|
* (e.g. on SIGHUP). */
|
||||||
enable_dns_tormode (1);
|
enable_dns_tormode (1);
|
||||||
if (assuan_sock_set_flag (ASSUAN_INVALID_FD, "tor-mode", 1))
|
if (assuan_sock_set_flag (ASSUAN_INVALID_FD, "tor-mode", 1))
|
||||||
@ -752,7 +752,7 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* This fucntion is called after option parsing to adjust some values
|
/* This function is called after option parsing to adjust some values
|
||||||
* and call option setup functions. */
|
* and call option setup functions. */
|
||||||
static void
|
static void
|
||||||
post_option_parsing (void)
|
post_option_parsing (void)
|
||||||
|
@ -417,9 +417,9 @@ set_timeout (my_opt_t myopt)
|
|||||||
sec_attr.nLength = sizeof sec_attr;
|
sec_attr.nLength = sizeof sec_attr;
|
||||||
sec_attr.bInheritHandle = FALSE;
|
sec_attr.bInheritHandle = FALSE;
|
||||||
|
|
||||||
/* Create a manual resetable timer. */
|
/* Create a manual resettable timer. */
|
||||||
timer = CreateWaitableTimer (NULL, TRUE, NULL);
|
timer = CreateWaitableTimer (NULL, TRUE, NULL);
|
||||||
/* Intially set the timer. */
|
/* Initially set the timer. */
|
||||||
SetWaitableTimer (timer, &due_time, 0, NULL, NULL, 0);
|
SetWaitableTimer (timer, &due_time, 0, NULL, NULL, 0);
|
||||||
|
|
||||||
if (CreateThread (&sec_attr, 0, alarm_thread, timer, 0, &tid))
|
if (CreateThread (&sec_attr, 0, alarm_thread, timer, 0, &tid))
|
||||||
|
@ -151,7 +151,7 @@ static char tor_socks_password[20];
|
|||||||
|
|
||||||
|
|
||||||
#ifdef USE_LIBDNS
|
#ifdef USE_LIBDNS
|
||||||
/* Libdns gobal data. */
|
/* Libdns global data. */
|
||||||
struct libdns_s
|
struct libdns_s
|
||||||
{
|
{
|
||||||
struct dns_resolv_conf *resolv_conf;
|
struct dns_resolv_conf *resolv_conf;
|
||||||
|
@ -1832,7 +1832,7 @@ static void dns_p_free(struct dns_packet *P) {
|
|||||||
} /* dns_p_free() */
|
} /* dns_p_free() */
|
||||||
|
|
||||||
|
|
||||||
/* convience routine to free any existing packet before storing new packet */
|
/* convenience routine to free any existing packet before storing new packet */
|
||||||
static struct dns_packet *dns_p_setptr(struct dns_packet **dst, struct dns_packet *src) {
|
static struct dns_packet *dns_p_setptr(struct dns_packet **dst, struct dns_packet *src) {
|
||||||
dns_p_free(*dst);
|
dns_p_free(*dst);
|
||||||
|
|
||||||
@ -7634,7 +7634,7 @@ retry:
|
|||||||
goto udp_connect_retry;
|
goto udp_connect_retry;
|
||||||
} else if (error == ECONNREFUSED)
|
} else if (error == ECONNREFUSED)
|
||||||
/* Error for previous socket operation may
|
/* Error for previous socket operation may
|
||||||
be reserverd asynchronously. */
|
be reserverd(?) asynchronously. */
|
||||||
goto udp_connect_retry;
|
goto udp_connect_retry;
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
|
@ -55,7 +55,7 @@ gnupg_http_tls_verify_cb (void *opaque,
|
|||||||
log_assert (ctrl && ctrl->magic == SERVER_CONTROL_MAGIC);
|
log_assert (ctrl && ctrl->magic == SERVER_CONTROL_MAGIC);
|
||||||
log_assert (!ntbtls_check_context (tls));
|
log_assert (!ntbtls_check_context (tls));
|
||||||
|
|
||||||
/* Get the peer's certs fron ntbtls. */
|
/* Get the peer's certs from ntbtls. */
|
||||||
for (idx = 0;
|
for (idx = 0;
|
||||||
(cert = ntbtls_x509_get_peer_cert (tls, idx)); idx++)
|
(cert = ntbtls_x509_get_peer_cert (tls, idx)); idx++)
|
||||||
{
|
{
|
||||||
|
@ -88,7 +88,7 @@ ks_action_help (ctrl_t ctrl, const char *url)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call all engines to give them a chance to print a help sting. */
|
/* Call all engines to give them a chance to print a help string. */
|
||||||
err = ks_hkp_help (ctrl, parsed_uri);
|
err = ks_hkp_help (ctrl, parsed_uri);
|
||||||
if (!err)
|
if (!err)
|
||||||
err = ks_http_help (ctrl, parsed_uri);
|
err = ks_http_help (ctrl, parsed_uri);
|
||||||
|
@ -1381,7 +1381,7 @@ handle_send_request_error (ctrl_t ctrl, gpg_error_t err, const char *request,
|
|||||||
int retry = 0;
|
int retry = 0;
|
||||||
|
|
||||||
/* Fixme: Should we disable all hosts of a protocol family if a
|
/* Fixme: Should we disable all hosts of a protocol family if a
|
||||||
* request for an address of that familiy returned ENETDOWN? */
|
* request for an address of that family returned ENETDOWN? */
|
||||||
|
|
||||||
switch (gpg_err_code (err))
|
switch (gpg_err_code (err))
|
||||||
{
|
{
|
||||||
|
@ -388,7 +388,7 @@ parse_one_pattern (const char *pattern)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Take the string STRING and escape it according to the URL rules.
|
/* Take the string STRING and escape it according to the URL rules.
|
||||||
Retun a newly allocated string. */
|
Return a newly allocated string. */
|
||||||
static char *
|
static char *
|
||||||
escape4url (const char *string)
|
escape4url (const char *string)
|
||||||
{
|
{
|
||||||
|
@ -637,7 +637,7 @@ armor_data (char **r_string, const void *data, size_t datalen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Copy all data from IN to OUT. OUT may be NULL to use this fucntion
|
/* Copy all data from IN to OUT. OUT may be NULL to use this function
|
||||||
* as a dummy reader. */
|
* as a dummy reader. */
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
copy_stream (estream_t in, estream_t out)
|
copy_stream (estream_t in, estream_t out)
|
||||||
|
@ -343,7 +343,7 @@ validate_responder_cert (ctrl_t ctrl, ksba_cert_t cert,
|
|||||||
|
|
||||||
Note, that in theory we could simply ask the client via an
|
Note, that in theory we could simply ask the client via an
|
||||||
inquire to validate a certificate but this might involve
|
inquire to validate a certificate but this might involve
|
||||||
calling DirMngr again recursivly - we can't do that as of now
|
calling DirMngr again recursively - we can't do that as of now
|
||||||
(neither DirMngr nor gpgsm have the ability for concurrent
|
(neither DirMngr nor gpgsm have the ability for concurrent
|
||||||
access to DirMngr. */
|
access to DirMngr. */
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ check_signature_core (ctrl_t ctrl, ksba_cert_t cert, gcry_sexp_t s_sig,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Check the signature of an OCSP repsonse. OCSP is the context,
|
/* Check the signature of an OCSP response. OCSP is the context,
|
||||||
S_SIG the signature value and MD the handle of the hash we used for
|
S_SIG the signature value and MD the handle of the hash we used for
|
||||||
the response. This function automagically finds the correct public
|
the response. This function automagically finds the correct public
|
||||||
key. If SIGNER_FPR_LIST is not NULL, the default OCSP reponder has been
|
key. If SIGNER_FPR_LIST is not NULL, the default OCSP reponder has been
|
||||||
@ -788,7 +788,7 @@ ocsp_isvalid (ctrl_t ctrl, ksba_cert_t cert, const char *cert_fpr,
|
|||||||
err = gpg_error (GPG_ERR_TIME_CONFLICT);
|
err = gpg_error (GPG_ERR_TIME_CONFLICT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check that we are not beyound NEXT_UPDATE (plus some extra time). */
|
/* Check that we are not beyond NEXT_UPDATE (plus some extra time). */
|
||||||
if (*next_update)
|
if (*next_update)
|
||||||
{
|
{
|
||||||
gnupg_copy_time (tmp_time, next_update);
|
gnupg_copy_time (tmp_time, next_update);
|
||||||
|
@ -137,7 +137,7 @@ my_http_tls_verify_cb (void *opaque,
|
|||||||
(void)session;
|
(void)session;
|
||||||
(void)http_flags;
|
(void)http_flags;
|
||||||
|
|
||||||
/* Get the peer's certs fron ntbtls. */
|
/* Get the peer's certs from ntbtls. */
|
||||||
for (idx = 0;
|
for (idx = 0;
|
||||||
(cert = ntbtls_x509_get_peer_cert (tls_context, idx)); idx++)
|
(cert = ntbtls_x509_get_peer_cert (tls_context, idx)); idx++)
|
||||||
{
|
{
|
||||||
|
@ -116,7 +116,7 @@ workqueue_add_task (wqtask_t func, const char *args, unsigned int session_id,
|
|||||||
|
|
||||||
|
|
||||||
/* Run the task described by ITEM. ITEM must have been detached from
|
/* Run the task described by ITEM. ITEM must have been detached from
|
||||||
* the workqueue; its ownership is transferred to this fucntion. */
|
* the workqueue; its ownership is transferred to this function. */
|
||||||
static void
|
static void
|
||||||
run_a_task (ctrl_t ctrl, wqitem_t item)
|
run_a_task (ctrl_t ctrl, wqitem_t item)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* armor.c - Armor flter
|
/* armor.c - Armor filter
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||||
* 2007 Free Software Foundation, Inc.
|
* 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
|
@ -1083,7 +1083,7 @@ ks_put_inq_cb (void *opaque, const char *line)
|
|||||||
|
|
||||||
/* Send a key to the configured server. {DATA,DATLEN} contains the
|
/* Send a key to the configured server. {DATA,DATLEN} contains the
|
||||||
key in OpenPGP binary transport format. If KEYBLOCK is not NULL it
|
key in OpenPGP binary transport format. If KEYBLOCK is not NULL it
|
||||||
has the internal representaion of that key; this is for example
|
has the internal representation of that key; this is for example
|
||||||
used to convey meta data to LDAP keyservers. */
|
used to convey meta data to LDAP keyservers. */
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
gpg_dirmngr_ks_put (ctrl_t ctrl, void *data, size_t datalen, kbnode_t keyblock)
|
gpg_dirmngr_ks_put (ctrl_t ctrl, void *data, size_t datalen, kbnode_t keyblock)
|
||||||
|
@ -648,7 +648,7 @@ current_card_status (ctrl_t ctrl, estream_t fp,
|
|||||||
info.fpr3len? info.fpr3 : NULL);
|
info.fpr3len? info.fpr3 : NULL);
|
||||||
thefprlen = (info.fpr1len? info.fpr1len : info.fpr2len? info.fpr2len :
|
thefprlen = (info.fpr1len? info.fpr1len : info.fpr2len? info.fpr2len :
|
||||||
info.fpr3len? info.fpr3len : 0);
|
info.fpr3len? info.fpr3len : 0);
|
||||||
/* If the fingerprint is all 0xff, the key has no asssociated
|
/* If the fingerprint is all 0xff, the key has no associated
|
||||||
OpenPGP certificate. */
|
OpenPGP certificate. */
|
||||||
if ( thefpr && !fpr_is_ff (thefpr, thefprlen)
|
if ( thefpr && !fpr_is_ff (thefpr, thefprlen)
|
||||||
&& !get_pubkey_byfprint (ctrl, pk, &keyblock, thefpr, thefprlen))
|
&& !get_pubkey_byfprint (ctrl, pk, &keyblock, thefpr, thefprlen))
|
||||||
|
@ -187,7 +187,7 @@ write_status_text (int no, const char *text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Write a status line with code NO followed by the outout of the
|
/* Write a status line with code NO followed by the output of the
|
||||||
* printf style FORMAT. The caller needs to make sure that LFs and
|
* printf style FORMAT. The caller needs to make sure that LFs and
|
||||||
* CRs are not printed. */
|
* CRs are not printed. */
|
||||||
void
|
void
|
||||||
|
@ -42,7 +42,7 @@ static int decode_filter ( void *opaque, int control, IOBUF a,
|
|||||||
/* Our context object. */
|
/* Our context object. */
|
||||||
struct decode_filter_context_s
|
struct decode_filter_context_s
|
||||||
{
|
{
|
||||||
/* Recounter (max value is 2). We need it becuase we do not know
|
/* Recounter (max value is 2). We need it because we do not know
|
||||||
* whether the iobuf or the outer control code frees this object
|
* whether the iobuf or the outer control code frees this object
|
||||||
* first. */
|
* first. */
|
||||||
int refcount;
|
int refcount;
|
||||||
|
@ -732,7 +732,7 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
|
|||||||
|
|
||||||
/* In case 3DES has been selected, print a warning if any key
|
/* In case 3DES has been selected, print a warning if any key
|
||||||
does not have a preference for AES. This should help to
|
does not have a preference for AES. This should help to
|
||||||
indentify why encrypting to several recipients falls back to
|
identify why encrypting to several recipients falls back to
|
||||||
3DES. */
|
3DES. */
|
||||||
if (opt.verbose && cfx.dek->algo == CIPHER_ALGO_3DES)
|
if (opt.verbose && cfx.dek->algo == CIPHER_ALGO_3DES)
|
||||||
warn_missing_aes_from_pklist (pk_list);
|
warn_missing_aes_from_pklist (pk_list);
|
||||||
@ -1003,7 +1003,7 @@ encrypt_filter (void *opaque, int control,
|
|||||||
|
|
||||||
/* In case 3DES has been selected, print a warning if
|
/* In case 3DES has been selected, print a warning if
|
||||||
any key does not have a preference for AES. This
|
any key does not have a preference for AES. This
|
||||||
should help to indentify why encrypting to several
|
should help to identify why encrypting to several
|
||||||
recipients falls back to 3DES. */
|
recipients falls back to 3DES. */
|
||||||
if (opt.verbose
|
if (opt.verbose
|
||||||
&& efx->cfx.dek->algo == CIPHER_ALGO_3DES)
|
&& efx->cfx.dek->algo == CIPHER_ALGO_3DES)
|
||||||
|
@ -1179,7 +1179,7 @@ print_status_exported (PKT_public_key *pk)
|
|||||||
* passphrase-protected. Otherwise, store secret key material in the
|
* passphrase-protected. Otherwise, store secret key material in the
|
||||||
* clear.
|
* clear.
|
||||||
*
|
*
|
||||||
* CACHE_NONCE_ADDR is used to share nonce for multple key retrievals.
|
* CACHE_NONCE_ADDR is used to share nonce for multiple key retrievals.
|
||||||
*/
|
*/
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
receive_seckey_from_agent (ctrl_t ctrl, gcry_cipher_hd_t cipherhd,
|
receive_seckey_from_agent (ctrl_t ctrl, gcry_cipher_hd_t cipherhd,
|
||||||
|
@ -60,7 +60,7 @@ struct getkey_ctx_s
|
|||||||
search or not. A search that is exact requires that a key or
|
search or not. A search that is exact requires that a key or
|
||||||
subkey meet all of the specified criteria. A search that is not
|
subkey meet all of the specified criteria. A search that is not
|
||||||
exact allows selecting a different key or subkey from the
|
exact allows selecting a different key or subkey from the
|
||||||
keyblock that matched the critera. Further, an exact search
|
keyblock that matched the criteria. Further, an exact search
|
||||||
returns the key or subkey that matched whereas a non-exact search
|
returns the key or subkey that matched whereas a non-exact search
|
||||||
typically returns the primary key. See finish_lookup for
|
typically returns the primary key. See finish_lookup for
|
||||||
details. */
|
details. */
|
||||||
@ -3364,7 +3364,7 @@ merge_selfsigs (ctrl_t ctrl, kbnode_t keyblock)
|
|||||||
*
|
*
|
||||||
* 1. No requested usage and no primary key requested
|
* 1. No requested usage and no primary key requested
|
||||||
* Examples for this case are that we have a keyID to be used
|
* Examples for this case are that we have a keyID to be used
|
||||||
* for decrytion or verification.
|
* for decryption or verification.
|
||||||
* 2. No usage but primary key requested
|
* 2. No usage but primary key requested
|
||||||
* This is the case for all functions which work on an
|
* This is the case for all functions which work on an
|
||||||
* entire keyblock, e.g. for editing or listing
|
* entire keyblock, e.g. for editing or listing
|
||||||
|
@ -3891,7 +3891,7 @@ main (int argc, char **argv)
|
|||||||
keygen_set_std_prefs(pers_compress_list,PREFTYPE_ZIP))
|
keygen_set_std_prefs(pers_compress_list,PREFTYPE_ZIP))
|
||||||
log_error(_("invalid personal compress preferences\n"));
|
log_error(_("invalid personal compress preferences\n"));
|
||||||
|
|
||||||
/* Check chunk size. Please fix also the man page if you chnage
|
/* Check chunk size. Please fix also the man page if you change
|
||||||
* the default. The limits are given by the specs. */
|
* the default. The limits are given by the specs. */
|
||||||
if (!opt.chunk_size)
|
if (!opt.chunk_size)
|
||||||
opt.chunk_size = 27; /* Default to the suggested max of 128 MiB. */
|
opt.chunk_size = 27; /* Default to the suggested max of 128 MiB. */
|
||||||
@ -4875,9 +4875,9 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
while( endless || count ) {
|
while( endless || count ) {
|
||||||
byte *p;
|
byte *p;
|
||||||
/* Wee need a multiple of 3, so that in case of
|
/* We need a multiple of 3, so that in case of
|
||||||
armored output we get a correct string. No
|
armored output we get a correct string. No
|
||||||
linefolding is done, as it is best to levae this to
|
linefolding is done, as it is best to leave this to
|
||||||
other tools */
|
other tools */
|
||||||
size_t n = !endless && count < 99? count : 99;
|
size_t n = !endless && count < 99? count : 99;
|
||||||
|
|
||||||
|
@ -1812,7 +1812,7 @@ import_one (ctrl_t ctrl,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delete invalid parts and without the drop otions bail out if
|
/* Delete invalid parts and without the drop option bail out if
|
||||||
* there are no user ids. */
|
* there are no user ids. */
|
||||||
if (!delete_inv_parts (ctrl, keyblock, keyid, options)
|
if (!delete_inv_parts (ctrl, keyblock, keyid, options)
|
||||||
&& !(options & IMPORT_DROP_UIDS) )
|
&& !(options & IMPORT_DROP_UIDS) )
|
||||||
|
@ -500,7 +500,7 @@ clean_one_subkey_dupsigs (ctrl_t ctrl, kbnode_t subkeynode)
|
|||||||
log_debug ("\tchecking subkey %08lX for dupsigs\n",
|
log_debug ("\tchecking subkey %08lX for dupsigs\n",
|
||||||
(ulong) keyid_from_pk (pk, NULL));
|
(ulong) keyid_from_pk (pk, NULL));
|
||||||
|
|
||||||
/* First check that the choosen flag has been set. Note that we
|
/* First check that the chosen flag has been set. Note that we
|
||||||
* only look at plain signatures so to keep all revocation
|
* only look at plain signatures so to keep all revocation
|
||||||
* signatures which may carry important information. */
|
* signatures which may carry important information. */
|
||||||
for (node = subkeynode->next;
|
for (node = subkeynode->next;
|
||||||
@ -519,7 +519,7 @@ clean_one_subkey_dupsigs (ctrl_t ctrl, kbnode_t subkeynode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!any_choosen)
|
if (!any_choosen)
|
||||||
return 0; /* Ooops no choosen flag set - we can't decide. */
|
return 0; /* Ooops no chosen flag set - we can't decide. */
|
||||||
|
|
||||||
for (node = subkeynode->next;
|
for (node = subkeynode->next;
|
||||||
node && !(node->pkt->pkttype == PKT_PUBLIC_SUBKEY
|
node && !(node->pkt->pkttype == PKT_PUBLIC_SUBKEY
|
||||||
|
@ -450,7 +450,7 @@ keygen_set_std_prefs (const char *string,int personal)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* In case we have no compress algo at all, declare that
|
/* In case we have no compress algo at all, declare that
|
||||||
we prefer no compresssion. */
|
we prefer no compression. */
|
||||||
if (!any_compress)
|
if (!any_compress)
|
||||||
strcat(dummy_string,"Z0 ");
|
strcat(dummy_string,"Z0 ");
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ proc_plaintext( CTX c, PACKET *pkt )
|
|||||||
int any, clearsig, rc;
|
int any, clearsig, rc;
|
||||||
kbnode_t n;
|
kbnode_t n;
|
||||||
|
|
||||||
/* This is a literal data packet. Bumb a counter for later checks. */
|
/* This is a literal data packet. Bump a counter for later checks. */
|
||||||
literals_seen++;
|
literals_seen++;
|
||||||
|
|
||||||
if (pt->namelen == 8 && !memcmp( pt->name, "_CONSOLE", 8))
|
if (pt->namelen == 8 && !memcmp( pt->name, "_CONSOLE", 8))
|
||||||
|
@ -549,7 +549,7 @@ openpgp_cipher_blocklen (cipher_algo_t algo)
|
|||||||
|
|
||||||
/****************
|
/****************
|
||||||
* Wrapper around the libgcrypt function with additional checks on
|
* Wrapper around the libgcrypt function with additional checks on
|
||||||
* the OpenPGP contraints for the algo ID.
|
* the OpenPGP constraints for the algo ID.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
openpgp_cipher_test_algo (cipher_algo_t algo)
|
openpgp_cipher_test_algo (cipher_algo_t algo)
|
||||||
@ -712,7 +712,7 @@ openpgp_pk_test_algo2 (pubkey_algo_t algo, unsigned int use)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case PUBKEY_ALGO_ELGAMAL:
|
case PUBKEY_ALGO_ELGAMAL:
|
||||||
/* Dont't allow type 20 keys unless in rfc2440 mode. */
|
/* Don't allow type 20 keys unless in rfc2440 mode. */
|
||||||
if (RFC2440)
|
if (RFC2440)
|
||||||
ga = GCRY_PK_ELG;
|
ga = GCRY_PK_ELG;
|
||||||
break;
|
break;
|
||||||
|
@ -2351,7 +2351,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
{
|
{
|
||||||
log_error ("packet(%d) too large\n", pkttype);
|
log_error ("packet(%d) too large\n", pkttype);
|
||||||
if (list_mode)
|
if (list_mode)
|
||||||
es_fputs (":key packet: [too larget]\n", listfp);
|
es_fputs (":key packet: [too large]\n", listfp);
|
||||||
err = gpg_error (GPG_ERR_INV_PACKET);
|
err = gpg_error (GPG_ERR_INV_PACKET);
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
@ -3180,7 +3180,7 @@ parse_plaintext (IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
pt->name[i] = c;
|
pt->name[i] = c;
|
||||||
}
|
}
|
||||||
/* Fill up NAME so that a check with valgrind won't complain about
|
/* Fill up NAME so that a check with valgrind won't complain about
|
||||||
* reading from uninitalized memory. This case may be triggred by
|
* reading from uninitialized memory. This case may be triggred by
|
||||||
* corrupted packets. */
|
* corrupted packets. */
|
||||||
for (; i < namelen; i++)
|
for (; i < namelen; i++)
|
||||||
pt->name[i] = 0;
|
pt->name[i] = 0;
|
||||||
|
@ -95,7 +95,7 @@ encode_session_key (int openpgp_pk_algo, DEK *dek, unsigned int nbits)
|
|||||||
output be a multiple of 8 bytes. */
|
output be a multiple of 8 bytes. */
|
||||||
if (openpgp_pk_algo == PUBKEY_ALGO_ECDH)
|
if (openpgp_pk_algo == PUBKEY_ALGO_ECDH)
|
||||||
{
|
{
|
||||||
/* Pad to 8 byte granulatiry; the padding byte is the number of
|
/* Pad to 8 byte granularity; the padding byte is the number of
|
||||||
* padded bytes.
|
* padded bytes.
|
||||||
*
|
*
|
||||||
* A DEK(k bytes) CSUM(2 bytes) 0x 0x 0x 0x ... 0x
|
* A DEK(k bytes) CSUM(2 bytes) 0x 0x 0x 0x ... 0x
|
||||||
@ -143,7 +143,7 @@ encode_session_key (int openpgp_pk_algo, DEK *dek, unsigned int nbits)
|
|||||||
*
|
*
|
||||||
* 0 2 RND(i bytes) 0 A DEK(k bytes) CSUM(2 bytes)
|
* 0 2 RND(i bytes) 0 A DEK(k bytes) CSUM(2 bytes)
|
||||||
*
|
*
|
||||||
* (But how can we store the leading 0 - the external representaion
|
* (But how can we store the leading 0 - the external representation
|
||||||
* of MPIs doesn't allow leading zeroes =:-)
|
* of MPIs doesn't allow leading zeroes =:-)
|
||||||
*
|
*
|
||||||
* RND are (at least 1) non-zero random bytes.
|
* RND are (at least 1) non-zero random bytes.
|
||||||
|
@ -53,7 +53,7 @@ static int recipient_digest_algo=0;
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create notations and other stuff. It is assumed that the stings in
|
* Create notations and other stuff. It is assumed that the strings in
|
||||||
* STRLIST are already checked to contain only printable data and have
|
* STRLIST are already checked to contain only printable data and have
|
||||||
* a valid NAME=VALUE format.
|
* a valid NAME=VALUE format.
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +106,7 @@ struct cmp_xdir_struct
|
|||||||
static char *db_name;
|
static char *db_name;
|
||||||
|
|
||||||
/* The handle for locking the trustdb file and a counter to record how
|
/* The handle for locking the trustdb file and a counter to record how
|
||||||
* often this lock has been taken. That counter is required becuase
|
* often this lock has been taken. That counter is required because
|
||||||
* dotlock does not implemen recursive locks. */
|
* dotlock does not implemen recursive locks. */
|
||||||
static dotlock_t lockhandle;
|
static dotlock_t lockhandle;
|
||||||
static unsigned int is_locked;
|
static unsigned int is_locked;
|
||||||
@ -589,7 +589,7 @@ tdbio_update_version_record (ctrl_t ctrl)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Create and write the trustdb version record.
|
* Create and write the trustdb version record.
|
||||||
* This is called with the writelock activ.
|
* This is called with the writelock active.
|
||||||
* Returns: 0 on success or an error code.
|
* Returns: 0 on success or an error code.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
@ -1139,7 +1139,7 @@ upd_hashtable (ctrl_t ctrl, ulong table, byte *key, int keylen, ulong newrecnum)
|
|||||||
|
|
||||||
if (rec.r.hlst.next)
|
if (rec.r.hlst.next)
|
||||||
{
|
{
|
||||||
/* read the next reord of the list. */
|
/* read the next record of the list. */
|
||||||
rc = tdbio_read_record (rec.r.hlst.next, &rec, RECTYPE_HLST);
|
rc = tdbio_read_record (rec.r.hlst.next, &rec, RECTYPE_HLST);
|
||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
|
@ -1506,7 +1506,7 @@ store_validation_status (ctrl_t ctrl, int depth,
|
|||||||
/* Returns a sanitized copy of the regexp (which might be "", but not
|
/* Returns a sanitized copy of the regexp (which might be "", but not
|
||||||
NULL). */
|
NULL). */
|
||||||
#ifndef DISABLE_REGEX
|
#ifndef DISABLE_REGEX
|
||||||
/* Operator charactors except '.' and backslash.
|
/* Operator characters except '.' and backslash.
|
||||||
See regex(7) on BSD. */
|
See regex(7) on BSD. */
|
||||||
#define REGEXP_OPERATOR_CHARS "^[$()|*+?{"
|
#define REGEXP_OPERATOR_CHARS "^[$()|*+?{"
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ verify_signatures (ctrl_t ctrl, int nfiles, char **files )
|
|||||||
* we can do it is by reading one byte from stdin and then unget
|
* we can do it is by reading one byte from stdin and then unget
|
||||||
* it; the problem here is that we may be reading from the
|
* it; the problem here is that we may be reading from the
|
||||||
* terminal (which could be detected using isatty() but won't work
|
* terminal (which could be detected using isatty() but won't work
|
||||||
* when under contol of a pty using program (e.g. expect)) and
|
* when under control of a pty using program (e.g. expect)) and
|
||||||
* might get us in trouble when stdin is used for another purpose
|
* might get us in trouble when stdin is used for another purpose
|
||||||
* (--passphrase-fd 0). So we have to break with the behaviour
|
* (--passphrase-fd 0). So we have to break with the behaviour
|
||||||
* prior to gpg 1.0.4 by assuming that case 3 is a normal
|
* prior to gpg 1.0.4 by assuming that case 3 is a normal
|
||||||
|
@ -174,7 +174,7 @@ call_syshelp_release (ctrl_t ctrl)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Staus callback for call_syshelp_find_device. */
|
/* Status callback for call_syshelp_find_device. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
finddevice_status_cb (void *opaque, const char *line)
|
finddevice_status_cb (void *opaque, const char *line)
|
||||||
{
|
{
|
||||||
|
@ -117,7 +117,7 @@ mountinfo_del_mount (const char *container, const char *mountpoint,
|
|||||||
size_t idx;
|
size_t idx;
|
||||||
mtab_t m;
|
mtab_t m;
|
||||||
|
|
||||||
/* If a container or mountpint is givem search the RID via the
|
/* If a container or mountpint is given search the RID via the
|
||||||
standard find function. */
|
standard find function. */
|
||||||
if (container || mountpoint)
|
if (container || mountpoint)
|
||||||
{
|
{
|
||||||
|
@ -278,7 +278,7 @@ runner_set_pid (runner_t runner, pid_t pid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Register the engine handler fucntions HANDLER and HANDLER_CLEANUP
|
/* Register the engine handler functions HANDLER and HANDLER_CLEANUP
|
||||||
and its private HANDLER_DATA with RUNNER. */
|
and its private HANDLER_DATA with RUNNER. */
|
||||||
void
|
void
|
||||||
runner_set_handler (runner_t runner,
|
runner_set_handler (runner_t runner,
|
||||||
|
@ -616,7 +616,7 @@ create_blob_header (KEYBOXBLOB blob, int blobtype, int as_ephemeral)
|
|||||||
if (blobtype == KEYBOX_BLOBTYPE_X509)
|
if (blobtype == KEYBOX_BLOBTYPE_X509)
|
||||||
{
|
{
|
||||||
/* We don't want to point to ASN.1 encoded UserIDs (DNs) but to
|
/* We don't want to point to ASN.1 encoded UserIDs (DNs) but to
|
||||||
the utf-8 string represenation of them */
|
the utf-8 string representation of them */
|
||||||
for (i=0; i < blob->nuids; i++ )
|
for (i=0; i < blob->nuids; i++ )
|
||||||
{
|
{
|
||||||
if (blob->uids[i].name)
|
if (blob->uids[i].name)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* keybox_strerror:
|
* keybox_strerror:
|
||||||
* @err: Error code
|
* @err: Error code
|
||||||
*
|
*
|
||||||
* This function returns a textual representaion of the given
|
* This function returns a textual representation of the given
|
||||||
* errorcode. If this is an unknown value, a string with the value
|
* errorcode. If this is an unknown value, a string with the value
|
||||||
* is returned (Beware: it is hold in a static buffer).
|
* is returned (Beware: it is hold in a static buffer).
|
||||||
*
|
*
|
||||||
|
@ -1069,7 +1069,7 @@ keybox_search (KEYBOX_HANDLE hd, KEYBOX_SEARCH_DESC *desc, size_t ndesc,
|
|||||||
|
|
||||||
|
|
||||||
/* Return the last found keyblock. Returns 0 on success and stores a
|
/* Return the last found keyblock. Returns 0 on success and stores a
|
||||||
* new iobuf at R_IOBUF. R_UID_NO and R_PK_NO are used to retun the
|
* new iobuf at R_IOBUF. R_UID_NO and R_PK_NO are used to return the
|
||||||
* number of the key or user id which was matched the search criteria;
|
* number of the key or user id which was matched the search criteria;
|
||||||
* if not known they are set to 0. */
|
* if not known they are set to 0. */
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
|
@ -2646,7 +2646,7 @@ send_apdu (int slot, unsigned char *apdu, size_t apdulen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Core APDU tranceiver function. Parameters are described at
|
/* Core APDU transceiver function. Parameters are described at
|
||||||
apdu_send_le with the exception of PININFO which indicates pinpad
|
apdu_send_le with the exception of PININFO which indicates pinpad
|
||||||
related operations if not NULL. If EXTENDED_MODE is not 0
|
related operations if not NULL. If EXTENDED_MODE is not 0
|
||||||
command chaining or extended length will be used according to these
|
command chaining or extended length will be used according to these
|
||||||
|
@ -415,7 +415,7 @@ do_sign (app_t app, const char *keyidstr, int hashalgo,
|
|||||||
&& indatalen != (15+20) && indatalen != (19+32))
|
&& indatalen != (15+20) && indatalen != (19+32))
|
||||||
return gpg_error (GPG_ERR_INV_VALUE);
|
return gpg_error (GPG_ERR_INV_VALUE);
|
||||||
|
|
||||||
/* Check that the provided ID is vaid. This is not really needed
|
/* Check that the provided ID is valid. This is not really needed
|
||||||
but we do it to enforce correct usage by the caller. */
|
but we do it to enforce correct usage by the caller. */
|
||||||
if (strncmp (keyidstr, "DINSIG.", 7) )
|
if (strncmp (keyidstr, "DINSIG.", 7) )
|
||||||
return gpg_error (GPG_ERR_INV_ID);
|
return gpg_error (GPG_ERR_INV_ID);
|
||||||
|
@ -254,7 +254,7 @@ copy_bcd (const unsigned char *string, size_t length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Convert the BCD number at STING of LENGTH into an integer and store
|
/* Convert the BCD number at STRING of LENGTH into an integer and store
|
||||||
that at RESULT. Return 0 on success. */
|
that at RESULT. Return 0 on success. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
bcd_to_int (const unsigned char *string, size_t length, int *result)
|
bcd_to_int (const unsigned char *string, size_t length, int *result)
|
||||||
|
@ -643,7 +643,7 @@ count_bits (const unsigned char *a, size_t len)
|
|||||||
Where FLAGS is a plain hexadecimal number representing flag values.
|
Where FLAGS is a plain hexadecimal number representing flag values.
|
||||||
The lsb is here the rightmost bit. Defined flags bits are:
|
The lsb is here the rightmost bit. Defined flags bits are:
|
||||||
|
|
||||||
Bit 0 = CHV1 and CHV2 are not syncronized
|
Bit 0 = CHV1 and CHV2 are not synchronized
|
||||||
Bit 1 = CHV2 has been set to the default PIN of "123456"
|
Bit 1 = CHV2 has been set to the default PIN of "123456"
|
||||||
(this implies that bit 0 is also set).
|
(this implies that bit 0 is also set).
|
||||||
|
|
||||||
|
@ -1937,7 +1937,7 @@ bulk_out (ccid_driver_t handle, unsigned char *msg, size_t msglen,
|
|||||||
is the sequence number used to send the request and EXPECTED_TYPE
|
is the sequence number used to send the request and EXPECTED_TYPE
|
||||||
the type of message we expect. Does checks on the ccid
|
the type of message we expect. Does checks on the ccid
|
||||||
header. TIMEOUT is the timeout value in ms. NO_DEBUG may be set to
|
header. TIMEOUT is the timeout value in ms. NO_DEBUG may be set to
|
||||||
avoid debug messages in case of no error; this can be overriden
|
avoid debug messages in case of no error; this can be overridden
|
||||||
with a glibal debug level of at least 3. Returns 0 on success. */
|
with a glibal debug level of at least 3. Returns 0 on success. */
|
||||||
static int
|
static int
|
||||||
bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length,
|
bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length,
|
||||||
@ -2956,7 +2956,7 @@ ccid_transceive_apdu_level (ccid_driver_t handle,
|
|||||||
bit 3 unused
|
bit 3 unused
|
||||||
bit 2..0 Source Node Address (SAD)
|
bit 2..0 Source Node Address (SAD)
|
||||||
|
|
||||||
If node adresses are not used, SAD and DAD should be set to 0 on
|
If node addresses are not used, SAD and DAD should be set to 0 on
|
||||||
the first block sent to the card. If they are used they should
|
the first block sent to the card. If they are used they should
|
||||||
have different values (0 for one is okay); that first block sets up
|
have different values (0 for one is okay); that first block sets up
|
||||||
the addresses of the nodes.
|
the addresses of the nodes.
|
||||||
@ -3298,7 +3298,7 @@ ccid_transceive (ccid_driver_t handle,
|
|||||||
/* Wait time extension request. */
|
/* Wait time extension request. */
|
||||||
unsigned char bwi = tpdu[3];
|
unsigned char bwi = tpdu[3];
|
||||||
|
|
||||||
/* Check if it's unsual value which can't be expressed in ATR. */
|
/* Check if it's unusual value which can't be expressed in ATR. */
|
||||||
if (bwi > 15)
|
if (bwi > 15)
|
||||||
wait_more = 1;
|
wait_more = 1;
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ iso7816_put_data_odd (int slot, int extended_mode, int tag,
|
|||||||
|
|
||||||
/* Manage Security Environment. This is a weird operation and there
|
/* Manage Security Environment. This is a weird operation and there
|
||||||
is no easy abstraction for it. Furthermore, some card seem to have
|
is no easy abstraction for it. Furthermore, some card seem to have
|
||||||
a different interpreation of 7816-8 and thus we resort to let the
|
a different interpretation of 7816-8 and thus we resort to let the
|
||||||
caller decide what to do. */
|
caller decide what to do. */
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
iso7816_manage_security_env (int slot, int p1, int p2,
|
iso7816_manage_security_env (int slot, int p1, int p2,
|
||||||
@ -445,7 +445,7 @@ iso7816_manage_security_env (int slot, int p1, int p2,
|
|||||||
|
|
||||||
|
|
||||||
/* Perform the security operation COMPUTE DIGITAL SIGANTURE. On
|
/* Perform the security operation COMPUTE DIGITAL SIGANTURE. On
|
||||||
success 0 is returned and the data is availavle in a newly
|
success 0 is returned and the data is available in a newly
|
||||||
allocated buffer stored at RESULT with its length stored at
|
allocated buffer stored at RESULT with its length stored at
|
||||||
RESULTLEN. For LE see do_generate_keypair. */
|
RESULTLEN. For LE see do_generate_keypair. */
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
|
@ -1069,7 +1069,7 @@ handle_signal (int signo)
|
|||||||
/* Create a name for the socket. We check for valid characters as
|
/* Create a name for the socket. We check for valid characters as
|
||||||
well as against a maximum allowed length for a unix domain socket
|
well as against a maximum allowed length for a unix domain socket
|
||||||
is done. The function terminates the process in case of an error.
|
is done. The function terminates the process in case of an error.
|
||||||
Retunrs: Pointer to an allcoated string with the absolute name of
|
Returns: Pointer to an allcoated string with the absolute name of
|
||||||
the socket used. */
|
the socket used. */
|
||||||
static char *
|
static char *
|
||||||
create_socket_name (char *standard_name)
|
create_socket_name (char *standard_name)
|
||||||
|
@ -474,7 +474,7 @@ isvalid_status_cb (void *opaque, const char *line)
|
|||||||
{
|
{
|
||||||
parm->seen++;
|
parm->seen++;
|
||||||
if (!*s || !unhexify_fpr (s, parm->fpr))
|
if (!*s || !unhexify_fpr (s, parm->fpr))
|
||||||
parm->seen++; /* Bumb it to indicate an error. */
|
parm->seen++; /* Bump it to indicate an error. */
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -669,7 +669,7 @@ find_up (ctrl_t ctrl, KEYDB_HANDLE kh,
|
|||||||
log_debug (" found via authid and sn+issuer\n");
|
log_debug (" found via authid and sn+issuer\n");
|
||||||
|
|
||||||
/* In case of an error, try to get the certificate from the
|
/* In case of an error, try to get the certificate from the
|
||||||
dirmngr. That is done by trying to put that certifcate
|
dirmngr. That is done by trying to put that certificate
|
||||||
into the ephemeral DB and let the code below do the
|
into the ephemeral DB and let the code below do the
|
||||||
actual retrieve. Thus there is no error checking.
|
actual retrieve. Thus there is no error checking.
|
||||||
Skipped in find_next mode as usual. */
|
Skipped in find_next mode as usual. */
|
||||||
@ -908,7 +908,7 @@ is_root_cert (ksba_cert_t cert, const char *issuerdn, const char *subjectdn)
|
|||||||
{
|
{
|
||||||
if (gpg_err_code (err) == GPG_ERR_NO_DATA)
|
if (gpg_err_code (err) == GPG_ERR_NO_DATA)
|
||||||
return 1; /* Yes. Without a authorityKeyIdentifier this needs
|
return 1; /* Yes. Without a authorityKeyIdentifier this needs
|
||||||
to be the Root certifcate (our trust anchor). */
|
to be the Root certificate (our trust anchor). */
|
||||||
log_error ("error getting authorityKeyIdentifier: %s\n",
|
log_error ("error getting authorityKeyIdentifier: %s\n",
|
||||||
gpg_strerror (err));
|
gpg_strerror (err));
|
||||||
return 0; /* Well, it is broken anyway. Return No. */
|
return 0; /* Well, it is broken anyway. Return No. */
|
||||||
@ -1103,7 +1103,7 @@ check_validity_period (ksba_isotime_t current_time,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This is a variant of check_validity_period used with the chain
|
/* This is a variant of check_validity_period used with the chain
|
||||||
model. The dextra contraint here is that notBefore and notAfter
|
model. The extra constraint here is that notBefore and notAfter
|
||||||
must exists and if the additional argument CHECK_TIME is given this
|
must exists and if the additional argument CHECK_TIME is given this
|
||||||
time is used to check the validity period of SUBJECT_CERT. */
|
time is used to check the validity period of SUBJECT_CERT. */
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
@ -1553,7 +1553,7 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg,
|
|||||||
if (rc)
|
if (rc)
|
||||||
goto leave;
|
goto leave;
|
||||||
|
|
||||||
break; /* Okay: a self-signed certicate is an end-point. */
|
break; /* Okay: a self-signed certificate is an end-point. */
|
||||||
} /* End is_root. */
|
} /* End is_root. */
|
||||||
|
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ gpgsm_add_to_certlist (ctrl_t ctrl, const char *name, int secret,
|
|||||||
|
|
||||||
Further we ignore them if they are due to an
|
Further we ignore them if they are due to an
|
||||||
identical certificate (which may happen if a
|
identical certificate (which may happen if a
|
||||||
certificate is accidential duplicated in the
|
certificate is accidentally duplicated in the
|
||||||
keybox). */
|
keybox). */
|
||||||
if (!keydb_get_cert (kh, &cert2))
|
if (!keydb_get_cert (kh, &cert2))
|
||||||
{
|
{
|
||||||
@ -533,7 +533,7 @@ gpgsm_find_cert (ctrl_t ctrl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If we don't have the KEYID filter we need to check for
|
/* If we don't have the KEYID filter we need to check for
|
||||||
ambiguous search results. Note, that it is somehwat
|
ambiguous search results. Note, that it is somewhat
|
||||||
reasonable to assume that a specification of a KEYID
|
reasonable to assume that a specification of a KEYID
|
||||||
won't lead to ambiguous names. */
|
won't lead to ambiguous names. */
|
||||||
if (!rc && !keyid)
|
if (!rc && !keyid)
|
||||||
|
@ -86,7 +86,7 @@ store_mb_lines (membuf_t *mb, membuf_t *lines)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Chech whether we have a key for the key with HEXGRIP. Returns NULL
|
/* Check whether we have a key for the key with HEXGRIP. Returns NULL
|
||||||
if not or a string describing the type of the key (RSA, ELG, DSA,
|
if not or a string describing the type of the key (RSA, ELG, DSA,
|
||||||
etc..). */
|
etc..). */
|
||||||
static const char *
|
static const char *
|
||||||
|
@ -1571,7 +1571,7 @@ main ( int argc, char **argv)
|
|||||||
|
|
||||||
set_debug ();
|
set_debug ();
|
||||||
|
|
||||||
/* Although we always use gpgsm_exit, we better install a regualr
|
/* Although we always use gpgsm_exit, we better install a regular
|
||||||
exit handler so that at least the secure memory gets wiped
|
exit handler so that at least the secure memory gets wiped
|
||||||
out. */
|
out. */
|
||||||
if (atexit (emergency_cleanup))
|
if (atexit (emergency_cleanup))
|
||||||
|
@ -106,7 +106,7 @@ try_make_homedir (const char *fname)
|
|||||||
|
|
||||||
|
|
||||||
/* Handle the creation of a keybox if it does not yet exist. Take
|
/* Handle the creation of a keybox if it does not yet exist. Take
|
||||||
into acount that other processes might have the keybox already
|
into account that other processes might have the keybox already
|
||||||
locked. This lock check does not work if the directory itself is
|
locked. This lock check does not work if the directory itself is
|
||||||
not yet available. If R_CREATED is not NULL it will be set to true
|
not yet available. If R_CREATED is not NULL it will be set to true
|
||||||
if the function created a new keybox. */
|
if the function created a new keybox. */
|
||||||
|
@ -853,7 +853,7 @@ parse_bag_encrypted_data (const unsigned char *buffer, size_t length,
|
|||||||
if (ti.class == ASNCONTEXT && ti.tag == 0 && ti.is_constructed && ti.ndef)
|
if (ti.class == ASNCONTEXT && ti.tag == 0 && ti.is_constructed && ti.ndef)
|
||||||
{
|
{
|
||||||
/* Mozilla exported certs now come with single byte chunks of
|
/* Mozilla exported certs now come with single byte chunks of
|
||||||
octect strings. (Mozilla Firefox 1.0.4). Arghh. */
|
octet strings. (Mozilla Firefox 1.0.4). Arghh. */
|
||||||
where = "cram-rc2or3des-ciphertext";
|
where = "cram-rc2or3des-ciphertext";
|
||||||
cram_buffer = cram_octet_string ( p, &n, &consumed);
|
cram_buffer = cram_octet_string ( p, &n, &consumed);
|
||||||
if (!cram_buffer)
|
if (!cram_buffer)
|
||||||
@ -1210,7 +1210,7 @@ parse_bag_data (const unsigned char *buffer, size_t length, int startoffset,
|
|||||||
if (ti.is_constructed && ti.ndef)
|
if (ti.is_constructed && ti.ndef)
|
||||||
{
|
{
|
||||||
/* Mozilla exported certs now come with single byte chunks of
|
/* Mozilla exported certs now come with single byte chunks of
|
||||||
octect strings. (Mozilla Firefox 1.0.4). Arghh. */
|
octet strings. (Mozilla Firefox 1.0.4). Arghh. */
|
||||||
where = "cram-data.outersegs";
|
where = "cram-data.outersegs";
|
||||||
cram_buffer = cram_octet_string ( p, &n, &consumed);
|
cram_buffer = cram_octet_string ( p, &n, &consumed);
|
||||||
if (!cram_buffer)
|
if (!cram_buffer)
|
||||||
@ -1550,7 +1550,7 @@ p12_parse (const unsigned char *buffer, size_t length, const char *pw,
|
|||||||
if (ti.is_constructed && ti.ndef)
|
if (ti.is_constructed && ti.ndef)
|
||||||
{
|
{
|
||||||
/* Mozilla exported certs now come with single byte chunks of
|
/* Mozilla exported certs now come with single byte chunks of
|
||||||
octect strings. (Mozilla Firefox 1.0.4). Arghh. */
|
octet strings. (Mozilla Firefox 1.0.4). Arghh. */
|
||||||
where = "cram-bags";
|
where = "cram-bags";
|
||||||
cram_buffer = cram_octet_string ( p, &n, NULL);
|
cram_buffer = cram_octet_string ( p, &n, NULL);
|
||||||
if (!cram_buffer)
|
if (!cram_buffer)
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
expanded once and non existing macros expand to the empty string.
|
expanded once and non existing macros expand to the empty string.
|
||||||
A macro is dereferenced by prefixing its name with a dollar sign;
|
A macro is dereferenced by prefixing its name with a dollar sign;
|
||||||
the end of the name is currently indicated by a white space, a
|
the end of the name is currently indicated by a white space, a
|
||||||
dollar sign or a slash. To use a dollor sign verbatim, double it.
|
dollar sign or a slash. To use a dollar sign verbatim, double it.
|
||||||
|
|
||||||
A macro is assigned by prefixing a statement with the macro name
|
A macro is assigned by prefixing a statement with the macro name
|
||||||
and an equal sign. The value is assigned verbatim if it does not
|
and an equal sign. The value is assigned verbatim if it does not
|
||||||
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
[<name> =] <statement> [<args>]
|
[<name> =] <statement> [<args>]
|
||||||
|
|
||||||
If NAME is not specifed but the statement returns a value it is
|
If NAME is not specified but the statement returns a value it is
|
||||||
assigned to the name "?" so that it can be referenced using "$?".
|
assigned to the name "?" so that it can be referenced using "$?".
|
||||||
The following commands are implemented:
|
The following commands are implemented:
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ writen (int fd, const char *buffer, size_t length)
|
|||||||
type and store that in recv_type. The function terminates on a
|
type and store that in recv_type. The function terminates on a
|
||||||
communication error. Returns a pointer into the inputline to the
|
communication error. Returns a pointer into the inputline to the
|
||||||
first byte of the arguments. The parsing is very strict to match
|
first byte of the arguments. The parsing is very strict to match
|
||||||
exaclty what we want to send. */
|
exactly what we want to send. */
|
||||||
static char *
|
static char *
|
||||||
read_assuan (int fd)
|
read_assuan (int fd)
|
||||||
{
|
{
|
||||||
@ -397,7 +397,7 @@ write_assuan (int fd, const char *line)
|
|||||||
|
|
||||||
/* Start the server with path PGMNAME and connect its stdout and
|
/* Start the server with path PGMNAME and connect its stdout and
|
||||||
strerr to a newly created pipes; the file descriptors are then
|
strerr to a newly created pipes; the file descriptors are then
|
||||||
store in the gloabl variables SERVER_SEND_FD and
|
store in the global variables SERVER_SEND_FD and
|
||||||
SERVER_RECV_FD. The initial handcheck is performed.*/
|
SERVER_RECV_FD. The initial handcheck is performed.*/
|
||||||
static void
|
static void
|
||||||
start_server (const char *pgmname)
|
start_server (const char *pgmname)
|
||||||
@ -468,7 +468,7 @@ start_server (const char *pgmname)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Script intepreter. */
|
/* Script interpreter. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
unset_var (const char *name)
|
unset_var (const char *name)
|
||||||
|
@ -91,7 +91,7 @@ static struct
|
|||||||
enum {
|
enum {
|
||||||
PAT_NULL, /* Indicates end of the array. */
|
PAT_NULL, /* Indicates end of the array. */
|
||||||
PAT_STRING, /* The pattern is a simple string. */
|
PAT_STRING, /* The pattern is a simple string. */
|
||||||
PAT_REGEX /* The pattern is an extended regualr expression. */
|
PAT_REGEX /* The pattern is an extended regualar expression. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -823,7 +823,7 @@ main (int argc, char **argv)
|
|||||||
;
|
;
|
||||||
else if (rmdir (socketdir))
|
else if (rmdir (socketdir))
|
||||||
{
|
{
|
||||||
/* If the director is not empty we first try to delet
|
/* If the director is not empty we first try to delete
|
||||||
* socket files. */
|
* socket files. */
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
if (gpg_err_code (err) == GPG_ERR_ENOTEMPTY
|
if (gpg_err_code (err) == GPG_ERR_ENOTEMPTY
|
||||||
|
@ -50,7 +50,7 @@ struct mime_parser_context_s
|
|||||||
{
|
{
|
||||||
void *cookie; /* Cookie passed to all callbacks. */
|
void *cookie; /* Cookie passed to all callbacks. */
|
||||||
|
|
||||||
/* The callback to announce the transation from header to body. */
|
/* The callback to announce the transition from header to body. */
|
||||||
gpg_error_t (*t2body) (void *cookie, int level);
|
gpg_error_t (*t2body) (void *cookie, int level);
|
||||||
|
|
||||||
/* The callback to announce a new part. */
|
/* The callback to announce a new part. */
|
||||||
|
@ -114,7 +114,7 @@ gcry_free (void *a)
|
|||||||
|
|
||||||
|
|
||||||
/* We need this dummy because exechelp.c uses gcry_control to
|
/* We need this dummy because exechelp.c uses gcry_control to
|
||||||
terminate the secure memeory. */
|
terminate the secure memory. */
|
||||||
gcry_error_t
|
gcry_error_t
|
||||||
gcry_control (enum gcry_ctl_cmds cmd, ...)
|
gcry_control (enum gcry_ctl_cmds cmd, ...)
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ struct rfc822parse_context
|
|||||||
void *callback_value;
|
void *callback_value;
|
||||||
int callback_error;
|
int callback_error;
|
||||||
int in_body;
|
int in_body;
|
||||||
int in_preamble; /* Wether we are before the first boundary. */
|
int in_preamble; /* Whether we are before the first boundary. */
|
||||||
part_t parts; /* The tree of parts. */
|
part_t parts; /* The tree of parts. */
|
||||||
part_t current_part; /* Whom we are processing (points into parts). */
|
part_t current_part; /* Whom we are processing (points into parts). */
|
||||||
const char *boundary; /* Current boundary. */
|
const char *boundary; /* Current boundary. */
|
||||||
@ -176,7 +176,7 @@ my_stpcpy (char *a,const char *b)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* If a callback has been registerd, call it for the event of type
|
/* If a callback has been registered, call it for the event of type
|
||||||
EVENT. */
|
EVENT. */
|
||||||
static int
|
static int
|
||||||
do_callback (rfc822parse_t msg, rfc822parse_event_t event)
|
do_callback (rfc822parse_t msg, rfc822parse_event_t event)
|
||||||
@ -643,7 +643,7 @@ rfc822parse_get_field (rfc822parse_t msg, const char *name, int which,
|
|||||||
|
|
||||||
/****************
|
/****************
|
||||||
* Enumerate all header. Caller has to provide the address of a pointer
|
* Enumerate all header. Caller has to provide the address of a pointer
|
||||||
* which has to be initialzed to NULL, the caller should then never change this
|
* which has to be initialized to NULL, the caller should then never change this
|
||||||
* pointer until he has closed the enumeration by passing again the address
|
* pointer until he has closed the enumeration by passing again the address
|
||||||
* of the pointer but with msg set to NULL.
|
* of the pointer but with msg set to NULL.
|
||||||
* The function returns pointers to all the header lines or NULL when
|
* The function returns pointers to all the header lines or NULL when
|
||||||
@ -681,7 +681,7 @@ rfc822parse_enum_header_lines (rfc822parse_t msg, void **context)
|
|||||||
* >0 : Retrieve the n-th field
|
* >0 : Retrieve the n-th field
|
||||||
|
|
||||||
* RPREV may be used to return the predecessor of the returned field;
|
* RPREV may be used to return the predecessor of the returned field;
|
||||||
* which may be NULL for the very first one. It has to be initialzed
|
* which may be NULL for the very first one. It has to be initialized
|
||||||
* to either NULL in which case the search start at the first header line,
|
* to either NULL in which case the search start at the first header line,
|
||||||
* or it may point to a headerline, where the search should start
|
* or it may point to a headerline, where the search should start
|
||||||
*/
|
*/
|
||||||
@ -1078,7 +1078,7 @@ is_parameter (TOKEN t)
|
|||||||
parse context is valid; NULL is returned in case that attr is not
|
parse context is valid; NULL is returned in case that attr is not
|
||||||
defined in the header, a missing value is reppresented by an empty string.
|
defined in the header, a missing value is reppresented by an empty string.
|
||||||
|
|
||||||
With LOWER_VALUE set to true, a matching field valuebe be
|
With LOWER_VALUE set to true, a matching field value will be
|
||||||
lowercased.
|
lowercased.
|
||||||
|
|
||||||
Note, that ATTR should be lowercase.
|
Note, that ATTR should be lowercase.
|
||||||
|
@ -65,7 +65,7 @@ wks_set_status_fd (int fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Write a status line with code NO followed by the outout of the
|
/* Write a status line with code NO followed by the output of the
|
||||||
* printf style FORMAT. The caller needs to make sure that LFs and
|
* printf style FORMAT. The caller needs to make sure that LFs and
|
||||||
* CRs are not printed. */
|
* CRs are not printed. */
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user