Permalink
Browse files

Expanded tabs to spaces.

  • Loading branch information...
1 parent fd691de commit aa4f86164365d6cd991c2484b3ffe872c9428bf8 @gknauf gknauf committed Dec 22, 2010
Showing with 39 additions and 39 deletions.
  1. +1 −1 example/ssh2_agent.c
  2. +5 −5 src/agent.c
  3. +6 −6 src/crypt.c
  4. +1 −1 src/kex.c
  5. +5 −5 src/libgcrypt.c
  6. +10 −10 src/libgcrypt.h
  7. +11 −11 src/openssl.c
View
2 example/ssh2_agent.c
@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
username, identity->comment);
break;
}
- prev_identity = identity;
+ prev_identity = identity;
}
if (rc) {
fprintf(stderr, "Couldn't continue authentication\n");
View
10 src/agent.c
@@ -268,7 +268,7 @@ agent_connect_pageant(LIBSSH2_AGENT *agent)
HWND hwnd;
hwnd = FindWindow("Pageant", "Pageant");
if (!hwnd)
- return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
+ return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
"failed connecting agent");
agent->fd = 0; /* Mark as the connection has been established */
return LIBSSH2_ERROR_NONE;
@@ -296,7 +296,7 @@ agent_transact_pageant(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx)
sprintf(mapname, "PageantRequest%08x", (unsigned)GetCurrentThreadId());
filemap = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
- 0, PAGEANT_MAX_MSGLEN, mapname);
+ 0, PAGEANT_MAX_MSGLEN, mapname);
if (filemap == NULL || filemap == INVALID_HANDLE_VALUE)
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
@@ -312,16 +312,16 @@ agent_transact_pageant(LIBSSH2_AGENT *agent, agent_transaction_ctx_t transctx)
id = SendMessage(hwnd, WM_COPYDATA, (WPARAM) NULL, (LPARAM) &cds);
if (id > 0) {
- transctx->response_len = _libssh2_ntohu32(p);
+ transctx->response_len = _libssh2_ntohu32(p);
if (transctx->response_len > PAGEANT_MAX_MSGLEN) {
UnmapViewOfFile(p);
CloseHandle(filemap);
return _libssh2_error(agent->session, LIBSSH2_ERROR_AGENT_PROTOCOL,
"agent setup fail");
}
- transctx->response = LIBSSH2_ALLOC(agent->session,
+ transctx->response = LIBSSH2_ALLOC(agent->session,
transctx->response_len);
- if (!transctx->response) {
+ if (!transctx->response) {
UnmapViewOfFile(p);
CloseHandle(filemap);
return _libssh2_error(agent->session, LIBSSH2_ERROR_ALLOC,
View
12 src/crypt.c
@@ -242,13 +242,13 @@ crypt_init_arcfour128(LIBSSH2_SESSION * session,
int rc;
rc = crypt_init (session, method, iv, free_iv, secret, free_secret,
- encrypt, abstract);
+ encrypt, abstract);
if (rc == 0) {
- struct crypt_ctx *cctx = *(struct crypt_ctx **) abstract;
- unsigned char block[8];
- size_t discard = 1536;
- for (; discard; discard -= 8)
- _libssh2_cipher_crypt(&cctx->h, cctx->algo, cctx->encrypt, block);
+ struct crypt_ctx *cctx = *(struct crypt_ctx **) abstract;
+ unsigned char block[8];
+ size_t discard = 1536;
+ for (; discard; discard -= 8)
+ _libssh2_cipher_crypt(&cctx->h, cctx->algo, cctx->encrypt, block);
}
return rc;
View
2 src/kex.c
@@ -1135,7 +1135,7 @@ static int kexinit(LIBSSH2_SESSION * session)
} else {
data = session->kexinit_data;
data_len = session->kexinit_data_len;
- /* zap the variables to ensure there is NOT a double free later */
+ /* zap the variables to ensure there is NOT a double free later */
session->kexinit_data = NULL;
session->kexinit_data_len = 0;
}
View
10 src/libgcrypt.c
@@ -537,11 +537,11 @@ _libssh2_cipher_init(_libssh2_cipher_ctx * h,
if (mode != GCRY_CIPHER_MODE_STREAM) {
int blklen = gcry_cipher_get_algo_blklen(cipher);
- if (mode == GCRY_CIPHER_MODE_CTR)
- ret = gcry_cipher_setctr(*h, iv, blklen);
- else
- ret = gcry_cipher_setiv(*h, iv, blklen);
- if (ret) {
+ if (mode == GCRY_CIPHER_MODE_CTR)
+ ret = gcry_cipher_setctr(*h, iv, blklen);
+ else
+ ret = gcry_cipher_setiv(*h, iv, blklen);
+ if (ret) {
gcry_cipher_close(*h);
return -1;
}
View
20 src/libgcrypt.h
@@ -110,25 +110,25 @@
#define _libssh2_gcry_cipher(c) (c >> 8)
#define _libssh2_gcry_mode(m) (m & 0xFF)
-#define _libssh2_cipher_aes256ctr \
+#define _libssh2_cipher_aes256ctr \
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CTR)
-#define _libssh2_cipher_aes192ctr \
+#define _libssh2_cipher_aes192ctr \
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_CTR)
-#define _libssh2_cipher_aes128ctr \
+#define _libssh2_cipher_aes128ctr \
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CTR)
-#define _libssh2_cipher_aes256 \
+#define _libssh2_cipher_aes256 \
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES256, GCRY_CIPHER_MODE_CBC)
-#define _libssh2_cipher_aes192 \
+#define _libssh2_cipher_aes192 \
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES192, GCRY_CIPHER_MODE_CBC)
-#define _libssh2_cipher_aes128 \
+#define _libssh2_cipher_aes128 \
_libssh2_gcry_ciphermode(GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CBC)
-#define _libssh2_cipher_blowfish \
+#define _libssh2_cipher_blowfish \
_libssh2_gcry_ciphermode(GCRY_CIPHER_BLOWFISH, GCRY_CIPHER_MODE_CBC)
-#define _libssh2_cipher_arcfour \
+#define _libssh2_cipher_arcfour \
_libssh2_gcry_ciphermode(GCRY_CIPHER_ARCFOUR, GCRY_CIPHER_MODE_STREAM)
-#define _libssh2_cipher_cast5 \
+#define _libssh2_cipher_cast5 \
_libssh2_gcry_ciphermode(GCRY_CIPHER_CAST5, GCRY_CIPHER_MODE_CBC)
-#define _libssh2_cipher_3des \
+#define _libssh2_cipher_3des \
_libssh2_gcry_ciphermode(GCRY_CIPHER_3DES, GCRY_CIPHER_MODE_CBC)
View
22 src/openssl.c
@@ -215,14 +215,14 @@ typedef struct
static int
aes_ctr_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
- const unsigned char *iv, int enc) /* init key */
+ const unsigned char *iv, int enc) /* init key */
{
aes_ctr_ctx *c = malloc(sizeof(*c));
const EVP_CIPHER *aes_cipher;
(void) enc;
if (c == NULL)
- return 0;
+ return 0;
switch (ctx->key_len) {
case 16:
@@ -239,7 +239,7 @@ aes_ctr_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
}
c->aes_ctx = malloc(sizeof(EVP_CIPHER_CTX));
if (c->aes_ctx == NULL)
- return 0;
+ return 0;
if (EVP_EncryptInit(c->aes_ctx, aes_cipher, key, NULL) != 1) {
return 0;
@@ -256,16 +256,16 @@ aes_ctr_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
static int
aes_ctr_do_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- const unsigned char *in,
- unsigned int inl) /* encrypt/decrypt data */
+ const unsigned char *in,
+ unsigned int inl) /* encrypt/decrypt data */
{
aes_ctr_ctx *c = EVP_CIPHER_CTX_get_app_data(ctx);
unsigned char b1[AES_BLOCK_SIZE];
size_t i = 0;
int outlen = 0;
if (inl != 16) /* libssh2 only ever encrypt one block */
- return 0;
+ return 0;
if (c == NULL) {
return 0;
@@ -283,13 +283,13 @@ aes_ctr_do_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
}
for (i = 0; i < 16; i++)
- *out++ = *in++ ^ b1[i];
+ *out++ = *in++ ^ b1[i];
i = 15;
while (c->ctr[i]++ == 0xFF) {
- if (i == 0)
- break;
- i--;
+ if (i == 0)
+ break;
+ i--;
}
return 1;
@@ -727,7 +727,7 @@ _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session,
const char *passphrase)
{
int st;
- BIO* bp;
+ BIO* bp;
EVP_PKEY* pk;
_libssh2_debug(session,

0 comments on commit aa4f861

Please sign in to comment.