projects
/
crypto.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
407862c
)
Check if key is already accelerated.
author
Pekka Riikonen
<priikone@silcnet.org>
Fri, 13 Jul 2007 20:06:16 +0000
(20:06 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Fri, 13 Jul 2007 20:06:16 +0000
(20:06 +0000)
lib/silcacc/silcacc_pkcs.c
patch
|
blob
|
history
diff --git
a/lib/silcacc/silcacc_pkcs.c
b/lib/silcacc/silcacc_pkcs.c
index c7920a29e3745668735369a964b85307c4d15d02..03395afcca64d4c69498a50d8852347b4465c490 100644
(file)
--- a/
lib/silcacc/silcacc_pkcs.c
+++ b/
lib/silcacc/silcacc_pkcs.c
@@
-280,6
+280,11
@@
SilcPublicKey silc_acc_public_key(SilcAccelerator acc,
return NULL;
}
return NULL;
}
+ if (silc_acc_get_public_key(NULL, public_key)) {
+ SILC_LOG_DEBUG(("Pubilc key %p is already accelerated", public_key));
+ return NULL;
+ }
+
/* Check that accelerator supports this public key algorithm */
alg = silc_pkcs_get_algorithm(public_key);
if (!alg)
/* Check that accelerator supports this public key algorithm */
alg = silc_pkcs_get_algorithm(public_key);
if (!alg)
@@
-363,6
+368,11
@@
SilcPrivateKey silc_acc_private_key(SilcAccelerator acc,
return NULL;
}
return NULL;
}
+ if (silc_acc_get_private_key(NULL, private_key)) {
+ SILC_LOG_DEBUG(("Private key %p is already accelerated", private_key));
+ return NULL;
+ }
+
/* Check that accelerator supports this private key algorithm */
alg = silc_pkcs_get_algorithm(private_key);
if (!alg)
/* Check that accelerator supports this private key algorithm */
alg = silc_pkcs_get_algorithm(private_key);
if (!alg)