diff options
author | Samuel Lidén Borell <samuel@slbdata.se> | 2012-01-16 20:18:58 +0100 |
---|---|---|
committer | Samuel Lidén Borell <samuel@slbdata.se> | 2012-01-16 20:18:58 +0100 |
commit | 269622555e28b29b80db1b77a5dcf8edf17f3cb0 (patch) | |
tree | bc05bb98404ddacd6d9743911e4c9661d76602fe | |
parent | 2b86e62594c15932b443165cf2371900a3659b61 (diff) | |
download | fribid-269622555e28b29b80db1b77a5dcf8edf17f3cb0.tar.gz fribid-269622555e28b29b80db1b77a5dcf8edf17f3cb0.tar.bz2 fribid-269622555e28b29b80db1b77a5dcf8edf17f3cb0.zip |
Remove useless const qualifiers
-rw-r--r-- | client/certutil.c | 4 | ||||
-rw-r--r-- | client/gtk.c | 2 | ||||
-rw-r--r-- | client/misc.c | 2 | ||||
-rw-r--r-- | client/pkcs11.c | 2 | ||||
-rw-r--r-- | client/pkcs12.c | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/client/certutil.c b/client/certutil.c index 4c90d4a..b8802f6 100644 --- a/client/certutil.c +++ b/client/certutil.c @@ -198,7 +198,7 @@ bool certutil_hasKeyUsage(X509 *cert, KeyUsage keyUsage) { usage = X509_get_ext_d2i(cert, NID_key_usage, NULL, NULL); if (usage) { - const int opensslKeyUsage = opensslKeyUsages[keyUsage]; + int opensslKeyUsage = opensslKeyUsages[keyUsage]; supported = (usage->length > 0) && ((usage->data[0] & opensslKeyUsage) == opensslKeyUsage); ASN1_BIT_STRING_free(usage); @@ -273,7 +273,7 @@ bool certutil_compareX509Names(const X509_NAME *a, const X509_NAME *b, X509 *certutil_findCert(const STACK_OF(X509) *certList, const X509_NAME *name, - const KeyUsage keyUsage, + KeyUsage keyUsage, bool orderMightDiffer) { int num = sk_X509_num(certList); for (int i = 0; i < num; i++) { diff --git a/client/gtk.c b/client/gtk.c index 845ea84..983fa65 100644 --- a/client/gtk.c +++ b/client/gtk.c @@ -420,7 +420,7 @@ static gboolean addTokenFunc(gpointer ptr) { const char *filename = (char *)token_getTag(token); // Check for errors - const TokenError error = token_getLastError(token); + TokenError error = token_getLastError(token); if (error) { platform_showError(error); return FALSE; diff --git a/client/misc.c b/client/misc.c index bbc14de..f98be38 100644 --- a/client/misc.c +++ b/client/misc.c @@ -136,7 +136,7 @@ static char *utf8_or_latin1(char *input, size_t length) { return NULL; } -char *base64_encode(const char *data, const int length) { +char *base64_encode(const char *data, int length) { if (length == 0) return strdup(""); char *base64 = (char*)g_base64_encode((const guchar*)data, length); diff --git a/client/pkcs11.c b/client/pkcs11.c index 951f541..9a71296 100644 --- a/client/pkcs11.c +++ b/client/pkcs11.c @@ -67,7 +67,7 @@ static void _backend_freeToken(PKCS11Token *token) { static X509 *findCert(const PKCS11Token *token, const X509_NAME *name, - const KeyUsage keyUsage) { + KeyUsage keyUsage) { for (unsigned int i = 0; i < token->ncerts; i++) { X509 *cert = token->certs[i].x509; if (!X509_NAME_cmp(X509_get_subject_name(cert), name) && diff --git a/client/pkcs12.c b/client/pkcs12.c index ebff588..5359595 100644 --- a/client/pkcs12.c +++ b/client/pkcs12.c @@ -76,7 +76,7 @@ static void _backend_free(Backend *backend) { * Parses a P12 file and returns a parsed representation of the file, with * a reference count so it can be shared by multiple tokens. */ -static SharedPKCS12 *pkcs12_parse(const char *p12Data, const int p12Length) { +static SharedPKCS12 *pkcs12_parse(const char *p12Data, int p12Length) { BIO *bio; PKCS12 *data; @@ -667,7 +667,7 @@ static TokenError storeCertificates(STACK_OF(X509) *certs, ASN1_BIT_STRING *usage = X509_get_ext_d2i(cert, NID_key_usage, NULL, NULL); if (name && usage && usage->length > 0) { - const KeyUsage keyUsage = + KeyUsage keyUsage = ((usage->data[0] & X509v3_KU_NON_REPUDIATION) == X509v3_KU_NON_REPUDIATION ? KeyUsage_Signing : KeyUsage_Authentication); |