diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2016-07-16 15:19:53 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2016-07-16 15:19:53 +0200 |
commit | bf372706c469764d59e9f29c39e3ecbebd72b8d2 (patch) | |
tree | 0f0e296e2d50e4a7faf99ae6fa428d2681e81ea1 /src/libstrongswan/credentials | |
parent | 518dd33c94e041db0444c7d1f33da363bb8e3faf (diff) | |
download | vyos-strongswan-bf372706c469764d59e9f29c39e3ecbebd72b8d2.tar.gz vyos-strongswan-bf372706c469764d59e9f29c39e3ecbebd72b8d2.zip |
Imported Upstream version 5.5.0
Diffstat (limited to 'src/libstrongswan/credentials')
-rw-r--r-- | src/libstrongswan/credentials/auth_cfg.h | 2 | ||||
-rw-r--r-- | src/libstrongswan/credentials/containers/pkcs12.c | 10 | ||||
-rw-r--r-- | src/libstrongswan/credentials/containers/pkcs12.h | 2 | ||||
-rw-r--r-- | src/libstrongswan/credentials/sets/mem_cred.c | 1 |
4 files changed, 8 insertions, 7 deletions
diff --git a/src/libstrongswan/credentials/auth_cfg.h b/src/libstrongswan/credentials/auth_cfg.h index 6940069de..7191dc1bc 100644 --- a/src/libstrongswan/credentials/auth_cfg.h +++ b/src/libstrongswan/credentials/auth_cfg.h @@ -78,7 +78,7 @@ enum auth_rule_t { AUTH_RULE_EAP_IDENTITY, /** EAP type to propose for peer authentication, eap_type_t */ AUTH_RULE_EAP_TYPE, - /** EAP vendor for vendor specific type, u_int32_t */ + /** EAP vendor for vendor specific type, uint32_t */ AUTH_RULE_EAP_VENDOR, /** XAUTH backend name to use, char* */ AUTH_RULE_XAUTH_BACKEND, diff --git a/src/libstrongswan/credentials/containers/pkcs12.c b/src/libstrongswan/credentials/containers/pkcs12.c index 7b812d27d..9e7815d04 100644 --- a/src/libstrongswan/credentials/containers/pkcs12.c +++ b/src/libstrongswan/credentials/containers/pkcs12.c @@ -42,8 +42,8 @@ static inline void copy_chunk(chunk_t dst, chunk_t src) */ static void add_chunks(chunk_t a, chunk_t b) { - u_int16_t sum; - u_int8_t rem = 0; + uint16_t sum; + uint8_t rem = 0; ssize_t i, j; for (i = a.len - 1, j = b.len -1; i >= 0 && j >= 0; i--, j--) @@ -64,12 +64,12 @@ static void add_chunks(chunk_t a, chunk_t b) * Do the actual key derivation with the given hasher, password and id. */ static bool derive_key(hash_algorithm_t hash, chunk_t unicode, chunk_t salt, - u_int64_t iterations, char id, chunk_t result) + uint64_t iterations, char id, chunk_t result) { chunk_t out = result, D, S, P = chunk_empty, I, Ai, B, Ij; hasher_t *hasher; size_t Slen, v, u; - u_int64_t i; + uint64_t i; bool success = FALSE; hasher = lib->crypto->create_hasher(lib->crypto, hash); @@ -149,7 +149,7 @@ end: * Described in header */ bool pkcs12_derive_key(hash_algorithm_t hash, chunk_t password, chunk_t salt, - u_int64_t iterations, pkcs12_key_type_t type, chunk_t key) + uint64_t iterations, pkcs12_key_type_t type, chunk_t key) { chunk_t unicode = chunk_empty; bool success; diff --git a/src/libstrongswan/credentials/containers/pkcs12.h b/src/libstrongswan/credentials/containers/pkcs12.h index f22ef045a..fc4fb39ce 100644 --- a/src/libstrongswan/credentials/containers/pkcs12.h +++ b/src/libstrongswan/credentials/containers/pkcs12.h @@ -73,6 +73,6 @@ struct pkcs12_t { * @return TRUE on success */ bool pkcs12_derive_key(hash_algorithm_t hash, chunk_t password, chunk_t salt, - u_int64_t iterations, pkcs12_key_type_t type, chunk_t key); + uint64_t iterations, pkcs12_key_type_t type, chunk_t key); #endif /** PKCS12_H_ @}*/ diff --git a/src/libstrongswan/credentials/sets/mem_cred.c b/src/libstrongswan/credentials/sets/mem_cred.c index 4884c4bfa..988e709ad 100644 --- a/src/libstrongswan/credentials/sets/mem_cred.c +++ b/src/libstrongswan/credentials/sets/mem_cred.c @@ -250,6 +250,7 @@ METHOD(mem_cred_t, add_crl, bool, if (new) { this->untrusted->remove_at(this->untrusted, enumerator); + current->destroy(current); } else { |