diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/pem/pvkfmt.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/libcrypto/pem/pvkfmt.c b/src/lib/libcrypto/pem/pvkfmt.c index d998a67fa5..5f130c4528 100644 --- a/src/lib/libcrypto/pem/pvkfmt.c +++ b/src/lib/libcrypto/pem/pvkfmt.c | |||
| @@ -662,7 +662,7 @@ static int do_PVK_header(const unsigned char **in, unsigned int length, | |||
| 662 | 662 | ||
| 663 | { | 663 | { |
| 664 | const unsigned char *p = *in; | 664 | const unsigned char *p = *in; |
| 665 | unsigned int pvk_magic, keytype, is_encrypted; | 665 | unsigned int pvk_magic, is_encrypted; |
| 666 | if (skip_magic) | 666 | if (skip_magic) |
| 667 | { | 667 | { |
| 668 | if (length < 20) | 668 | if (length < 20) |
| @@ -689,7 +689,7 @@ static int do_PVK_header(const unsigned char **in, unsigned int length, | |||
| 689 | } | 689 | } |
| 690 | /* Skip reserved */ | 690 | /* Skip reserved */ |
| 691 | p += 4; | 691 | p += 4; |
| 692 | keytype = read_ledword(&p); | 692 | /*keytype = */read_ledword(&p); |
| 693 | is_encrypted = read_ledword(&p); | 693 | is_encrypted = read_ledword(&p); |
| 694 | *psaltlen = read_ledword(&p); | 694 | *psaltlen = read_ledword(&p); |
| 695 | *pkeylen = read_ledword(&p); | 695 | *pkeylen = read_ledword(&p); |
| @@ -839,7 +839,7 @@ EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u) | |||
| 839 | static int i2b_PVK(unsigned char **out, EVP_PKEY*pk, int enclevel, | 839 | static int i2b_PVK(unsigned char **out, EVP_PKEY*pk, int enclevel, |
| 840 | pem_password_cb *cb, void *u) | 840 | pem_password_cb *cb, void *u) |
| 841 | { | 841 | { |
| 842 | int outlen = 24, noinc, pklen; | 842 | int outlen = 24, pklen; |
| 843 | unsigned char *p, *salt = NULL; | 843 | unsigned char *p, *salt = NULL; |
| 844 | if (enclevel) | 844 | if (enclevel) |
| 845 | outlen += PVK_SALTLEN; | 845 | outlen += PVK_SALTLEN; |
| @@ -850,10 +850,7 @@ static int i2b_PVK(unsigned char **out, EVP_PKEY*pk, int enclevel, | |||
| 850 | if (!out) | 850 | if (!out) |
| 851 | return outlen; | 851 | return outlen; |
| 852 | if (*out) | 852 | if (*out) |
| 853 | { | ||
| 854 | p = *out; | 853 | p = *out; |
| 855 | noinc = 0; | ||
| 856 | } | ||
| 857 | else | 854 | else |
| 858 | { | 855 | { |
| 859 | p = OPENSSL_malloc(outlen); | 856 | p = OPENSSL_malloc(outlen); |
| @@ -863,7 +860,6 @@ static int i2b_PVK(unsigned char **out, EVP_PKEY*pk, int enclevel, | |||
| 863 | return -1; | 860 | return -1; |
| 864 | } | 861 | } |
| 865 | *out = p; | 862 | *out = p; |
| 866 | noinc = 1; | ||
| 867 | } | 863 | } |
| 868 | 864 | ||
| 869 | write_ledword(&p, MS_PVKMAGIC); | 865 | write_ledword(&p, MS_PVKMAGIC); |
