projects
/
crypto.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14d7e2d
)
Added old public key backwards support back.
author
Pekka Riikonen
<priikone@silcnet.org>
Sun, 10 Dec 2006 16:08:40 +0000
(16:08 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Sun, 10 Dec 2006 16:08:40 +0000
(16:08 +0000)
lib/silccrypt/silcpk.c
patch
|
blob
|
history
diff --git
a/lib/silccrypt/silcpk.c
b/lib/silccrypt/silcpk.c
index d9b81cbad215b45f4669bfe33c84aaee1fff7a85..b0fd72835fcab0a660545a286e0b0117e8193d2e 100644
(file)
--- a/
lib/silccrypt/silcpk.c
+++ b/
lib/silccrypt/silcpk.c
@@
-370,6
+370,10
@@
SilcBool silc_pkcs_silc_import_public_key(unsigned char *key,
if (ret == -1)
goto err;
+ /* Backwards compatibility */
+ if (totlen == key_len)
+ totlen -= 4;
+
if (totlen + 4 != key_len)
goto err;
@@
-816,7
+820,7
@@
SilcBool silc_pkcs_silc_import_private_key_file(unsigned char *filedata,
/* Check file magic */
SILC_GET32_MSB(magic, filedata);
if (magic != SILC_PKCS_PRIVATE_KEY_MAGIC) {
- SILC_LOG_
ERROR
(("Private key does not have correct magic"));
+ SILC_LOG_
DEBUG
(("Private key does not have correct magic"));
return FALSE;
}