summaryrefslogtreecommitdiff
path: root/src/libstrongswan/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/crypto')
-rw-r--r--src/libstrongswan/crypto/ca.c12
-rw-r--r--src/libstrongswan/crypto/crypters/des_crypter.c5
2 files changed, 12 insertions, 5 deletions
diff --git a/src/libstrongswan/crypto/ca.c b/src/libstrongswan/crypto/ca.c
index 07413e805..a78590954 100644
--- a/src/libstrongswan/crypto/ca.c
+++ b/src/libstrongswan/crypto/ca.c
@@ -345,7 +345,7 @@ static void add_crluri(private_ca_info_t *this, chunk_t uri)
strncasecmp(uri.ptr, "file", 4) != 0 &&
strncasecmp(uri.ptr, "ftp", 3) != 0))
{
- DBG1(" invalid crl uri '%#B'", uri);
+ DBG1(" invalid crl uri '%.*s'", uri.len, uri.ptr);
return;
}
else
@@ -399,7 +399,10 @@ void add_info (private_ca_info_t *this, const private_ca_info_t *that)
while (iterator->iterate(iterator, (void**)&uri))
{
- add_crluri(this, uri->get_encoding(uri));
+ if (uri->get_type(uri) == ID_DER_ASN1_GN_URI)
+ {
+ add_crluri(this, uri->get_encoding(uri));
+ }
}
iterator->destroy(iterator);
}
@@ -411,7 +414,10 @@ void add_info (private_ca_info_t *this, const private_ca_info_t *that)
while (iterator->iterate(iterator, (void**)&uri))
{
- add_ocspuri(this, uri->get_encoding(uri));
+ if (uri->get_type(uri) == ID_DER_ASN1_GN_URI)
+ {
+ add_ocspuri(this, uri->get_encoding(uri));
+ }
}
iterator->destroy(iterator);
}
diff --git a/src/libstrongswan/crypto/crypters/des_crypter.c b/src/libstrongswan/crypto/crypters/des_crypter.c
index dc5a8ff55..655cc03ce 100644
--- a/src/libstrongswan/crypto/crypters/des_crypter.c
+++ b/src/libstrongswan/crypto/crypters/des_crypter.c
@@ -871,14 +871,15 @@ static int des_set_key(des_cblock *key, des_key_schedule *schedule)
register unsigned char *in;
register DES_LONG *k;
register int i;
+ des_cblock odd;
for (i = 0; i < sizeof(des_cblock); i++)
{
- (*key)[i] = odd_parity[(*key)[i]];
+ odd[i] = odd_parity[(*key)[i]];
}
k=(DES_LONG *)schedule;
- in=(unsigned char *)key;
+ in=(unsigned char *)&odd;
c2l(in,c);
c2l(in,d);