Skip to content

Commit

Permalink
Merge pull request #2101 from marschap/master-spelling
Browse files Browse the repository at this point in the history
spelling fixes
  • Loading branch information
LudovicRousseau committed Aug 30, 2020
2 parents 8ada99b + 16c889c commit 4e0fef0
Show file tree
Hide file tree
Showing 45 changed files with 72 additions and 72 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ matrix:

env:
global:
# The next declaration are encrypted envirnmet variables, created via the
# The next declaration are encrypted environment variables, created via the
# "travis encrypt" command using the project repo's public key
# COVERITY_SCAN_TOKEN
- secure: "UkHn7wy4im8V1nebCWbAetnDSOLRUbOlF6++ovk/7Bnso1/lnhXHelyzgRxfD/oI68wm9nnRV+RQEZ9+72Ug1CyvHxyyxxkwal/tPeHH4B/L+aGdPi0id+5OZSKIm77VP3m5s102sJMJgH7DFd03+nUd0K26p0tk8ad4j1geV4c="
Expand Down Expand Up @@ -128,7 +128,7 @@ before_script:
./configure --host=$HOST --with-completiondir=/tmp --disable-openssl --disable-readline --disable-zlib --disable-notify --prefix=${TRAVIS_BUILD_DIR}/win32/opensc || cat config.log;
fi
# Optionally try to upload to Coverity Scan
# On error (propably quota is exhausted), just continue
# On error (probably quota is exhausted), just continue
- if [ "${DO_COVERITY_SCAN}" = "yes" ]; then curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash || true; fi

- if [ "${DO_SIMULATION}" = "javacard" ]; then
Expand Down
4 changes: 2 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ New separate CAC1 driver using the old CAC specification (#1502)
* Fixed --id for `C_GenerateKey`, DES and DES3 keygen mechanism (#857)
* Added `--derive-pass-der` option
* Added `--generate-random` option
* Add GOSTR3410 keypair generation
* Add GOSTR3410 key pair generation
* `npa-tool` (new)
* Allows read/write access to EAC tokens
* Allows PIN management for EAC tokens
Expand Down Expand Up @@ -513,7 +513,7 @@ New in 0.15.0; 2015-05-11
allow extended length APDUs
accept no output for 'SELECT' MF and 'SELECT' DF_NAME APDUs
fixed sc_driver_version check
adjusted send/receive size accoriding to card capabilities
adjusted send/receive size according to card capabilities
in iso7816 make SELECT agnosting to sc_path_t's aid
* asn1
support multi-bytes tags
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ AM_CONDITIONAL([HAVE_UNKNOWN_WARNING_OPTION], [test "${have_unknown_warning_opti

AC_ARG_ENABLE(
[fuzzing],
[AS_HELP_STRING([--enable-fuzzing],[enable compile of fuzzing tests @<:@disabled@:>@, note that CFLAGS and FUZZING_LIBS should be set accoringly, e.g. to something like CFLAGS="-fsanitize=address,fuzzer" FUZZING_LIBS="-fsanitize=fuzzer"])],
[AS_HELP_STRING([--enable-fuzzing],[enable compile of fuzzing tests @<:@disabled@:>@, note that CFLAGS and FUZZING_LIBS should be set accordingly, e.g. to something like CFLAGS="-fsanitize=address,fuzzer" FUZZING_LIBS="-fsanitize=fuzzer"])],
,
[enable_fuzzing="no"]
)
Expand Down
2 changes: 1 addition & 1 deletion doc/tools/pkcs11-tool.1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
<option>--moz-cert</option> <replaceable>filename</replaceable>,
<option>-z</option> <replaceable>filename</replaceable>
</term>
<listitem><para>Test a Mozilla-like keypair generation
<listitem><para>Test a Mozilla-like key pair generation
and certificate request. Specify the <replaceable>filename</replaceable>
to the certificate file.</para></listitem>
</varlistentry>
Expand Down
2 changes: 1 addition & 1 deletion etc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ nodist_noinst_DATA = opensc.conf.example

# Make sure we build this every time
# as there is no dependency for this.
# Can be removed if MSVC is not requried.
# Can be removed if MSVC is not required.
force:
opensc.conf.example: opensc.conf.example.in force

Expand Down
4 changes: 2 additions & 2 deletions etc/opensc.conf.example.in
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ app default {
# QES is only possible with a Comfort Reader (CAT-K), which holds a
# cryptographic key to authenticate itself as signature terminal (ST).
# We usually will use the reader's capability to sign the data.
# However, during develpement you may specify soft certificates and
# However, during development you may specify soft certificates and
# keys for a ST below.
# The following example EAC PKI can be found in vicc's example data:
# https://github.com/frankmorgner/vsmartcard/tree/master/virtualsmartcard/npa-example-data
Expand Down Expand Up @@ -1065,7 +1065,7 @@ app opensc-pkcs11 {
# init_pin_in_so_session: C_InitPIN() in CKU_SO logged session:
# User PIN 'UNBLOCK' is protected by SOPIN. (PUK == SOPIN).
# # Actually this style works only for the PKCS15 contents without SOPIN.
# # For those with SOPIN, this mode will be usefull for the cards without
# # For those with SOPIN, this mode will be useful for the cards without
# # modes 00 and 01 of ISO command 'RESET RETRY COUNTER'. --vt
#
# Default: none
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/apdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ size_t sc_apdu_get_length(const sc_apdu_t *apdu, unsigned int proto)
* @param apdu APDU to be encoded as an octet string
* @param proto protocol version to be used
* @param out output buffer of size outlen.
* @param outlen size of hte output buffer
* @param outlen size of the output buffer
* @return SC_SUCCESS on success and an error code otherwise
*/
int sc_apdu2bytes(sc_context_t *ctx, const sc_apdu_t *apdu,
Expand Down
4 changes: 2 additions & 2 deletions src/libopensc/card-cac.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ static int cac_parse_properties_object(sc_card_t *card, u8 type,
if (data_len < 11)
return -1;

/* Initilize: non-PKI applet */
/* Initialize: non-PKI applet */
object->privatekey = 0;

val = data;
Expand Down Expand Up @@ -1299,7 +1299,7 @@ static int cac_parse_aid(sc_card_t *card, cac_private_data_t *priv, const u8 *ai
memcpy(new_object.path.aid.value, aid, aid_len);
new_object.path.aid.len = aid_len;

/* Call without OID set will just select the AID without subseqent
/* Call without OID set will just select the AID without subsequent
* OID selection, which we need to figure out just now
*/
cac_select_file_by_type(card, &new_object.path, NULL);
Expand Down
6 changes: 3 additions & 3 deletions src/libopensc/card-cardos.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static int cardos_init(sc_card_t *card)
* Most, if not all, cardos cards do extended, but not chaining
*/
if (card->reader->max_send_size == 255 && card->reader->max_recv_size == 256) {
sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "reseting reader to use data_field_length");
sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "resetting reader to use data_field_length");
card->reader->max_send_size = data_field_length - 6;
card->reader->max_recv_size = data_field_length - 3;
}
Expand Down Expand Up @@ -628,7 +628,7 @@ static const int ef_acl[9] = {
/* XXX: ADMIN should be an ACL type of its own, or mapped
* to erase */
SC_AC_OP_UPDATE, /* ADMIN EF (modify meta information?) */
-1, /* INC (-> cylic fixed files) */
-1, /* INC (-> cyclic fixed files) */
-1 /* DEC */
};

Expand Down Expand Up @@ -1216,7 +1216,7 @@ cardos_decipher(struct sc_card *card,
r = iso_ops->decipher(card, crgram, crgram_len, out, outlen);
/*
* 5.3 supports RAW as well as PKCS1 and PSS
* decription may strip padding if card supports it
* description may strip padding if card supports it
* with cards that support RAW, it always appears to
* drop first 00 that is start of padding.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/card-entersafe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ static int entersafe_gen_key(sc_card_t *card, sc_entersafe_gen_key_data *data)

r = entersafe_transmit_apdu(card, &apdu,0,0,0,0);
LOG_TEST_RET(card->ctx, r, "APDU transmit failed");
LOG_TEST_RET(card->ctx, sc_check_sw(card,apdu.sw1,apdu.sw2),"EnterSafe generate keypair failed");
LOG_TEST_RET(card->ctx, sc_check_sw(card,apdu.sw1,apdu.sw2),"EnterSafe generate key pair failed");

/* read public key via READ PUBLIC KEY */
sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, 0xE6, 0x2A, data->key_id);
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/card-epass2003.c
Original file line number Diff line number Diff line change
Expand Up @@ -2436,7 +2436,7 @@ epass2003_gen_key(struct sc_card *card, sc_epass2003_gen_key_data * data)
r = sc_transmit_apdu_t(card, &apdu);
LOG_TEST_RET(card->ctx, r, "APDU transmit failed");
r = sc_check_sw(card, apdu.sw1, apdu.sw2);
LOG_TEST_RET(card->ctx, r, "generate keypair failed");
LOG_TEST_RET(card->ctx, r, "generate key pair failed");

/* read public key */
sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xb4, 0x02, 0x00);
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/card-incrypto34.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static const int ef_acl[9] = {
/* XXX: ADMIN should be an ACL type of its own, or mapped
* to erase */
-1, /* ADMIN EF (modify meta information?) */
-1, /* INC (-> cylic fixed files) */
-1, /* INC (-> cyclic fixed files) */
-1 /* DEC */
};

Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/card-isoApplet.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ isoApplet_ctl_import_key(sc_card_t *card, sc_cardctl_isoApplet_import_key_t *arg
*
* The first step is to perform a MANAGE SECURITY ENVIRONMENT as it would be done
* with on-card key generation. The second step is PUT DATA (instead of
* GENERATE ASYMMETRIC KEYPAIR).
* GENERATE ASYMMETRIC KEY PAIR).
*/

/* MANAGE SECURITY ENVIRONMENT (SET). Set the algorithm and key references. */
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/card-itacns.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ static const int ef_acl[9] = {
/* XXX: ADMIN should be an ACL type of its own, or mapped
* to erase */
SC_AC_OP_ERASE, /* ADMIN EF (modify meta information?) */
-1, /* INC (-> cylic fixed files) */
-1, /* INC (-> cyclic fixed files) */
-1 /* DEC */
};

Expand Down
8 changes: 4 additions & 4 deletions src/libopensc/card-piv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,7 @@ static int piv_get_challenge(sc_card_t *card, u8 *rnd, size_t len)
LOG_TEST_GOTO_ERR(card->ctx, r, "No support for random data");
}

/* NIST 800-73-3 says use 9B, previous verisons used 00 */
/* NIST 800-73-3 says use 9B, previous versions used 00 */
r = piv_general_io(card, 0x87, 0x00, 0x9B, sbuf, sizeof sbuf, rbuf, sizeof rbuf);
/*
* piv_get_challenge is called in a loop.
Expand Down Expand Up @@ -2619,7 +2619,7 @@ static int piv_process_discovery(sc_card_t *card)

/*
* parse a CCC to test if this is a Dual CAC/PIV
* We read teh CCC using the PIV API.
* We read the CCC using the PIV API.
* Look for CAC RID=A0 00 00 00 79
*/
static int piv_parse_ccc(sc_card_t *card, u8* rbuf, size_t rbuflen)
Expand Down Expand Up @@ -3161,7 +3161,7 @@ static int piv_match_card_continued(sc_card_t *card)
* Discovery Object introduced in 800-73-3 so will return 0 if found and PIV applet active.
* Will fail with SC_ERROR_FILE_NOT_FOUND if 800-73-3 and no Discovery object.
* But some other card could also return SC_ERROR_FILE_NOT_FOUND.
* Will fail for other reasons if wrong applet is selected, or bad PIV implimentation.
* Will fail for other reasons if wrong applet is selected, or bad PIV implementation.
*/

sc_debug(card->ctx,SC_LOG_DEBUG_MATCH, "PIV_MATCH card->type:%d CI:%08x r:%d\n", card->type, priv->card_issues, r);
Expand Down Expand Up @@ -3753,7 +3753,7 @@ static int piv_card_reader_lock_obtained(sc_card_t *card, int was_reset)
r = piv_select_aid(card, piv_aids[0].value, piv_aids[0].len_short, temp, &templen);
sc_debug(card->ctx,SC_LOG_DEBUG_MATCH, "PIV_MATCH piv_select_aid card->type:%d r:%d\n", card->type, r);
} else {
r = 0; /* cant do anything with this card, hope there was no interference */
r = 0; /* can't do anything with this card, hope there was no interference */
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/libopensc/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,14 @@ int sc_connect_card(sc_reader_t *reader, sc_card_t **card_out)
sc_card_t uninitialized = *card;
sc_log(ctx, "matching built-in ATRs");
for (i = 0; ctx->card_drivers[i] != NULL; i++) {
/* FIXME If we had a clean API description, we'd propably get a
/* FIXME If we had a clean API description, we'd probably get a
* cleaner implementation of the driver's match_card and init,
* which should normally *not* modify the card object if
* unsuccessful. However, after years of relentless hacking, reality
* is different: The card object is changed in virtually every card
* driver so in order to prevent unwanted interaction, we reset the
* card object here and hope that the card driver at least doesn't
* allocate any internal ressources that need to be freed. If we
* allocate any internal resources that need to be freed. If we
* had more time, we should refactor the existing code to not
* modify sc_card_t until complete success (possibly by combining
* `match_card()` and `init()`) */
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/cwa14890.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
*/
typedef struct cwa_tlv_st {
u8 *buf; /** local copy of TLV byte array */
size_t buflen; /** lengt of buffer */
size_t buflen; /** length of buffer */
unsigned int tag; /** tag ID */
size_t len; /** length of data field */
u8 *data; /** pointer to start of data in buf buffer */
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/muscle.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ int msc_get_challenge(sc_card_t *card, unsigned short dataLength, unsigned short
int msc_generate_keypair(sc_card_t *card, int privateKey, int publicKey, int algorithm, int keySize, int options)
{
sc_apdu_t apdu;
u8 buffer[16]; /* Keypair payload length */
u8 buffer[16]; /* Key pair payload length */
u8 *ptr = buffer;
int r;
unsigned short prRead = 0xFFFF, prWrite = 0x0002, prCompute = 0x0002,
Expand Down
6 changes: 3 additions & 3 deletions src/libopensc/opensc.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ struct sc_card_operations {
int (*update_binary)(struct sc_card *card, unsigned int idx,
const u8 * buf, size_t count, unsigned long flags);
/**
* @brief Sets (part of) the content fo an EF to its logical erased state
* @brief Sets (part of) the content of an EF to its logical erased state
*
* Implementation of this call back is optional and may be NULL.
*
Expand Down Expand Up @@ -915,7 +915,7 @@ int sc_bytes2apdu(sc_context_t *ctx, const u8 *buf, size_t len, sc_apdu_t *apdu)
* @param apdu APDU to be encoded as an octet string
* @param proto protocol version to be used
* @param out output buffer of size outlen.
* @param outlen size of hte output buffer
* @param outlen size of the output buffer
* @return SC_SUCCESS on success and an error code otherwise
*/
int sc_apdu2bytes(sc_context_t *ctx, const sc_apdu_t *apdu,
Expand Down Expand Up @@ -1243,7 +1243,7 @@ int sc_update_binary(struct sc_card *card, unsigned int idx, const u8 * buf,
size_t count, unsigned long flags);

/**
* Sets (part of) the content fo an EF to its logical erased state
* Sets (part of) the content of an EF to its logical erased state
* @param card struct sc_card object on which to issue the command
* @param idx index within the file for the data to be erased
* @param count number of bytes to erase
Expand Down
4 changes: 2 additions & 2 deletions src/libopensc/pkcs15-cardos.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static int cardos_fix_token_info(sc_pkcs15_card_t *p15card)
&& sa->operations == 0 && sa->algo_ref == 0)
break;

sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "supported_algos[%d] mechamism:0x%8.8x", i, sa->mechanism);
sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL, "supported_algos[%d] mechanism:0x%8.8x", i, sa->mechanism);
switch(sa->mechanism) {
case 0x01 :
/*
Expand All @@ -88,7 +88,7 @@ static int cardos_fix_token_info(sc_pkcs15_card_t *p15card)
* correct the mechanism in tokenInfo
*/
if (sa->reference & 0x10) {
sc_log(card->ctx, "Changeing mechanism to CKM_RSA_X_509 based on reference");
sc_log(card->ctx, "Changing mechanism to CKM_RSA_X_509 based on reference");
passed->new_flags |= SC_ALGORITHM_RSA_RAW
| SC_ALGORITHM_RSA_PAD_NONE;
sa->mechanism = 0x03;
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/pkcs15-openpgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ sc_pkcs15emu_openpgp_init(sc_pkcs15_card_t *p15card)
return SC_ERROR_OBJECT_NOT_VALID;
}

/* XXX: check if "halfkeys" can be stored with gpg2. If not, add keypairs in one loop */
/* XXX: check if "halfkeys" can be stored with gpg2. If not, add key pairs in one loop */
for (i = 0; i < 3; i++) {
sc_pkcs15_prkey_info_t prkey_info;
sc_pkcs15_object_t prkey_obj;
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/pkcs15-prkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ sc_pkcs15_convert_prkey(struct sc_pkcs15_prkey *pkcs15_key, void *evp_key)
dst->ecpointQ.len = buflen;

/*
* In OpenSC the field_length is in bits. Not all curves are a mutiple of 8.
* In OpenSC the field_length is in bits. Not all curves are a multiple of 8.
* EC_POINT_point2oct handles this and returns octstrings that can handle
* these curves. Get real field_length from OpenSSL.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/pkcs15-sec.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int sc_pkcs15_derive(struct sc_pkcs15_card *p15card,
* Unwrap a key into a key object on card.
* in holds the wrapped key data
* the target file that target_key points to must be created before calling this function
* Use pkcs15init to peform the complete unwrapping operation and create the pkcs#15 object for the new key.
* Use pkcs15init to perform the complete unwrapping operation and create the pkcs#15 object for the new key.
*/
int sc_pkcs15_unwrap(struct sc_pkcs15_card *p15card,
const struct sc_pkcs15_object *key,
Expand Down
4 changes: 2 additions & 2 deletions src/libopensc/reader-pcsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ static int pcsc_lock(sc_reader_t *reader)

switch (rv) {
case SCARD_E_INVALID_VALUE:
/* This is retuned in case of the same reader was re-attached */
/* This is returned in case of the same reader was re-attached */
case SCARD_E_INVALID_HANDLE:
case SCARD_E_READER_UNAVAILABLE:
r = pcsc_connect(reader);
Expand Down Expand Up @@ -1695,7 +1695,7 @@ static int pcsc_wait_for_event(sc_context_t *ctx, unsigned int event_mask, sc_re
/* Windows wants us to manually reset the changed state */
rsp->dwEventState &= ~SCARD_STATE_CHANGED;

/* By default, ignore a hotplug event as if a timout
/* By default, ignore a hotplug event as if a timeout
* occurred, since it may be an unrequested removal or
* false alarm. Just continue to loop and check at the end
* of this function whether we need to return the attached
Expand Down
4 changes: 2 additions & 2 deletions src/libopensc/sc-ossl-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ extern "C" {
*/

/*
* 1.1.0 depracated ERR_load_crypto_strings(), SSL_load_error_strings(), ERR_free_strings()
* 1.1.0 deprecated ERR_load_crypto_strings(), SSL_load_error_strings(), ERR_free_strings()
* and ENGINE_load_dynamic.EVP_CIPHER_CTX_cleanup and EVP_CIPHER_CTX_init are replaced
* by EVP_CIPHER_CTX_reset.
* But for compatability with LibreSSL and older OpenSSL. OpenSC uses the older functions
* But for compatibility with LibreSSL and older OpenSSL. OpenSC uses the older functions
*/
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
# if defined(OPENSSL_API_COMPAT) && OPENSSL_API_COMPAT >= 0x10100000L
Expand Down
2 changes: 1 addition & 1 deletion src/minidriver/minidriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4759,7 +4759,7 @@ DWORD WINAPI CardSignData(__in PCARD_DATA pCardData, __inout PCARD_SIGNING_INFO
if (0 == (CARD_PADDING_INFO_PRESENT & pInfo->dwSigningFlags)) {
/* When CARD_PADDING_INFO_PRESENT is not set in dwSigningFlags, this is
* the basic version of the signing structure. (If this is not the
* basic verison of the signing structure, the minidriver should return
* basic version of the signing structure, the minidriver should return
* ERROR_REVISION_MISMATCH.) The minidriver should only do PKCS1
* padding and use the value in aiHashAlg. */
logprintf(pCardData, 3, "CARD_PADDING_INFO_PRESENT not set\n");
Expand Down

0 comments on commit 4e0fef0

Please sign in to comment.