[pkg-opensc-commit] [pkcs11-helper] 219/253: cleanup: remove trailing blanks
Eric Dorland
eric at moszumanska.debian.org
Fri Jan 6 23:39:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository pkcs11-helper.
commit 9da3d54353d3e78ee96ffbd689f5acaa0e3485fe
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date: Sat Sep 14 22:03:07 2013 +0300
cleanup: remove trailing blanks
Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>
---
include/pkcs11-helper-1.0/pkcs11h-certificate.h | 4 +-
include/pkcs11-helper-1.0/pkcs11h-core.h | 4 +-
lib/_pkcs11h-core.h | 2 +-
lib/_pkcs11h-crypto-cryptoapi.c | 4 +-
lib/_pkcs11h-crypto-gnutls.c | 2 +-
lib/pkcs11h-certificate.c | 54 ++++++++++++-------------
lib/pkcs11h-core.c | 20 ++++-----
lib/pkcs11h-data.c | 8 ++--
lib/pkcs11h-openssl.c | 42 +++++++++----------
lib/pkcs11h-session.c | 20 ++++-----
lib/pkcs11h-slotevent.c | 18 ++++-----
lib/pkcs11h-threading.c | 8 ++--
lib/pkcs11h-token.c | 14 +++----
lib/pkcs11h-util.c | 2 +-
tests/test-certificate/test-certificate.c | 4 +-
15 files changed, 103 insertions(+), 103 deletions(-)
diff --git a/include/pkcs11-helper-1.0/pkcs11h-certificate.h b/include/pkcs11-helper-1.0/pkcs11h-certificate.h
index 8885c77..51b162a 100644
--- a/include/pkcs11-helper-1.0/pkcs11h-certificate.h
+++ b/include/pkcs11-helper-1.0/pkcs11h-certificate.h
@@ -66,7 +66,7 @@
/**
* @example test-certificate.c
- *
+ *
* The following example shows some basic usage of the certificate interface.
*/
@@ -190,7 +190,7 @@ pkcs11h_certificate_freeCertificate (
* @see pkcs11h_certificate_freeCertificate().
* @remarks
* The certificate id object may not specify the certificate blob.
- */
+ */
CK_RV
pkcs11h_certificate_create (
IN const pkcs11h_certificate_id_t certificate_id,
diff --git a/include/pkcs11-helper-1.0/pkcs11h-core.h b/include/pkcs11-helper-1.0/pkcs11h-core.h
index 2cb445f..6e705ab 100644
--- a/include/pkcs11-helper-1.0/pkcs11h-core.h
+++ b/include/pkcs11-helper-1.0/pkcs11h-core.h
@@ -340,7 +340,7 @@ pkcs11h_getLogLevel (void);
* @return CK_RV.
* @attention
* This function should be called after @ref pkcs11h_initialize()
- * @note
+ * @note
* This funciton is releavant if @ref PKCS11H_FEATURE_MASK_THREADING is set.
* If safe mode is on, the child process can use the loaded PKCS#11 providers
* but it cannot use fork(), while it is in one of the hooks functions, since
@@ -504,7 +504,7 @@ pkcs11h_forkFixup (void);
CK_RV
pkcs11h_plugAndPlay (void);
-/**
+/**
* @brief Logout from all sessions.
* @return CK_RV.
*/
diff --git a/lib/_pkcs11h-core.h b/lib/_pkcs11h-core.h
index 4223b43..4564dc1 100644
--- a/lib/_pkcs11h-core.h
+++ b/lib/_pkcs11h-core.h
@@ -112,7 +112,7 @@ struct _pkcs11h_provider_s {
PKCS11H_BOOL enabled;
char reference[1024];
char manufacturerID[sizeof (((CK_TOKEN_INFO *)NULL)->manufacturerID)+1];
-
+
#if defined(_WIN32)
HANDLE handle;
#else
diff --git a/lib/_pkcs11h-crypto-cryptoapi.c b/lib/_pkcs11h-crypto-cryptoapi.c
index 2270d1a..21c1834 100644
--- a/lib/_pkcs11h-crypto-cryptoapi.c
+++ b/lib/_pkcs11h-crypto-cryptoapi.c
@@ -260,11 +260,11 @@ __pkcs11h_crypto_cryptoapi_certificate_get_dn (
) {
goto cleanup;
}
-
+
if ((wstr = (WCHAR *)_g_pkcs11h_sys_engine.malloc (wsize * sizeof (WCHAR))) == NULL) {
goto cleanup;
}
-
+
if (
(wsize = data->p_CertNameToStrW (
X509_ASN_ENCODING,
diff --git a/lib/_pkcs11h-crypto-gnutls.c b/lib/_pkcs11h-crypto-gnutls.c
index 9704bef..5548b71 100644
--- a/lib/_pkcs11h-crypto-gnutls.c
+++ b/lib/_pkcs11h-crypto-gnutls.c
@@ -112,7 +112,7 @@ __pkcs11h_crypto_gnutls_certificate_get_expiration (
cert = NULL;
goto cleanup;
}
-
+
datum.data = (unsigned char *)blob;
datum.size = blob_size;
diff --git a/lib/pkcs11h-certificate.c b/lib/pkcs11h-certificate.c
index 48c3b7a..086e22d 100644
--- a/lib/pkcs11h-certificate.c
+++ b/lib/pkcs11h-certificate.c
@@ -175,7 +175,7 @@ _pkcs11h_certificate_isBetterCertificate (
"PKCS#11: _pkcs11h_certificate_isBetterCertificate return is_better=%d",
is_better ? 1 : 0
);
-
+
return is_better;
}
@@ -245,7 +245,7 @@ __pkcs11h_certificate_loadCertificate (
_PKCS11H_ASSERT (certificate!=NULL);
_PKCS11H_ASSERT (certificate->id!=NULL);
-
+
/* Must be after assert */
cert_filter[1].pValue = certificate->id->attrCKA_ID;
cert_filter[1].ulValueLen = certificate->id->attrCKA_ID_size;
@@ -353,7 +353,7 @@ __pkcs11h_certificate_loadCertificate (
rv = CKR_OK;
cleanup:
-
+
#if defined(ENABLE_PKCS11H_THREADING)
if (mutex_locked) {
_pkcs11h_threading_mutexRelease (&certificate->session->mutex);
@@ -589,7 +589,7 @@ cleanup:
mutex_locked = FALSE;
}
#endif
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: __pkcs11h_certificate_getKeyAttributes return rv=%lu-'%s'",
@@ -660,7 +660,7 @@ _pkcs11h_certificate_resetSession (
CK_RV rv = CKR_FUNCTION_FAILED;
_PKCS11H_ASSERT (certificate!=NULL);
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: _pkcs11h_certificate_resetSession entry certificate=%p, public_only=%d, session_mutex_locked=%d",
@@ -796,7 +796,7 @@ __pkcs11h_certificate_doPrivateOperation (
CK_OBJECT_CLASS class = CKO_SECRET_KEY;
CK_KEY_TYPE keytype = CKK_GENERIC_SECRET;
CK_ATTRIBUTE wrap_attrs[] = {
- {CKA_CLASS, &class, sizeof (class)},
+ {CKA_CLASS, &class, sizeof (class)},
{CKA_KEY_TYPE, &keytype, sizeof (keytype)},
{CKA_EXTRACTABLE, &wrap_attrs_true, sizeof (wrap_attrs_true)}
/* OpenSC fail! {CKA_TOKEN, &wrap_attrs_false, sizeof (wrap_attrs_false)} */
@@ -805,7 +805,7 @@ __pkcs11h_certificate_doPrivateOperation (
{CKA_VALUE, target, 0}
};
CK_OBJECT_HANDLE wrap_key = _PKCS11H_INVALID_OBJECT_HANDLE;
-
+
CK_RV rv = CKR_FUNCTION_FAILED;
PKCS11H_BOOL login_retry = FALSE;
PKCS11H_BOOL op_succeed = FALSE;
@@ -1050,7 +1050,7 @@ cleanup:
pkcs11h_getMessage (rv),
*p_target_size
);
-
+
return rv;
}
@@ -1149,7 +1149,7 @@ cleanup:
pkcs11h_getMessage (rv),
(void *)*to
);
-
+
return rv;
}
@@ -1203,7 +1203,7 @@ cleanup:
rv,
pkcs11h_getMessage (rv)
);
-
+
return rv;
}
@@ -1355,7 +1355,7 @@ cleanup:
pkcs11h_getMessage (rv),
*p_target_size
);
-
+
return rv;
}
@@ -1612,7 +1612,7 @@ pkcs11h_certificate_signAny (
goto cleanup;
}
}
-
+
if (
!acked &&
(certificate->mask_private_mode & PKCS11H_PRIVATEMODE_MASK_RECOVER) != 0
@@ -1648,7 +1648,7 @@ pkcs11h_certificate_signAny (
rv = CKR_OK;
cleanup:
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: pkcs11h_certificate_signAny return rv=%lu-'%s', *p_target_size="P_Z"",
@@ -1726,7 +1726,7 @@ pkcs11h_certificate_decryptAny (
goto cleanup;
}
}
-
+
if (
!acked &&
(certificate->mask_private_mode & PKCS11H_PRIVATEMODE_MASK_UNWRAP) != 0
@@ -1762,7 +1762,7 @@ pkcs11h_certificate_decryptAny (
rv = CKR_OK;
cleanup:
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: pkcs11h_certificate_decryptAny return rv=%lu-'%s', *p_target_size="P_Z"",
@@ -1900,7 +1900,7 @@ cleanup:
pkcs11h_getMessage (rv),
(void *)*p_certificate
);
-
+
return rv;
}
@@ -1995,7 +1995,7 @@ pkcs11h_certificate_getCertificateBlob (
#endif
CK_RV rv = CKR_FUNCTION_FAILED;
size_t certifiate_blob_size_max = 0;
-
+
_PKCS11H_ASSERT (_g_pkcs11h_data!=NULL);
_PKCS11H_ASSERT (_g_pkcs11h_data->initialized);
_PKCS11H_ASSERT (certificate!=NULL);
@@ -2064,7 +2064,7 @@ pkcs11h_certificate_getCertificateBlob (
rv = CKR_BUFFER_TOO_SMALL;
goto cleanup;
}
-
+
memmove (
certificate_blob,
certificate->id->certificate_blob,
@@ -2174,7 +2174,7 @@ pkcs11h_certificate_ensureCertificateAccess (
) {
goto cleanup;
}
-
+
validCert = TRUE;
}
@@ -2197,7 +2197,7 @@ cleanup:
rv,
pkcs11h_getMessage (rv)
);
-
+
return rv;
}
@@ -2304,7 +2304,7 @@ cleanup:
rv,
pkcs11h_getMessage (rv)
);
-
+
return rv;
}
@@ -2332,7 +2332,7 @@ _pkcs11h_certificate_enumSessionCertificates (
user_data,
mask_prompt
);
-
+
/* THREADS: NO NEED TO LOCK, GLOBAL CACHE IS LOCKED */
#if defined(ENABLE_PKCS11H_THREADING)
if ((rv = _pkcs11h_threading_mutexLock (&session->mutex)) != CKR_OK) {
@@ -2367,11 +2367,11 @@ _pkcs11h_certificate_enumSessionCertificates (
) {
goto retry;
}
-
+
for (i=0;i < objects_found;i++) {
pkcs11h_certificate_id_t certificate_id = NULL;
pkcs11h_certificate_id_list_t new_element = NULL;
-
+
CK_ATTRIBUTE attrs[] = {
{CKA_ID, NULL, 0},
{CKA_VALUE, NULL, 0}
@@ -2451,7 +2451,7 @@ _pkcs11h_certificate_enumSessionCertificates (
op_succeed = TRUE;
rv = CKR_OK;
-
+
retry:
if (objects != NULL) {
@@ -2794,7 +2794,7 @@ cleanup:
rv,
pkcs11h_getMessage (rv)
);
-
+
return rv;
}
@@ -3045,7 +3045,7 @@ cleanup:
rv,
pkcs11h_getMessage (rv)
);
-
+
return rv;
}
diff --git a/lib/pkcs11h-core.c b/lib/pkcs11h-core.c
index b139307..3edd094 100644
--- a/lib/pkcs11h-core.c
+++ b/lib/pkcs11h-core.c
@@ -364,7 +364,7 @@ cleanup:
has_mutex_cache = FALSE;
}
if (has_mutex_session) {
- _pkcs11h_threading_mutexFree (&data->mutexes.session);
+ _pkcs11h_threading_mutexFree (&data->mutexes.session);
has_mutex_session = FALSE;
}
#endif
@@ -464,7 +464,7 @@ pkcs11h_terminate (void) {
PKCS11H_LOG_DEBUG1,
"PKCS#11: Marking as uninitialized"
);
-
+
_g_pkcs11h_data->initialized = FALSE;
while (_g_pkcs11h_data->providers != NULL) {
@@ -475,9 +475,9 @@ pkcs11h_terminate (void) {
}
#if defined(ENABLE_PKCS11H_THREADING)
- _pkcs11h_threading_mutexFree (&_g_pkcs11h_data->mutexes.global);
+ _pkcs11h_threading_mutexFree (&_g_pkcs11h_data->mutexes.global);
_pkcs11h_threading_mutexFree (&_g_pkcs11h_data->mutexes.cache);
- _pkcs11h_threading_mutexFree (&_g_pkcs11h_data->mutexes.session);
+ _pkcs11h_threading_mutexFree (&_g_pkcs11h_data->mutexes.session);
#endif
_g_pkcs11h_crypto_engine.uninitialize (_g_pkcs11h_crypto_engine.global_data);
@@ -710,7 +710,7 @@ pkcs11h_addProvider (
provider->slot_event_method = slot_event_method;
provider->slot_poll_interval = slot_poll_interval;
provider->cert_is_private = cert_is_private;
-
+
#if defined(_WIN32)
provider->handle = LoadLibraryA (provider_location);
#else
@@ -736,7 +736,7 @@ pkcs11h_addProvider (
"C_GetFunctionList"
);
memmove (
- &gfl,
+ &gfl,
&p,
sizeof (void *)
);
@@ -921,7 +921,7 @@ pkcs11h_removeProvider (
#if defined(ENABLE_PKCS11H_SLOTEVENT)
_pkcs11h_slotevent_notify ();
-
+
/*
* Wait until manager join this thread
* this happens saldom so I can poll
@@ -947,7 +947,7 @@ pkcs11h_removeProvider (
rv = CKR_OK;
cleanup:
-
+
#if defined(ENABLE_PKCS11H_THREADING)
for (
current_session = _g_pkcs11h_data->sessions;
@@ -1133,7 +1133,7 @@ _pkcs11h_log (
if (
_g_pkcs11h_data != NULL &&
_g_pkcs11h_data->initialized
- ) {
+ ) {
if (__PKCS11H_MSG_LEVEL_TEST (flags)) {
if (_g_pkcs11h_data->hooks.log == NULL) {
__pkcs11h_hooks_default_log (
@@ -1225,7 +1225,7 @@ __pkcs11h_hooks_default_pin_prompt (
user_data,
token->display
);
-
+
return FALSE;
}
diff --git a/lib/pkcs11h-data.c b/lib/pkcs11h-data.c
index 4274cc2..a817602 100644
--- a/lib/pkcs11h-data.c
+++ b/lib/pkcs11h-data.c
@@ -74,7 +74,7 @@ _pkcs11h_data_getObject (
CK_OBJECT_HANDLE *objects = NULL;
CK_ULONG objects_found = 0;
CK_RV rv = CKR_FUNCTION_FAILED;
-
+
_PKCS11H_ASSERT (session!=NULL);
_PKCS11H_ASSERT (application!=NULL);
_PKCS11H_ASSERT (label!=NULL);
@@ -219,7 +219,7 @@ pkcs11h_data_get (
op_succeed = TRUE;
rv = CKR_OK;
-
+
retry:
if (!op_succeed) {
@@ -372,7 +372,7 @@ pkcs11h_data_put (
) {
goto retry;
}
-
+
op_succeed = TRUE;
rv = CKR_OK;
@@ -785,7 +785,7 @@ cleanup:
pkcs11h_getMessage (rv),
(void *)*p_data_id_list
);
-
+
return rv;
}
diff --git a/lib/pkcs11h-openssl.c b/lib/pkcs11h-openssl.c
index 6ac6525..a3454dd 100644
--- a/lib/pkcs11h-openssl.c
+++ b/lib/pkcs11h-openssl.c
@@ -127,13 +127,13 @@ static
pkcs11h_openssl_session_t
__pkcs11h_openssl_get_openssl_session (
IN OUT const RSA *rsa
-);
+);
static
pkcs11h_certificate_t
__pkcs11h_openssl_get_pkcs11h_certificate (
IN OUT const RSA *rsa
-);
+);
static
pkcs11h_openssl_session_t
@@ -141,7 +141,7 @@ __pkcs11h_openssl_get_openssl_session (
IN OUT const RSA *rsa
) {
pkcs11h_openssl_session_t session;
-
+
_PKCS11H_ASSERT (rsa!=NULL);
#if OPENSSL_VERSION_NUMBER < 0x00907000L
session = (pkcs11h_openssl_session_t)RSA_get_app_data ((RSA *)rsa);
@@ -159,7 +159,7 @@ __pkcs11h_openssl_get_pkcs11h_certificate (
IN OUT const RSA *rsa
) {
pkcs11h_openssl_session_t session = __pkcs11h_openssl_get_openssl_session (rsa);
-
+
_PKCS11H_ASSERT (session!=NULL);
_PKCS11H_ASSERT (session->certificate!=NULL);
@@ -264,7 +264,7 @@ cleanup:
pkcs11h_getMessage (rv)
);
- return rv == CKR_OK ? (int)tlen : -1;
+ return rv == CKR_OK ? (int)tlen : -1;
}
#if OPENSSL_VERSION_NUMBER < 0x00907000L
@@ -354,7 +354,7 @@ cleanup:
pkcs11h_getMessage (rv)
);
- return rv == CKR_OK ? (int)tlen : -1;
+ return rv == CKR_OK ? (int)tlen : -1;
}
static
@@ -371,7 +371,7 @@ __pkcs11h_openssl_finish (
);
RSA_set_app_data (rsa, NULL);
-
+
if (openssl_session->orig_finish != NULL) {
openssl_session->orig_finish (rsa);
@@ -398,7 +398,7 @@ __pkcs11h_openssl_finish (
PKCS11H_LOG_DEBUG2,
"PKCS#11: __pkcs11h_openssl_finish - return"
);
-
+
return 1;
}
@@ -467,7 +467,7 @@ cleanup:
x509 = NULL;
}
}
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: pkcs11h_openssl_getX509 - return rv=%ld-'%s', x509=%p",
@@ -525,7 +525,7 @@ cleanup:
if (!ok) {
_pkcs11h_mem_free ((void *)&openssl_session);
}
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: pkcs11h_openssl_createSession - return openssl_session=%p",
@@ -560,7 +560,7 @@ pkcs11h_openssl_freeSession (
) {
_PKCS11H_ASSERT (openssl_session!=NULL);
_PKCS11H_ASSERT (openssl_session->reference_count>0);
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: pkcs11h_openssl_freeSession - entry openssl_session=%p, count=%d",
@@ -569,7 +569,7 @@ pkcs11h_openssl_freeSession (
);
openssl_session->reference_count--;
-
+
if (openssl_session->reference_count == 0) {
if (openssl_session->cleanup_hook != NULL) {
openssl_session->cleanup_hook (openssl_session->certificate);
@@ -583,7 +583,7 @@ pkcs11h_openssl_freeSession (
pkcs11h_certificate_freeCertificate (openssl_session->certificate);
openssl_session->certificate = NULL;
}
-
+
_pkcs11h_mem_free ((void *)&openssl_session);
}
@@ -611,7 +611,7 @@ pkcs11h_openssl_session_getRSA (
"PKCS#11: pkcs11h_openssl_session_getRSA - entry openssl_session=%p",
(void *)openssl_session
);
-
+
/*
* Dup x509 so RSA will not hold session x509
*/
@@ -624,7 +624,7 @@ pkcs11h_openssl_session_getRSA (
_PKCS11H_LOG (PKCS11H_LOG_WARN, "PKCS#11: Cannot get public key");
goto cleanup;
}
-
+
if (pubkey->type != EVP_PKEY_RSA) {
_PKCS11H_LOG (PKCS11H_LOG_WARN, "PKCS#11: Invalid public key algorithm");
goto cleanup;
@@ -640,7 +640,7 @@ pkcs11h_openssl_session_getRSA (
RSA_set_method (rsa, &openssl_session->smart_rsa);
RSA_set_app_data (rsa, openssl_session);
openssl_session->reference_count++;
-
+
#ifdef BROKEN_OPENSSL_ENGINE
if (!rsa->engine) {
rsa->engine = ENGINE_get_default_RSA ();
@@ -649,7 +649,7 @@ pkcs11h_openssl_session_getRSA (
ENGINE_set_RSA(ENGINE_get_default_RSA (), &openssl_session->smart_rsa);
_PKCS11H_LOG (PKCS11H_LOG_WARN, "PKCS#11: OpenSSL engine support is broken! Workaround enabled");
#endif
-
+
rsa->flags |= RSA_FLAG_SIGN_VER;
openssl_session->initialized = TRUE;
@@ -677,7 +677,7 @@ cleanup:
X509_free (x509);
x509 = NULL;
}
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: pkcs11h_openssl_session_getRSA - return rsa=%p",
@@ -693,7 +693,7 @@ pkcs11h_openssl_session_getX509 (
) {
X509 *x509 = NULL;
PKCS11H_BOOL ok = FALSE;
-
+
_PKCS11H_ASSERT (openssl_session!=NULL);
_PKCS11H_DEBUG (
@@ -705,7 +705,7 @@ pkcs11h_openssl_session_getX509 (
if (
openssl_session->x509 == NULL &&
(openssl_session->x509 = pkcs11h_openssl_getX509 (openssl_session->certificate)) == NULL
- ) {
+ ) {
_PKCS11H_LOG (PKCS11H_LOG_WARN, "PKCS#11: Cannot get certificate object");
goto cleanup;
}
@@ -725,7 +725,7 @@ cleanup:
x509 = NULL;
}
}
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: pkcs11h_openssl_session_getX509 - return x509=%p",
diff --git a/lib/pkcs11h-session.c b/lib/pkcs11h-session.c
index 050064a..81fbefd 100644
--- a/lib/pkcs11h-session.c
+++ b/lib/pkcs11h-session.c
@@ -276,7 +276,7 @@ _pkcs11h_session_findObjects (
_PKCS11H_ASSERT (!(filter==NULL && filter_attrs!=0) || filter!=NULL);
_PKCS11H_ASSERT (p_objects!=NULL);
_PKCS11H_ASSERT (p_objects_found!=NULL);
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: _pkcs11h_session_findObjects entry session=%p, filter=%p, filter_attrs=%ld, p_objects=%p, p_objects_found=%p",
@@ -309,9 +309,9 @@ _pkcs11h_session_findObjects (
&objects_found
)) == CKR_OK &&
objects_found > 0
- ) {
+ ) {
CK_OBJECT_HANDLE *temp = NULL;
-
+
/*
* Begin workaround
*
@@ -327,7 +327,7 @@ _pkcs11h_session_findObjects (
}
oLast = objects_buffer[0];
/* End workaround */
-
+
if (
(rv = _pkcs11h_mem_malloc (
(void *)&temp,
@@ -366,7 +366,7 @@ _pkcs11h_session_findObjects (
);
should_FindObjectsFinal = FALSE;
}
-
+
*p_objects = objects;
*p_objects_found = objects_size;
objects = NULL;
@@ -462,7 +462,7 @@ _pkcs11h_session_getSessionByTokenId (
session->reference_count = 1;
session->session_handle = _PKCS11H_INVALID_SESSION_HANDLE;
-
+
session->pin_cache_period = _g_pkcs11h_data->pin_cache_period;
if (
@@ -633,7 +633,7 @@ _pkcs11h_session_reset (
) {
continue;
}
-
+
if (
(rv = _pkcs11h_session_getSlotList (
current_provider,
@@ -739,7 +739,7 @@ _pkcs11h_session_reset (
"PKCS#11: Calling token_prompt hook for '%s'",
session->token_id->display
);
-
+
canceled = !_g_pkcs11h_data->hooks.token_prompt (
_g_pkcs11h_data->hooks.token_prompt_data,
user_data,
@@ -794,7 +794,7 @@ _pkcs11h_session_getObjectById (
CK_OBJECT_HANDLE *objects = NULL;
CK_ULONG objects_found = 0;
CK_RV rv = CKR_FUNCTION_FAILED;
-
+
/*_PKCS11H_ASSERT (session!=NULL); NOT NEEDED*/
_PKCS11H_ASSERT (id!=NULL);
_PKCS11H_ASSERT (p_handle!=NULL);
@@ -1000,7 +1000,7 @@ _pkcs11h_session_login (
while (
!login_succeeded &&
- retry_count < _g_pkcs11h_data->max_retries
+ retry_count < _g_pkcs11h_data->max_retries
) {
CK_UTF8CHAR_PTR utfPIN = NULL;
CK_ULONG lPINLength = 0;
diff --git a/lib/pkcs11h-slotevent.c b/lib/pkcs11h-slotevent.c
index e32f6e6..2e8edb3 100644
--- a/lib/pkcs11h-slotevent.c
+++ b/lib/pkcs11h-slotevent.c
@@ -130,7 +130,7 @@ __pkcs11h_slotevent_provider (
if (
provider->slot_event_method == PKCS11H_SLOTEVENT_METHOD_AUTO ||
provider->slot_event_method == PKCS11H_SLOTEVENT_METHOD_TRIGGER
- ) {
+ ) {
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG1,
"PKCS#11: Setup slotevent provider='%s' checking trigger",
@@ -163,7 +163,7 @@ __pkcs11h_slotevent_provider (
if (
provider->slot_event_method == PKCS11H_SLOTEVENT_METHOD_AUTO ||
provider->slot_event_method == PKCS11H_SLOTEVENT_METHOD_POLL
- ) {
+ ) {
PKCS11H_BOOL had_sleep = TRUE;
_PKCS11H_DEBUG (
@@ -210,7 +210,7 @@ __pkcs11h_slotevent_provider (
if (
provider->slot_event_method == PKCS11H_SLOTEVENT_METHOD_AUTO ||
provider->slot_event_method == PKCS11H_SLOTEVENT_METHOD_FETCH
- ) {
+ ) {
unsigned long last_checksum = 0;
PKCS11H_BOOL is_first_time = TRUE;
@@ -271,7 +271,7 @@ __pkcs11h_slotevent_provider (
);
}
}
-
+
if (is_first_time) {
is_first_time = FALSE;
}
@@ -295,7 +295,7 @@ __pkcs11h_slotevent_provider (
if (slots != NULL) {
_pkcs11h_mem_free ((void *)&slots);
}
-
+
if (rv != CKR_OK) {
goto cleanup;
}
@@ -451,7 +451,7 @@ _pkcs11h_slotevent_init (void) {
if ((rv = _pkcs11h_threading_condInit (&_g_pkcs11h_data->slotevent.cond_event)) != CKR_OK) {
goto cleanup;
}
-
+
if (
(rv = _pkcs11h_threading_threadStart (
&_g_pkcs11h_data->slotevent.thread,
@@ -461,7 +461,7 @@ _pkcs11h_slotevent_init (void) {
) {
goto cleanup;
}
-
+
_g_pkcs11h_data->slotevent.initialized = TRUE;
}
@@ -481,7 +481,7 @@ cleanup:
CK_RV
_pkcs11h_slotevent_notify (void) {
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: _pkcs11h_slotevent_notify entry"
@@ -512,7 +512,7 @@ _pkcs11h_slotevent_terminate_force (void) {
CK_RV
_pkcs11h_slotevent_terminate (void) {
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: _pkcs11h_slotevent_terminate entry"
diff --git a/lib/pkcs11h-threading.c b/lib/pkcs11h-threading.c
index f6c0d13..4fb9495 100644
--- a/lib/pkcs11h-threading.c
+++ b/lib/pkcs11h-threading.c
@@ -120,7 +120,7 @@ cleanup:
goto cleanup;
}
mutex_locked = TRUE;
-
+
if (
(rv = _pkcs11h_mem_malloc (
(void *)&entry,
@@ -276,7 +276,7 @@ _pkcs1h_threading_mutexLockAll (void) {
while (!all_mutexes_locked) {
PKCS11H_BOOL ok = TRUE;
-
+
for (
entry = __s_pkcs11h_threading_mutex_list.head;
entry != NULL && ok;
@@ -438,10 +438,10 @@ _pkcs11h_threading_condWait (
rv = CKR_FUNCTION_FAILED;
goto cleanup;
}
-
+
timeout.tv_sec = now.tv_sec + milli/1000;
timeout.tv_nsec = now.tv_usec*1000 + milli%1000;
-
+
if (pthread_cond_timedwait (&cond->cond, &cond->mut, &timeout)) {
rv = CKR_FUNCTION_FAILED;
goto cleanup;
diff --git a/lib/pkcs11h-token.c b/lib/pkcs11h-token.c
index 070db43..350d1dd 100644
--- a/lib/pkcs11h-token.c
+++ b/lib/pkcs11h-token.c
@@ -124,7 +124,7 @@ cleanup:
pkcs11h_getMessage (rv),
(void *)*to
);
-
+
return rv;
}
@@ -151,10 +151,10 @@ _pkcs11h_token_getTokenId (
) {
pkcs11h_token_id_t token_id;
CK_RV rv = CKR_FUNCTION_FAILED;
-
+
_PKCS11H_ASSERT (info!=NULL);
_PKCS11H_ASSERT (p_token_id!=NULL);
-
+
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
"PKCS#11: _pkcs11h_token_getTokenId entry p_token_id=%p",
@@ -276,7 +276,7 @@ pkcs11h_token_logout (
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
- "PKCS#11: pkcs11h_token_logout entry token_id=%p\n",
+ "PKCS#11: pkcs11h_token_logout entry token_id=%p\n",
(void *)token_id
);
@@ -348,7 +348,7 @@ pkcs11h_token_login (
_PKCS11H_DEBUG (
PKCS11H_LOG_DEBUG2,
- "PKCS#11: pkcs11h_token_login entry token_id=%p, readonly=%d\n",
+ "PKCS#11: pkcs11h_token_login entry token_id=%p, readonly=%d\n",
(void *)token_id,
readonly ? 1 : 0
);
@@ -696,7 +696,7 @@ pkcs11h_token_enumTokenIds (
(rv = pkcs11h_token_duplicateTokenId (
&entry->token_id,
session->token_id
- )) != CKR_OK
+ )) != CKR_OK
) {
goto retry12;
}
@@ -742,7 +742,7 @@ cleanup:
pkcs11h_getMessage (rv),
(void *)p_token_id_list
);
-
+
return rv;
}
diff --git a/lib/pkcs11h-util.c b/lib/pkcs11h-util.c
index fbad33c..0743fd1 100644
--- a/lib/pkcs11h-util.c
+++ b/lib/pkcs11h-util.c
@@ -62,7 +62,7 @@ _pkcs11h_util_fixupFixedString (
_PKCS11H_ASSERT (source!=NULL);
_PKCS11H_ASSERT (target!=NULL);
-
+
p = target+length;
memmove (target, source, length);
*p = '\0';
diff --git a/tests/test-certificate/test-certificate.c b/tests/test-certificate/test-certificate.c
index fbaf2d7..8cd28df 100644
--- a/tests/test-certificate/test-certificate.c
+++ b/tests/test-certificate/test-certificate.c
@@ -83,7 +83,7 @@ _pkcs11h_hooks_token_prompt (
}
}
- return fRet;
+ return fRet;
}
static
@@ -133,7 +133,7 @@ sign_test (const pkcs11h_certificate_t cert) {
};
CK_RV rv;
-
+
unsigned char *blob;
size_t blob_size;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/pkcs11-helper.git
More information about the pkg-opensc-commit
mailing list