summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/ecdsa/ecs_sign.c
diff options
context:
space:
mode:
authorGary Ching-Pang Lin <glin@suse.com>2015-05-12 13:51:02 -0400
committerPeter Jones <pjones@redhat.com>2015-05-12 13:51:02 -0400
commitf3653b08a475372a0849cd9a3387a5997ce121c9 (patch)
treea3149decea22d31dfe81cc7054f55d65fc45f46a /Cryptlib/OpenSSL/crypto/ecdsa/ecs_sign.c
parentf3af1acfec86794ae2d78f63cab100503bfc9a7b (diff)
downloadefi-boot-shim-f3653b08a475372a0849cd9a3387a5997ce121c9.tar.gz
efi-boot-shim-f3653b08a475372a0849cd9a3387a5997ce121c9.zip
Update Cryptlib and openssl
Update Cryptlib to r16559 and openssl to 0.9.8zf Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/ecdsa/ecs_sign.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/ecdsa/ecs_sign.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/Cryptlib/OpenSSL/crypto/ecdsa/ecs_sign.c b/Cryptlib/OpenSSL/crypto/ecdsa/ecs_sign.c
index 353d5af5..28652d45 100644
--- a/Cryptlib/OpenSSL/crypto/ecdsa/ecs_sign.c
+++ b/Cryptlib/OpenSSL/crypto/ecdsa/ecs_sign.c
@@ -7,7 +7,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -55,52 +55,52 @@
#include "ecs_locl.h"
#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
+# include <openssl/engine.h>
#endif
#include <openssl/rand.h>
ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey)
{
- return ECDSA_do_sign_ex(dgst, dlen, NULL, NULL, eckey);
+ return ECDSA_do_sign_ex(dgst, dlen, NULL, NULL, eckey);
}
ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dlen,
- const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey)
+ const BIGNUM *kinv, const BIGNUM *rp,
+ EC_KEY *eckey)
{
- ECDSA_DATA *ecdsa = ecdsa_check(eckey);
- if (ecdsa == NULL)
- return NULL;
- return ecdsa->meth->ecdsa_do_sign(dgst, dlen, kinv, rp, eckey);
+ ECDSA_DATA *ecdsa = ecdsa_check(eckey);
+ if (ecdsa == NULL)
+ return NULL;
+ return ecdsa->meth->ecdsa_do_sign(dgst, dlen, kinv, rp, eckey);
}
-int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char
- *sig, unsigned int *siglen, EC_KEY *eckey)
+int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char
+ *sig, unsigned int *siglen, EC_KEY *eckey)
{
- return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, NULL, NULL, eckey);
+ return ECDSA_sign_ex(type, dgst, dlen, sig, siglen, NULL, NULL, eckey);
}
-int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen, unsigned char
- *sig, unsigned int *siglen, const BIGNUM *kinv, const BIGNUM *r,
- EC_KEY *eckey)
+int ECDSA_sign_ex(int type, const unsigned char *dgst, int dlen, unsigned char
+ *sig, unsigned int *siglen, const BIGNUM *kinv,
+ const BIGNUM *r, EC_KEY *eckey)
{
- ECDSA_SIG *s;
- RAND_seed(dgst, dlen);
- s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
- if (s == NULL)
- {
- *siglen=0;
- return 0;
- }
- *siglen = i2d_ECDSA_SIG(s, &sig);
- ECDSA_SIG_free(s);
- return 1;
+ ECDSA_SIG *s;
+ RAND_seed(dgst, dlen);
+ s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
+ if (s == NULL) {
+ *siglen = 0;
+ return 0;
+ }
+ *siglen = i2d_ECDSA_SIG(s, &sig);
+ ECDSA_SIG_free(s);
+ return 1;
}
-int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
- BIGNUM **rp)
+int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
+ BIGNUM **rp)
{
- ECDSA_DATA *ecdsa = ecdsa_check(eckey);
- if (ecdsa == NULL)
- return 0;
- return ecdsa->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp);
+ ECDSA_DATA *ecdsa = ecdsa_check(eckey);
+ if (ecdsa == NULL)
+ return 0;
+ return ecdsa->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp);
}