Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: crypto/bn.c

Issue 660204: Upgrade to tpm-emulator version 0.7. (Closed)
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/bn.h ('k') | crypto/hmac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/bn.c
diff --git a/crypto/bn.c b/crypto/bn.c
index 8805b0dfe14218c8c2fd7a396f80bea0c17a2d5c..ef6b9817d8637154e9156b26ae3b312be571e5cf 100644
--- a/crypto/bn.c
+++ b/crypto/bn.c
@@ -1,6 +1,5 @@
-/* Software-Based Trusted Platform Module (TPM) Emulator for Linux
- * Copyright (C) 2006 Mario Strasser <mast@gmx.net>,
- * Swiss Federal Institute of Technology (ETH) Zurich
+/* Software-based Trusted Platform Module (TPM) Emulator
+ * Copyright (C) 2004-2010 Mario Strasser <mast@gmx.net>
*
* This module is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
@@ -12,7 +11,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * $Id$
+ * $Id: bn.c 406 2010-02-19 11:08:30Z mast $
*/
#include "bn.h"
@@ -24,7 +23,7 @@ void tpm_bn_init(tpm_bn_t a)
void tpm_bn_init2(tpm_bn_t a, size_t nbits)
{
- mpz_init2(a, nbits + + GMP_NUMB_BITS);
+ mpz_init2(a, nbits + GMP_NUMB_BITS);
}
void tpm_bn_init_set(tpm_bn_t a, tpm_bn_t val)
@@ -64,7 +63,9 @@ void tpm_bn_import(tpm_bn_t out, size_t count, int order, const void *in)
void tpm_bn_export(void *out, size_t *count, int order, tpm_bn_t in)
{
- mpz_export(out, count, order, 1, 0, 0, in);
+ size_t count_out;
+ mpz_export(out, &count_out, order, 1, 0, 0, in);
+ if (count != NULL) *count = count_out;
}
int tpm_bn_cmp(tpm_bn_t a, tpm_bn_t b)
« no previous file with comments | « crypto/bn.h ('k') | crypto/hmac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698