diff options
author | Simon Josefsson <simon@josefsson.org> | 2010-12-06 16:47:25 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2010-12-06 16:47:25 +0100 |
commit | c236da00885163f387a0bc62897de7126265d59a (patch) | |
tree | 0f7530d1685b774581fc1aa6f189e14ceec0d145 /lib/pkcs11_write.c | |
parent | 6a6d50ece46ca63ea0fa2c6f87c7563c4025c561 (diff) | |
download | gnutls-c236da00885163f387a0bc62897de7126265d59a.tar.gz |
Indent code.
Diffstat (limited to 'lib/pkcs11_write.c')
-rw-r--r-- | lib/pkcs11_write.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/pkcs11_write.c b/lib/pkcs11_write.c index 34fb921ace..b3235bb64d 100644 --- a/lib/pkcs11_write.c +++ b/lib/pkcs11_write.c @@ -593,8 +593,7 @@ gnutls_pkcs11_delete_url (const char *object_url, unsigned int flags) **/ int gnutls_pkcs11_token_init (const char *token_url, - const char* so_pin, - const char *label) + const char *so_pin, const char *label) { int ret; struct pkcs11_url_info info; @@ -610,19 +609,21 @@ gnutls_pkcs11_token_init (const char *token_url, return ret; } - ret = pkcs11_find_slot(&module, &slot, &info, NULL); + ret = pkcs11_find_slot (&module, &slot, &info, NULL); if (ret < 0) { - gnutls_assert(); + gnutls_assert (); return ret; } /* so it seems memset has other uses than zeroing! */ - memset(flabel, ' ', sizeof(flabel)); + memset (flabel, ' ', sizeof (flabel)); if (label != NULL) - memcpy(flabel, label, strlen(label)); + memcpy (flabel, label, strlen (label)); - rv = pakchois_init_token(module, slot, (char*)so_pin, strlen(so_pin), flabel); + rv = + pakchois_init_token (module, slot, (char *) so_pin, strlen (so_pin), + flabel); if (rv != CKR_OK) { gnutls_assert (); @@ -650,9 +651,8 @@ gnutls_pkcs11_token_init (const char *token_url, **/ int gnutls_pkcs11_token_set_pin (const char *token_url, - const char* oldpin, - const char* newpin, - unsigned int flags) + const char *oldpin, + const char *newpin, unsigned int flags) { int ret; pakchois_session_t *pks; @@ -667,22 +667,22 @@ gnutls_pkcs11_token_set_pin (const char *token_url, return ret; } - if (((flags & GNUTLS_PKCS11_PIN_USER) && oldpin == NULL) || - (flags & GNUTLS_PKCS11_PIN_SO)) - ses_flags = SESSION_WRITE|SESSION_LOGIN|SESSION_SO; - else - ses_flags = SESSION_WRITE|SESSION_LOGIN; + if (((flags & GNUTLS_PKCS11_PIN_USER) && oldpin == NULL) || + (flags & GNUTLS_PKCS11_PIN_SO)) + ses_flags = SESSION_WRITE | SESSION_LOGIN | SESSION_SO; + else + ses_flags = SESSION_WRITE | SESSION_LOGIN; ret = pkcs11_open_session (&pks, &info, ses_flags); if (ret < 0) { - gnutls_assert(); + gnutls_assert (); return ret; } if (oldpin == NULL) { - rv = pakchois_init_pin(pks, (char*)newpin, strlen(newpin)); + rv = pakchois_init_pin (pks, (char *) newpin, strlen (newpin)); if (rv != CKR_OK) { gnutls_assert (); @@ -693,9 +693,9 @@ gnutls_pkcs11_token_set_pin (const char *token_url, } else { - rv = pakchois_set_pin(pks, - (char*)oldpin, strlen(oldpin), - (char*)newpin, strlen(newpin)); + rv = pakchois_set_pin (pks, + (char *) oldpin, strlen (oldpin), + (char *) newpin, strlen (newpin)); if (rv != CKR_OK) { gnutls_assert (); |