idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
8,600 | int SSL_get_shared_sigalgs(SSL *s, int idx,
int *psign, int *phash, int *psignhash,
unsigned char *rsig, unsigned char *rhash)
{
TLS_SIGALGS *shsigalgs = s->cert->shared_sigalgs;
if (!shsigalgs || idx >= (int)s->cert->shared_sigalgslen)
return 0;
shsigalgs += idx;
if (phash)
*phash = shsigalgs->hash_nid;... | DoS | 0 | int SSL_get_shared_sigalgs(SSL *s, int idx,
int *psign, int *phash, int *psignhash,
unsigned char *rsig, unsigned char *rhash)
{
TLS_SIGALGS *shsigalgs = s->cert->shared_sigalgs;
if (!shsigalgs || idx >= (int)s->cert->shared_sigalgslen)
return 0;
shsigalgs += idx;
if (phash)
*phash = shsigalgs->hash_nid;... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,601 | int SSL_get_sigalgs(SSL *s, int idx,
int *psign, int *phash, int *psignhash,
unsigned char *rsig, unsigned char *rhash)
{
const unsigned char *psig = s->cert->peer_sigalgs;
if (psig == NULL)
return 0;
if (idx >= 0)
{
idx <<= 1;
if (idx >= (int)s->cert->peer_sigalgslen)
return 0;
psig += idx;
if... | DoS | 0 | int SSL_get_sigalgs(SSL *s, int idx,
int *psign, int *phash, int *psignhash,
unsigned char *rsig, unsigned char *rhash)
{
const unsigned char *psig = s->cert->peer_sigalgs;
if (psig == NULL)
return 0;
if (idx >= 0)
{
idx <<= 1;
if (idx >= (int)s->cert->peer_sigalgslen)
return 0;
psig += idx;
if... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,602 | static int sig_cb(const char *elem, int len, void *arg)
{
sig_cb_st *sarg = arg;
size_t i;
char etmp[20], *p;
int sig_alg, hash_alg;
if (sarg->sigalgcnt == MAX_SIGALGLEN)
return 0;
if (len > (int)(sizeof(etmp) - 1))
return 0;
memcpy(etmp, elem, len);
etmp[len] = 0;
p = strchr(etmp, '+');
if (!p)
return... | DoS | 0 | static int sig_cb(const char *elem, int len, void *arg)
{
sig_cb_st *sarg = arg;
size_t i;
char etmp[20], *p;
int sig_alg, hash_alg;
if (sarg->sigalgcnt == MAX_SIGALGLEN)
return 0;
if (len > (int)(sizeof(etmp) - 1))
return 0;
memcpy(etmp, elem, len);
etmp[len] = 0;
p = strchr(etmp, '+');
if (!p)
return... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,603 | unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *buf, unsigned char *limit, int *al)
{
int extdatalen=0;
unsigned char *orig = buf;
unsigned char *ret = buf;
#ifndef OPENSSL_NO_EC
/* See if we support any ECC ciphersuites */
int using_ecc = 0;
if (s->version >= TLS1_VERSION || SSL_IS_DTLS(s))
{... | DoS | 0 | unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *buf, unsigned char *limit, int *al)
{
int extdatalen=0;
unsigned char *orig = buf;
unsigned char *ret = buf;
#ifndef OPENSSL_NO_EC
/* See if we support any ECC ciphersuites */
int using_ecc = 0;
if (s->version >= TLS1_VERSION || SSL_IS_DTLS(s))
{... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,604 | unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *buf, unsigned char *limit, int *al)
{
int extdatalen=0;
unsigned char *orig = buf;
unsigned char *ret = buf;
size_t i;
custom_srv_ext_record *record;
#ifndef OPENSSL_NO_NEXTPROTONEG
int next_proto_neg_seen;
#endif
#ifndef OPENSSL_NO_EC
unsigned lo... | DoS | 0 | unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *buf, unsigned char *limit, int *al)
{
int extdatalen=0;
unsigned char *orig = buf;
unsigned char *ret = buf;
size_t i;
custom_srv_ext_record *record;
#ifndef OPENSSL_NO_NEXTPROTONEG
int next_proto_neg_seen;
#endif
#ifndef OPENSSL_NO_EC
unsigned lo... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,605 | int ssl_check_clienthello_tlsext_late(SSL *s)
{
int ret = SSL_TLSEXT_ERR_OK;
int al;
/* If status request then ask callback what to do.
* Note: this must be called after servername callbacks in case
* the certificate has changed, and must be called after the cipher
* has been chosen because this may influe... | DoS | 0 | int ssl_check_clienthello_tlsext_late(SSL *s)
{
int ret = SSL_TLSEXT_ERR_OK;
int al;
/* If status request then ask callback what to do.
* Note: this must be called after servername callbacks in case
* the certificate has changed, and must be called after the cipher
* has been chosen because this may influe... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,606 | static void ssl_check_for_safari(SSL *s, const unsigned char *data, const unsigned char *d, int n) {
unsigned short type, size;
static const unsigned char kSafariExtensionsBlock[] = {
0x00, 0x0a, /* elliptic_curves extension */
0x00, 0x08, /* 8 bytes */
0x00, 0x06, /* 6 bytes of curve ids */
0x00, 0x17, /... | DoS | 0 | static void ssl_check_for_safari(SSL *s, const unsigned char *data, const unsigned char *d, int n) {
unsigned short type, size;
static const unsigned char kSafariExtensionsBlock[] = {
0x00, 0x0a, /* elliptic_curves extension */
0x00, 0x08, /* 8 bytes */
0x00, 0x06, /* 6 bytes of curve ids */
0x00, 0x17, /... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,607 | int ssl_check_serverhello_tlsext(SSL *s)
{
int ret=SSL_TLSEXT_ERR_NOACK;
int al = SSL_AD_UNRECOGNIZED_NAME;
#ifndef OPENSSL_NO_EC
/* If we are client and using an elliptic curve cryptography cipher
* suite, then if server returns an EC point formats lists extension
* it must contain uncompressed.
*/
unsigne... | DoS | 0 | int ssl_check_serverhello_tlsext(SSL *s)
{
int ret=SSL_TLSEXT_ERR_NOACK;
int al = SSL_AD_UNRECOGNIZED_NAME;
#ifndef OPENSSL_NO_EC
/* If we are client and using an elliptic curve cryptography cipher
* suite, then if server returns an EC point formats lists extension
* it must contain uncompressed.
*/
unsigne... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,608 | static char ssl_next_proto_validate(unsigned char *d, unsigned len)
{
unsigned int off = 0;
while (off < len)
{
if (d[off] == 0)
return 0;
off += d[off];
off++;
}
return off == len;
}
| DoS | 0 | static char ssl_next_proto_validate(unsigned char *d, unsigned len)
{
unsigned int off = 0;
while (off < len)
{
if (d[off] == 0)
return 0;
off += d[off];
off++;
}
return off == len;
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,609 | int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n)
{
int al = -1;
if (ssl_scan_clienthello_tlsext(s, p, d, n, &al) <= 0)
{
ssl3_send_alert(s,SSL3_AL_FATAL,al);
return 0;
}
if (ssl_check_clienthello_tlsext_early(s) <= 0)
{
SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT,S... | DoS | 0 | int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n)
{
int al = -1;
if (ssl_scan_clienthello_tlsext(s, p, d, n, &al) <= 0)
{
ssl3_send_alert(s,SSL3_AL_FATAL,al);
return 0;
}
if (ssl_check_clienthello_tlsext_early(s) <= 0)
{
SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT,S... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,610 | int ssl_prepare_serverhello_tlsext(SSL *s)
{
return 1;
}
| DoS | 0 | int ssl_prepare_serverhello_tlsext(SSL *s)
{
return 1;
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,611 | static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n, int *al)
{
unsigned short type;
unsigned short size;
unsigned short len;
unsigned char *data = *p;
int renegotiate_seen = 0;
size_t i;
s->servername_done = 0;
s->tlsext_status_type = -1;
#ifndef OPENSSL_NO_NEXTPROTONE... | DoS | 0 | static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, int n, int *al)
{
unsigned short type;
unsigned short size;
unsigned short len;
unsigned char *data = *p;
int renegotiate_seen = 0;
size_t i;
s->servername_done = 0;
s->tlsext_status_type = -1;
#ifndef OPENSSL_NO_NEXTPROTONE... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,612 | int ssl_security_cert(SSL *s, SSL_CTX *ctx, X509 *x, int vfy, int is_ee)
{
if (vfy)
vfy = SSL_SECOP_PEER;
if (is_ee)
{
if (!ssl_security_cert_key(s, ctx, x, SSL_SECOP_EE_KEY | vfy))
return SSL_R_EE_KEY_TOO_SMALL;
}
else
{
if (!ssl_security_cert_key(s, ctx, x, SSL_SECOP_CA_KEY | vfy))
return SSL_R_... | DoS | 0 | int ssl_security_cert(SSL *s, SSL_CTX *ctx, X509 *x, int vfy, int is_ee)
{
if (vfy)
vfy = SSL_SECOP_PEER;
if (is_ee)
{
if (!ssl_security_cert_key(s, ctx, x, SSL_SECOP_EE_KEY | vfy))
return SSL_R_EE_KEY_TOO_SMALL;
}
else
{
if (!ssl_security_cert_key(s, ctx, x, SSL_SECOP_CA_KEY | vfy))
return SSL_R_... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,613 | static int ssl_security_cert_sig(SSL *s, SSL_CTX *ctx, X509 *x, int op)
{
/* Lookup signature algorithm digest */
int secbits = -1, md_nid = NID_undef, sig_nid;
sig_nid = X509_get_signature_nid(x);
if (sig_nid && OBJ_find_sigid_algs(sig_nid, &md_nid, NULL))
{
const EVP_MD *md;
if (md_nid && (md = EVP_get_dig... | DoS | 0 | static int ssl_security_cert_sig(SSL *s, SSL_CTX *ctx, X509 *x, int op)
{
/* Lookup signature algorithm digest */
int secbits = -1, md_nid = NID_undef, sig_nid;
sig_nid = X509_get_signature_nid(x);
if (sig_nid && OBJ_find_sigid_algs(sig_nid, &md_nid, NULL))
{
const EVP_MD *md;
if (md_nid && (md = EVP_get_dig... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,614 | int tls12_check_peer_sigalg(const EVP_MD **pmd, SSL *s,
const unsigned char *sig, EVP_PKEY *pkey)
{
const unsigned char *sent_sigs;
size_t sent_sigslen, i;
int sigalg = tls12_get_sigid(pkey);
/* Should never happen */
if (sigalg == -1)
return -1;
/* Check key type is consistent with signature */
if (sigal... | DoS | 0 | int tls12_check_peer_sigalg(const EVP_MD **pmd, SSL *s,
const unsigned char *sig, EVP_PKEY *pkey)
{
const unsigned char *sent_sigs;
size_t sent_sigslen, i;
int sigalg = tls12_get_sigid(pkey);
/* Should never happen */
if (sigalg == -1)
return -1;
/* Check key type is consistent with signature */
if (sigal... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,615 | size_t tls12_copy_sigalgs(SSL *s, unsigned char *out,
const unsigned char *psig, size_t psiglen)
{
unsigned char *tmpout = out;
size_t i;
for (i = 0; i < psiglen; i += 2, psig += 2)
{
if (tls12_sigalg_allowed(s, SSL_SECOP_SIGALG_SUPPORTED, psig))
{
*tmpout++ = psig[0];
*tmpout++ = psig[1];
}
}... | DoS | 0 | size_t tls12_copy_sigalgs(SSL *s, unsigned char *out,
const unsigned char *psig, size_t psiglen)
{
unsigned char *tmpout = out;
size_t i;
for (i = 0; i < psiglen; i += 2, psig += 2)
{
if (tls12_sigalg_allowed(s, SSL_SECOP_SIGALG_SUPPORTED, psig))
{
*tmpout++ = psig[0];
*tmpout++ = psig[1];
}
}... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,616 | static int tls12_find_nid(int id, tls12_lookup *table, size_t tlen)
{
size_t i;
for (i = 0; i < tlen; i++)
{
if ((table[i].id) == id)
return table[i].nid;
}
return NID_undef;
}
| DoS | 0 | static int tls12_find_nid(int id, tls12_lookup *table, size_t tlen)
{
size_t i;
for (i = 0; i < tlen; i++)
{
if ((table[i].id) == id)
return table[i].nid;
}
return NID_undef;
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,617 | const EVP_MD *tls12_get_hash(unsigned char hash_alg)
{
const tls12_hash_info *inf;
#ifndef OPENSSL_FIPS
if (hash_alg == TLSEXT_hash_md5 && FIPS_mode())
return NULL;
#endif
inf = tls12_get_hash_info(hash_alg);
if (!inf || !inf->mfunc)
return NULL;
return inf->mfunc();
}
| DoS | 0 | const EVP_MD *tls12_get_hash(unsigned char hash_alg)
{
const tls12_hash_info *inf;
#ifndef OPENSSL_FIPS
if (hash_alg == TLSEXT_hash_md5 && FIPS_mode())
return NULL;
#endif
inf = tls12_get_hash_info(hash_alg);
if (!inf || !inf->mfunc)
return NULL;
return inf->mfunc();
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,618 | static const tls12_hash_info *tls12_get_hash_info(unsigned char hash_alg)
{
if (hash_alg == 0)
return NULL;
if (hash_alg > sizeof(tls12_md_info)/sizeof(tls12_md_info[0]))
return NULL;
return tls12_md_info + hash_alg - 1;
}
| DoS | 0 | static const tls12_hash_info *tls12_get_hash_info(unsigned char hash_alg)
{
if (hash_alg == 0)
return NULL;
if (hash_alg > sizeof(tls12_md_info)/sizeof(tls12_md_info[0]))
return NULL;
return tls12_md_info + hash_alg - 1;
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,619 | static int tls12_get_pkey_idx(unsigned char sig_alg)
{
switch(sig_alg)
{
#ifndef OPENSSL_NO_RSA
case TLSEXT_signature_rsa:
return SSL_PKEY_RSA_SIGN;
#endif
#ifndef OPENSSL_NO_DSA
case TLSEXT_signature_dsa:
return SSL_PKEY_DSA_SIGN;
#endif
#ifndef OPENSSL_NO_ECDSA
case TLSEXT_signature_ecdsa:
return SSL_PKE... | DoS | 0 | static int tls12_get_pkey_idx(unsigned char sig_alg)
{
switch(sig_alg)
{
#ifndef OPENSSL_NO_RSA
case TLSEXT_signature_rsa:
return SSL_PKEY_RSA_SIGN;
#endif
#ifndef OPENSSL_NO_DSA
case TLSEXT_signature_dsa:
return SSL_PKEY_DSA_SIGN;
#endif
#ifndef OPENSSL_NO_ECDSA
case TLSEXT_signature_ecdsa:
return SSL_PKE... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,620 | size_t tls12_get_psigalgs(SSL *s, const unsigned char **psigs)
{
/* If Suite B mode use Suite B sigalgs only, ignore any other
* preferences.
*/
#ifndef OPENSSL_NO_EC
switch (tls1_suiteb(s))
{
case SSL_CERT_FLAG_SUITEB_128_LOS:
*psigs = suiteb_sigalgs;
return sizeof(suiteb_sigalgs);
case SSL_CERT_FLAG_S... | DoS | 0 | size_t tls12_get_psigalgs(SSL *s, const unsigned char **psigs)
{
/* If Suite B mode use Suite B sigalgs only, ignore any other
* preferences.
*/
#ifndef OPENSSL_NO_EC
switch (tls1_suiteb(s))
{
case SSL_CERT_FLAG_SUITEB_128_LOS:
*psigs = suiteb_sigalgs;
return sizeof(suiteb_sigalgs);
case SSL_CERT_FLAG_S... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,621 | int tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md)
{
int sig_id, md_id;
if (!md)
return 0;
md_id = tls12_find_id(EVP_MD_type(md), tls12_md,
sizeof(tls12_md)/sizeof(tls12_lookup));
if (md_id == -1)
return 0;
sig_id = tls12_get_sigid(pk);
if (sig_id == -1)
return 0;
p[0] = ... | DoS | 0 | int tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md)
{
int sig_id, md_id;
if (!md)
return 0;
md_id = tls12_find_id(EVP_MD_type(md), tls12_md,
sizeof(tls12_md)/sizeof(tls12_lookup));
if (md_id == -1)
return 0;
sig_id = tls12_get_sigid(pk);
if (sig_id == -1)
return 0;
p[0] = ... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,622 | static int tls12_shared_sigalgs(SSL *s, TLS_SIGALGS *shsig,
const unsigned char *pref, size_t preflen,
const unsigned char *allow, size_t allowlen)
{
const unsigned char *ptmp, *atmp;
size_t i, j, nmatch = 0;
for (i = 0, ptmp = pref; i < preflen; i+=2, ptmp+=2)
{
/* Skip disabled hashes or signature alg... | DoS | 0 | static int tls12_shared_sigalgs(SSL *s, TLS_SIGALGS *shsig,
const unsigned char *pref, size_t preflen,
const unsigned char *allow, size_t allowlen)
{
const unsigned char *ptmp, *atmp;
size_t i, j, nmatch = 0;
for (i = 0, ptmp = pref; i < preflen; i+=2, ptmp+=2)
{
/* Skip disabled hashes or signature alg... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,623 | static int tls12_sigalg_allowed(SSL *s, int op, const unsigned char *ptmp)
{
/* See if we have an entry in the hash table and it is enabled */
const tls12_hash_info *hinf = tls12_get_hash_info(ptmp[0]);
if (!hinf || !hinf->mfunc)
return 0;
/* See if public key algorithm allowed */
if (tls12_get_pkey_idx(ptmp[1]... | DoS | 0 | static int tls12_sigalg_allowed(SSL *s, int op, const unsigned char *ptmp)
{
/* See if we have an entry in the hash table and it is enabled */
const tls12_hash_info *hinf = tls12_get_hash_info(ptmp[0]);
if (!hinf || !hinf->mfunc)
return 0;
/* See if public key algorithm allowed */
if (tls12_get_pkey_idx(ptmp[1]... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,624 | static int tls1_alpn_handle_client_hello(SSL *s, const unsigned char *data,
unsigned data_len, int *al)
{
unsigned i;
unsigned proto_len;
const unsigned char *selected;
unsigned char selected_len;
int r;
if (s->ctx->alpn_select_cb == NULL)
return 0;
if (data_len < 2)
goto parse_error;
/* data shou... | DoS | 0 | static int tls1_alpn_handle_client_hello(SSL *s, const unsigned char *data,
unsigned data_len, int *al)
{
unsigned i;
unsigned proto_len;
const unsigned char *selected;
unsigned char selected_len;
int r;
if (s->ctx->alpn_select_cb == NULL)
return 0;
if (data_len < 2)
goto parse_error;
/* data shou... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,625 | static int tls1_check_cert_param(SSL *s, X509 *x, int set_ee_md)
{
unsigned char comp_id, curve_id[2];
EVP_PKEY *pkey;
int rv;
pkey = X509_get_pubkey(x);
if (!pkey)
return 0;
/* If not EC nothing to do */
if (pkey->type != EVP_PKEY_EC)
{
EVP_PKEY_free(pkey);
return 1;
}
rv = tls1_set_ec_id(curve_id, ... | DoS | 0 | static int tls1_check_cert_param(SSL *s, X509 *x, int set_ee_md)
{
unsigned char comp_id, curve_id[2];
EVP_PKEY *pkey;
int rv;
pkey = X509_get_pubkey(x);
if (!pkey)
return 0;
/* If not EC nothing to do */
if (pkey->type != EVP_PKEY_EC)
{
EVP_PKEY_free(pkey);
return 1;
}
rv = tls1_set_ec_id(curve_id, ... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,626 | static int tls1_check_cert_param(SSL *s, X509 *x, int set_ee_md)
{
return 1;
}
| DoS | 0 | static int tls1_check_cert_param(SSL *s, X509 *x, int set_ee_md)
{
return 1;
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,627 | int tls1_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain,
int idx)
{
int i;
int rv = 0;
int check_flags = 0, strict_mode;
CERT_PKEY *cpk = NULL;
CERT *c = s->cert;
unsigned int suiteb_flags = tls1_suiteb(s);
/* idx == -1 means checking server chains */
if (idx != -1)
{
/* idx == -... | DoS | 0 | int tls1_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain,
int idx)
{
int i;
int rv = 0;
int check_flags = 0, strict_mode;
CERT_PKEY *cpk = NULL;
CERT *c = s->cert;
unsigned int suiteb_flags = tls1_suiteb(s);
/* idx == -1 means checking server chains */
if (idx != -1)
{
/* idx == -... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,628 | static int tls1_check_ec_key(SSL *s,
unsigned char *curve_id, unsigned char *comp_id)
{
const unsigned char *p;
size_t plen, i;
int j;
/* If point formats extension present check it, otherwise everything
* is supported (see RFC4492).
*/
if (comp_id && s->session->tlsext_ecpointformatlist)
{
p = s->sess... | DoS | 0 | static int tls1_check_ec_key(SSL *s,
unsigned char *curve_id, unsigned char *comp_id)
{
const unsigned char *p;
size_t plen, i;
int j;
/* If point formats extension present check it, otherwise everything
* is supported (see RFC4492).
*/
if (comp_id && s->session->tlsext_ecpointformatlist)
{
p = s->sess... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,629 | int tls1_check_ec_tmp_key(SSL *s, unsigned long cid)
{
unsigned char curve_id[2];
EC_KEY *ec = s->cert->ecdh_tmp;
#ifdef OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL
/* Allow any curve: not just those peer supports */
if (s->cert->cert_flags & SSL_CERT_FLAG_BROKEN_PROTOCOL)
return 1;
#endif
/* If Suite B, AES128 MUST use ... | DoS | 0 | int tls1_check_ec_tmp_key(SSL *s, unsigned long cid)
{
unsigned char curve_id[2];
EC_KEY *ec = s->cert->ecdh_tmp;
#ifdef OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL
/* Allow any curve: not just those peer supports */
if (s->cert->cert_flags & SSL_CERT_FLAG_BROKEN_PROTOCOL)
return 1;
#endif
/* If Suite B, AES128 MUST use ... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,630 | void tls1_clear(SSL *s)
{
ssl3_clear(s);
s->version = s->method->version;
}
| DoS | 0 | void tls1_clear(SSL *s)
{
ssl3_clear(s);
s->version = s->method->version;
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,631 | long tls1_default_timeout(void)
{
/* 2 hours, the 24 hours mentioned in the TLSv1 spec
* is way too long for http, the cache would over fill */
return(60*60*2);
}
| DoS | 0 | long tls1_default_timeout(void)
{
/* 2 hours, the 24 hours mentioned in the TLSv1 spec
* is way too long for http, the cache would over fill */
return(60*60*2);
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,632 | int tls1_ec_curve_id2nid(int curve_id)
{
/* ECC curves from draft-ietf-tls-ecc-12.txt (Oct. 17, 2005) */
if ((curve_id < 1) || ((unsigned int)curve_id >
sizeof(nid_list)/sizeof(nid_list[0])))
return 0;
return nid_list[curve_id-1].nid;
}
| DoS | 0 | int tls1_ec_curve_id2nid(int curve_id)
{
/* ECC curves from draft-ietf-tls-ecc-12.txt (Oct. 17, 2005) */
if ((curve_id < 1) || ((unsigned int)curve_id >
sizeof(nid_list)/sizeof(nid_list[0])))
return 0;
return nid_list[curve_id-1].nid;
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,633 | int tls1_ec_nid2curve_id(int nid)
{
/* ECC curves from draft-ietf-tls-ecc-12.txt (Oct. 17, 2005) */
switch (nid)
{
case NID_sect163k1: /* sect163k1 (1) */
return 1;
case NID_sect163r1: /* sect163r1 (2) */
return 2;
case NID_sect163r2: /* sect163r2 (3) */
return 3;
case NID_sect193r1: /* sect193r1 (4) */ ... | DoS | 0 | int tls1_ec_nid2curve_id(int nid)
{
/* ECC curves from draft-ietf-tls-ecc-12.txt (Oct. 17, 2005) */
switch (nid)
{
case NID_sect163k1: /* sect163k1 (1) */
return 1;
case NID_sect163r1: /* sect163r1 (2) */
return 2;
case NID_sect163r2: /* sect163r2 (3) */
return 3;
case NID_sect193r1: /* sect193r1 (4) */ ... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,634 | void tls1_free(SSL *s)
{
#ifndef OPENSSL_NO_TLSEXT
if (s->tlsext_session_ticket)
{
OPENSSL_free(s->tlsext_session_ticket);
}
#endif /* OPENSSL_NO_TLSEXT */
ssl3_free(s);
}
| DoS | 0 | void tls1_free(SSL *s)
{
#ifndef OPENSSL_NO_TLSEXT
if (s->tlsext_session_ticket)
{
OPENSSL_free(s->tlsext_session_ticket);
}
#endif /* OPENSSL_NO_TLSEXT */
ssl3_free(s);
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,635 | static void tls1_get_curvelist(SSL *s, int sess,
const unsigned char **pcurves,
size_t *pcurveslen)
{
if (sess)
{
*pcurves = s->session->tlsext_ellipticcurvelist;
*pcurveslen = s->session->tlsext_ellipticcurvelist_length;
return;
}
/* For Suite B mode only include P-256, P-384 */
switch (tls1_su... | DoS | 0 | static void tls1_get_curvelist(SSL *s, int sess,
const unsigned char **pcurves,
size_t *pcurveslen)
{
if (sess)
{
*pcurves = s->session->tlsext_ellipticcurvelist;
*pcurveslen = s->session->tlsext_ellipticcurvelist_length;
return;
}
/* For Suite B mode only include P-256, P-384 */
switch (tls1_su... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,636 | static void tls1_get_formatlist(SSL *s, const unsigned char **pformats,
size_t *pformatslen)
{
/* If we have a custom point format list use it otherwise
* use default */
if (s->tlsext_ecpointformatlist)
{
*pformats = s->tlsext_ecpointformatlist;
*pformatslen = s->tlsext_ecpointformatlist_length;
}
el... | DoS | 0 | static void tls1_get_formatlist(SSL *s, const unsigned char **pformats,
size_t *pformatslen)
{
/* If we have a custom point format list use it otherwise
* use default */
if (s->tlsext_ecpointformatlist)
{
*pformats = s->tlsext_ecpointformatlist;
*pformatslen = s->tlsext_ecpointformatlist_length;
}
el... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,637 | static void tls1_lookup_sigalg(int *phash_nid, int *psign_nid,
int *psignhash_nid, const unsigned char *data)
{
int sign_nid = 0, hash_nid = 0;
if (!phash_nid && !psign_nid && !psignhash_nid)
return;
if (phash_nid || psignhash_nid)
{
hash_nid = tls12_find_nid(data[0], tls12_md,
sizeof(tls12_md)/sizeof... | DoS | 0 | static void tls1_lookup_sigalg(int *phash_nid, int *psign_nid,
int *psignhash_nid, const unsigned char *data)
{
int sign_nid = 0, hash_nid = 0;
if (!phash_nid && !psign_nid && !psignhash_nid)
return;
if (phash_nid || psignhash_nid)
{
hash_nid = tls12_find_nid(data[0], tls12_md,
sizeof(tls12_md)/sizeof... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,638 | tls1_process_heartbeat(SSL *s)
{
unsigned char *p = &s->s3->rrec.data[0], *pl;
unsigned short hbtype;
unsigned int payload;
unsigned int padding = 16; /* Use minimum padding */
if (s->msg_callback)
s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT,
&s->s3->rrec.data[0], s->s3->rrec.length,
s, s->msg_callb... | DoS | 0 | tls1_process_heartbeat(SSL *s)
{
unsigned char *p = &s->s3->rrec.data[0], *pl;
unsigned short hbtype;
unsigned int payload;
unsigned int padding = 16; /* Use minimum padding */
if (s->msg_callback)
s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT,
&s->s3->rrec.data[0], s->s3->rrec.length,
s, s->msg_callb... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,639 | int tls1_process_sigalgs(SSL *s, const unsigned char *data, int dsize)
{
int idx;
size_t i;
const EVP_MD *md;
CERT *c = s->cert;
TLS_SIGALGS *sigptr;
/* Extension ignored for inappropriate versions */
if (!SSL_USE_SIGALGS(s))
return 1;
/* Should never happen */
if (!c)
return 0;
if (c->peer_sigalgs)
O... | DoS | 0 | int tls1_process_sigalgs(SSL *s, const unsigned char *data, int dsize)
{
int idx;
size_t i;
const EVP_MD *md;
CERT *c = s->cert;
TLS_SIGALGS *sigptr;
/* Extension ignored for inappropriate versions */
if (!SSL_USE_SIGALGS(s))
return 1;
/* Should never happen */
if (!c)
return 0;
if (c->peer_sigalgs)
O... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,640 | int tls1_process_ticket(SSL *s, unsigned char *session_id, int len,
const unsigned char *limit, SSL_SESSION **ret)
{
/* Point after session ID in client hello */
const unsigned char *p = session_id + len;
unsigned short i;
*ret = NULL;
s->tlsext_ticket_expected = 0;
/* If tickets disabled behave as if no ti... | DoS | 0 | int tls1_process_ticket(SSL *s, unsigned char *session_id, int len,
const unsigned char *limit, SSL_SESSION **ret)
{
/* Point after session ID in client hello */
const unsigned char *p = session_id + len;
unsigned short i;
*ret = NULL;
s->tlsext_ticket_expected = 0;
/* If tickets disabled behave as if no ti... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,641 | void tls1_set_cert_validity(SSL *s)
{
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_RSA_ENC);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_RSA_SIGN);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_DSA_SIGN);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_DH_RSA);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_... | DoS | 0 | void tls1_set_cert_validity(SSL *s)
{
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_RSA_ENC);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_RSA_SIGN);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_DSA_SIGN);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_DH_RSA);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,642 | int tls1_set_curves_list(unsigned char **pext, size_t *pextlen,
const char *str)
{
nid_cb_st ncb;
ncb.nidcnt = 0;
if (!CONF_parse_list(str, ':', 1, nid_cb, &ncb))
return 0;
if (pext == NULL)
return 1;
return tls1_set_curves(pext, pextlen, ncb.nid_arr, ncb.nidcnt);
}
| DoS | 0 | int tls1_set_curves_list(unsigned char **pext, size_t *pextlen,
const char *str)
{
nid_cb_st ncb;
ncb.nidcnt = 0;
if (!CONF_parse_list(str, ':', 1, nid_cb, &ncb))
return 0;
if (pext == NULL)
return 1;
return tls1_set_curves(pext, pextlen, ncb.nid_arr, ncb.nidcnt);
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,643 | static int tls1_set_ec_id(unsigned char *curve_id, unsigned char *comp_id,
EC_KEY *ec)
{
int is_prime, id;
const EC_GROUP *grp;
const EC_METHOD *meth;
if (!ec)
return 0;
/* Determine if it is a prime field */
grp = EC_KEY_get0_group(ec);
if (!grp)
return 0;
meth = EC_GROUP_method_of(grp);
if (!... | DoS | 0 | static int tls1_set_ec_id(unsigned char *curve_id, unsigned char *comp_id,
EC_KEY *ec)
{
int is_prime, id;
const EC_GROUP *grp;
const EC_METHOD *meth;
if (!ec)
return 0;
/* Determine if it is a prime field */
grp = EC_KEY_get0_group(ec);
if (!grp)
return 0;
meth = EC_GROUP_method_of(grp);
if (!... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,644 | static int tls1_set_shared_sigalgs(SSL *s)
{
const unsigned char *pref, *allow, *conf;
size_t preflen, allowlen, conflen;
size_t nmatch;
TLS_SIGALGS *salgs = NULL;
CERT *c = s->cert;
unsigned int is_suiteb = tls1_suiteb(s);
if (c->shared_sigalgs)
{
OPENSSL_free(c->shared_sigalgs);
c->shared_sigalgs = NULL... | DoS | 0 | static int tls1_set_shared_sigalgs(SSL *s)
{
const unsigned char *pref, *allow, *conf;
size_t preflen, allowlen, conflen;
size_t nmatch;
TLS_SIGALGS *salgs = NULL;
CERT *c = s->cert;
unsigned int is_suiteb = tls1_suiteb(s);
if (c->shared_sigalgs)
{
OPENSSL_free(c->shared_sigalgs);
c->shared_sigalgs = NULL... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,645 | int tls1_set_sigalgs(CERT *c, const int *psig_nids, size_t salglen, int client)
{
unsigned char *sigalgs, *sptr;
int rhash, rsign;
size_t i;
if (salglen & 1)
return 0;
sigalgs = OPENSSL_malloc(salglen);
if (sigalgs == NULL)
return 0;
for (i = 0, sptr = sigalgs; i < salglen; i+=2)
{
rhash = tls12_find_id... | DoS | 0 | int tls1_set_sigalgs(CERT *c, const int *psig_nids, size_t salglen, int client)
{
unsigned char *sigalgs, *sptr;
int rhash, rsign;
size_t i;
if (salglen & 1)
return 0;
sigalgs = OPENSSL_malloc(salglen);
if (sigalgs == NULL)
return 0;
for (i = 0, sptr = sigalgs; i < salglen; i+=2)
{
rhash = tls12_find_id... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,646 | int tls1_set_sigalgs_list(CERT *c, const char *str, int client)
{
sig_cb_st sig;
sig.sigalgcnt = 0;
if (!CONF_parse_list(str, ':', 1, sig_cb, &sig))
return 0;
if (c == NULL)
return 1;
return tls1_set_sigalgs(c, sig.sigalgs, sig.sigalgcnt, client);
}
| DoS | 0 | int tls1_set_sigalgs_list(CERT *c, const char *str, int client)
{
sig_cb_st sig;
sig.sigalgcnt = 0;
if (!CONF_parse_list(str, ':', 1, sig_cb, &sig))
return 0;
if (c == NULL)
return 1;
return tls1_set_sigalgs(c, sig.sigalgs, sig.sigalgcnt, client);
}
| @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,647 | int tls1_shared_curve(SSL *s, int nmatch)
{
const unsigned char *pref, *supp;
size_t preflen, supplen, i, j;
int k;
/* Can't do anything on client side */
if (s->server == 0)
return -1;
if (nmatch == -2)
{
if (tls1_suiteb(s))
{
/* For Suite B ciphersuite determines curve: we
* already know these... | DoS | 0 | int tls1_shared_curve(SSL *s, int nmatch)
{
const unsigned char *pref, *supp;
size_t preflen, supplen, i, j;
int k;
/* Can't do anything on client side */
if (s->server == 0)
return -1;
if (nmatch == -2)
{
if (tls1_suiteb(s))
{
/* For Suite B ciphersuite determines curve: we
* already know these... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,648 | static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
const unsigned char *sess_id, int sesslen,
SSL_SESSION **psess)
{
SSL_SESSION *sess;
unsigned char *sdec;
const unsigned char *p;
int slen, mlen, renew_ticket = 0;
unsigned char tick_hmac[EVP_MAX_MD_SIZE];
HMAC_CTX hctx;
EVP... | DoS | 0 | static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen,
const unsigned char *sess_id, int sesslen,
SSL_SESSION **psess)
{
SSL_SESSION *sess;
unsigned char *sdec;
const unsigned char *p;
int slen, mlen, renew_ticket = 0;
unsigned char tick_hmac[EVP_MAX_MD_SIZE];
HMAC_CTX hctx;
EVP... | @@ -1088,6 +1088,13 @@ void ssl_set_client_disabled(SSL *s)
c->mask_k |= SSL_kPSK;
}
#endif /* OPENSSL_NO_PSK */
+#ifndef OPENSSL_NO_SRP
+ if (!(s->srp_ctx.srp_Mask & SSL_kSRP))
+ {
+ c->mask_a |= SSL_aSRP;
+ c->mask_k |= SSL_kSRP;
+ ... | null | null | null |
8,649 | DelayedExecutor::DelayedExecutor(const KServiceAction &service, Solid::Device &device)
: m_service(service)
{
if (device.is<Solid::StorageAccess>()
&& !device.as<Solid::StorageAccess>()->isAccessible()) {
Solid::StorageAccess *access = device.as<Solid::StorageAccess>();
connect(acce... | Exec Code | 0 | DelayedExecutor::DelayedExecutor(const KServiceAction &service, Solid::Device &device)
: m_service(service)
{
if (device.is<Solid::StorageAccess>()
&& !device.as<Solid::StorageAccess>()->isAccessible()) {
Solid::StorageAccess *access = device.as<Solid::StorageAccess>();
connect(acce... | @@ -158,7 +158,7 @@ void DelayedExecutor::delayedExecute(const QString &udi)
QString exec = m_service.exec();
MacroExpander mx(device);
- mx.expandMacros(exec);
+ mx.expandMacrosShellQuote(exec);
KRun::runCommand(exec, QString(), m_service.icon(), 0);
deleteLater(); | CWE-78 | null | null |
8,650 | DeviceServiceAction::DeviceServiceAction()
: DeviceAction()
{
DeviceAction::setIconName(QStringLiteral("dialog-cancel"));
DeviceAction::setLabel(i18nc("A default name for an action without proper label", "Unknown"));
}
| Exec Code | 0 | DeviceServiceAction::DeviceServiceAction()
: DeviceAction()
{
DeviceAction::setIconName(QStringLiteral("dialog-cancel"));
DeviceAction::setLabel(i18nc("A default name for an action without proper label", "Unknown"));
}
| @@ -158,7 +158,7 @@ void DelayedExecutor::delayedExecute(const QString &udi)
QString exec = m_service.exec();
MacroExpander mx(device);
- mx.expandMacros(exec);
+ mx.expandMacrosShellQuote(exec);
KRun::runCommand(exec, QString(), m_service.icon(), 0);
deleteLater(); | CWE-78 | null | null |
8,651 | MacroExpander(const Solid::Device &device)
: KMacroExpanderBase('%'), m_device(device) {}
| Exec Code | 0 | MacroExpander(const Solid::Device &device)
: KMacroExpanderBase('%'), m_device(device) {}
| @@ -158,7 +158,7 @@ void DelayedExecutor::delayedExecute(const QString &udi)
QString exec = m_service.exec();
MacroExpander mx(device);
- mx.expandMacros(exec);
+ mx.expandMacrosShellQuote(exec);
KRun::runCommand(exec, QString(), m_service.icon(), 0);
deleteLater(); | CWE-78 | null | null |
8,652 | void DeviceServiceAction::execute(Solid::Device &device)
{
new DelayedExecutor(m_service, device);
}
| Exec Code | 0 | void DeviceServiceAction::execute(Solid::Device &device)
{
new DelayedExecutor(m_service, device);
}
| @@ -158,7 +158,7 @@ void DelayedExecutor::delayedExecute(const QString &udi)
QString exec = m_service.exec();
MacroExpander mx(device);
- mx.expandMacros(exec);
+ mx.expandMacrosShellQuote(exec);
KRun::runCommand(exec, QString(), m_service.icon(), 0);
deleteLater(); | CWE-78 | null | null |
8,653 | QString DeviceServiceAction::id() const
{
if (m_service.name().isEmpty() && m_service.exec().isEmpty()) {
return QString();
} else {
return "#Service:"+m_service.name()+m_service.exec();
}
}
| Exec Code | 0 | QString DeviceServiceAction::id() const
{
if (m_service.name().isEmpty() && m_service.exec().isEmpty()) {
return QString();
} else {
return "#Service:"+m_service.name()+m_service.exec();
}
}
| @@ -158,7 +158,7 @@ void DelayedExecutor::delayedExecute(const QString &udi)
QString exec = m_service.exec();
MacroExpander mx(device);
- mx.expandMacros(exec);
+ mx.expandMacrosShellQuote(exec);
KRun::runCommand(exec, QString(), m_service.icon(), 0);
deleteLater(); | CWE-78 | null | null |
8,654 | void DeviceServiceAction::setService(const KServiceAction& service)
{
DeviceAction::setIconName(service.icon());
DeviceAction::setLabel(service.text());
m_service = service;
}
| Exec Code | 0 | void DeviceServiceAction::setService(const KServiceAction& service)
{
DeviceAction::setIconName(service.icon());
DeviceAction::setLabel(service.text());
m_service = service;
}
| @@ -158,7 +158,7 @@ void DelayedExecutor::delayedExecute(const QString &udi)
QString exec = m_service.exec();
MacroExpander mx(device);
- mx.expandMacros(exec);
+ mx.expandMacrosShellQuote(exec);
KRun::runCommand(exec, QString(), m_service.icon(), 0);
deleteLater(); | CWE-78 | null | null |
8,655 | NotificationsEngine::NotificationsEngine( QObject* parent, const QVariantList& args )
: Plasma::DataEngine( parent, args ), m_nextId( 1 ), m_alwaysReplaceAppsList({QStringLiteral("Clementine"), QStringLiteral("Spotify"), QStringLiteral("Amarok")})
| +Info | 0 | NotificationsEngine::NotificationsEngine( QObject* parent, const QVariantList& args )
: Plasma::DataEngine( parent, args ), m_nextId( 1 ), m_alwaysReplaceAppsList({QStringLiteral("Clementine"), QStringLiteral("Spotify"), QStringLiteral("Amarok")})
| @@ -202,18 +202,19 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
qDebug() << "Currrent active notifications:" << m_activeNotifications;
qDebug() << "Guessing partOf as:" << partOf;
qDebug() << " New Notification: " << summary << body << timeout << "& Part of:" << partOf;
... | CWE-200 | null | null |
8,656 | inline void copyLineARGB32(QRgb* dst, const char* src, int width)
{
const char* end = src + width * 4;
for (; src != end; ++dst, src+=4) {
*dst = qRgba(src[0], src[1], src[2], src[3]);
}
}
| +Info | 0 | inline void copyLineARGB32(QRgb* dst, const char* src, int width)
{
const char* end = src + width * 4;
for (; src != end; ++dst, src+=4) {
*dst = qRgba(src[0], src[1], src[2], src[3]);
}
}
| @@ -202,18 +202,19 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
qDebug() << "Currrent active notifications:" << m_activeNotifications;
qDebug() << "Guessing partOf as:" << partOf;
qDebug() << " New Notification: " << summary << body << timeout << "& Part of:" << partOf;
... | CWE-200 | null | null |
8,657 | inline void copyLineRGB32(QRgb* dst, const char* src, int width)
{
const char* end = src + width * 3;
for (; src != end; ++dst, src+=3) {
*dst = qRgb(src[0], src[1], src[2]);
}
}
| +Info | 0 | inline void copyLineRGB32(QRgb* dst, const char* src, int width)
{
const char* end = src + width * 3;
for (; src != end; ++dst, src+=3) {
*dst = qRgb(src[0], src[1], src[2]);
}
}
| @@ -202,18 +202,19 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
qDebug() << "Currrent active notifications:" << m_activeNotifications;
qDebug() << "Guessing partOf as:" << partOf;
qDebug() << " New Notification: " << summary << body << timeout << "& Part of:" << partOf;
... | CWE-200 | null | null |
8,658 | static QImage decodeNotificationSpecImageHint(const QDBusArgument& arg)
{
int width, height, rowStride, hasAlpha, bitsPerSample, channels;
QByteArray pixels;
char* ptr;
char* end;
arg.beginStructure();
arg >> width >> height >> rowStride >> hasAlpha >> bitsPerSample >> channels >> pixels;
a... | +Info | 0 | static QImage decodeNotificationSpecImageHint(const QDBusArgument& arg)
{
int width, height, rowStride, hasAlpha, bitsPerSample, channels;
QByteArray pixels;
char* ptr;
char* end;
arg.beginStructure();
arg >> width >> height >> rowStride >> hasAlpha >> bitsPerSample >> channels >> pixels;
a... | @@ -202,18 +202,19 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
qDebug() << "Currrent active notifications:" << m_activeNotifications;
qDebug() << "Guessing partOf as:" << partOf;
qDebug() << " New Notification: " << summary << body << timeout << "& Part of:" << partOf;
... | CWE-200 | null | null |
8,659 | static QString findImageForSpecImagePath(const QString &_path)
{
QString path = _path;
if (path.startsWith(QLatin1String("file:"))) {
QUrl url(path);
path = url.toLocalFile();
}
return KIconLoader::global()->iconPath(path, -KIconLoader::SizeHuge,
... | +Info | 0 | static QString findImageForSpecImagePath(const QString &_path)
{
QString path = _path;
if (path.startsWith(QLatin1String("file:"))) {
QUrl url(path);
path = url.toLocalFile();
}
return KIconLoader::global()->iconPath(path, -KIconLoader::SizeHuge,
... | @@ -202,18 +202,19 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
qDebug() << "Currrent active notifications:" << m_activeNotifications;
qDebug() << "Guessing partOf as:" << partOf;
qDebug() << " New Notification: " << summary << body << timeout << "& Part of:" << partOf;
... | CWE-200 | null | null |
8,660 | void NotificationsEngine::init()
{
}
| +Info | 0 | void NotificationsEngine::init()
{
}
| @@ -202,18 +202,19 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
qDebug() << "Currrent active notifications:" << m_activeNotifications;
qDebug() << "Guessing partOf as:" << partOf;
qDebug() << " New Notification: " << summary << body << timeout << "& Part of:" << partOf;
... | CWE-200 | null | null |
8,661 | bool NotificationsEngine::registerDBusService()
{
QDBusConnection dbus = QDBusConnection::sessionBus();
bool so = dbus.registerService(QStringLiteral("org.freedesktop.Notifications"));
if (so) {
bool ro = dbus.registerObject(QStringLiteral("/org/freedesktop/Notifications"), this);
if (ro) {
... | +Info | 0 | bool NotificationsEngine::registerDBusService()
{
QDBusConnection dbus = QDBusConnection::sessionBus();
bool so = dbus.registerService(QStringLiteral("org.freedesktop.Notifications"));
if (so) {
bool ro = dbus.registerObject(QStringLiteral("/org/freedesktop/Notifications"), this);
if (ro) {
... | @@ -202,18 +202,19 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
qDebug() << "Currrent active notifications:" << m_activeNotifications;
qDebug() << "Guessing partOf as:" << partOf;
qDebug() << " New Notification: " << summary << body << timeout << "& Part of:" << partOf;
... | CWE-200 | null | null |
8,662 | NotificationsEngine::~NotificationsEngine()
{
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.unregisterService( QStringLiteral("org.freedesktop.Notifications") );
}
| +Info | 0 | NotificationsEngine::~NotificationsEngine()
{
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.unregisterService( QStringLiteral("org.freedesktop.Notifications") );
}
| @@ -202,18 +202,19 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
qDebug() << "Currrent active notifications:" << m_activeNotifications;
qDebug() << "Guessing partOf as:" << partOf;
qDebug() << " New Notification: " << summary << body << timeout << "& Part of:" << partOf;
... | CWE-200 | null | null |
8,663 | void NotificationsEngine::CloseNotification(uint id)
{
removeNotification(id, 3);
}
| +Info | 0 | void NotificationsEngine::CloseNotification(uint id)
{
removeNotification(id, 3);
}
| @@ -20,6 +20,7 @@
#include "notificationsengine.h"
#include "notificationservice.h"
#include "notificationsadaptor.h"
+#include "notificationsanitizer.h"
#include <QDebug>
#include <KConfigGroup>
@@ -261,23 +262,7 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
const QString s... | CWE-200 | null | null |
8,664 | QStringList NotificationsEngine::GetCapabilities()
{
return QStringList()
<< QStringLiteral("body")
<< QStringLiteral("body-hyperlinks")
<< QStringLiteral("body-markup")
<< QStringLiteral("icon-static")
<< QStringLiteral("actions")
;
}
| +Info | 0 | QStringList NotificationsEngine::GetCapabilities()
{
return QStringList()
<< QStringLiteral("body")
<< QStringLiteral("body-hyperlinks")
<< QStringLiteral("body-markup")
<< QStringLiteral("icon-static")
<< QStringLiteral("actions")
;
}
| @@ -20,6 +20,7 @@
#include "notificationsengine.h"
#include "notificationservice.h"
#include "notificationsadaptor.h"
+#include "notificationsanitizer.h"
#include <QDebug>
#include <KConfigGroup>
@@ -261,23 +262,7 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
const QString s... | CWE-200 | null | null |
8,665 | QString NotificationsEngine::GetServerInformation(QString& vendor, QString& version, QString& specVersion)
{
vendor = QLatin1String("KDE");
version = QLatin1String("2.0"); // FIXME
specVersion = QLatin1String("1.1");
return QStringLiteral("Plasma");
}
| +Info | 0 | QString NotificationsEngine::GetServerInformation(QString& vendor, QString& version, QString& specVersion)
{
vendor = QLatin1String("KDE");
version = QLatin1String("2.0"); // FIXME
specVersion = QLatin1String("1.1");
return QStringLiteral("Plasma");
}
| @@ -20,6 +20,7 @@
#include "notificationsengine.h"
#include "notificationservice.h"
#include "notificationsadaptor.h"
+#include "notificationsanitizer.h"
#include <QDebug>
#include <KConfigGroup>
@@ -261,23 +262,7 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
const QString s... | CWE-200 | null | null |
8,666 | void NotificationsEngine::configureNotification(const QString &appName, const QString &eventId)
{
KNotifyConfigWidget *widget = KNotifyConfigWidget::configure(nullptr, appName);
if (!eventId.isEmpty()) {
widget->selectEvent(eventId);
}
}
| +Info | 0 | void NotificationsEngine::configureNotification(const QString &appName, const QString &eventId)
{
KNotifyConfigWidget *widget = KNotifyConfigWidget::configure(nullptr, appName);
if (!eventId.isEmpty()) {
widget->selectEvent(eventId);
}
}
| @@ -20,6 +20,7 @@
#include "notificationsengine.h"
#include "notificationservice.h"
#include "notificationsadaptor.h"
+#include "notificationsanitizer.h"
#include <QDebug>
#include <KConfigGroup>
@@ -261,23 +262,7 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
const QString s... | CWE-200 | null | null |
8,667 | void NotificationsEngine::removeNotification(uint id, uint closeReason)
{
const QString source = QStringLiteral("notification %1").arg(id);
if (m_activeNotifications.remove(source) > 0) {
removeSource(source);
emit NotificationClosed(id, closeReason);
}
}
| +Info | 0 | void NotificationsEngine::removeNotification(uint id, uint closeReason)
{
const QString source = QStringLiteral("notification %1").arg(id);
if (m_activeNotifications.remove(source) > 0) {
removeSource(source);
emit NotificationClosed(id, closeReason);
}
}
| @@ -20,6 +20,7 @@
#include "notificationsengine.h"
#include "notificationservice.h"
#include "notificationsadaptor.h"
+#include "notificationsanitizer.h"
#include <QDebug>
#include <KConfigGroup>
@@ -261,23 +262,7 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
const QString s... | CWE-200 | null | null |
8,668 | Plasma::Service* NotificationsEngine::serviceForSource(const QString& source)
{
return new NotificationService(this, source);
}
| +Info | 0 | Plasma::Service* NotificationsEngine::serviceForSource(const QString& source)
{
return new NotificationService(this, source);
}
| @@ -20,6 +20,7 @@
#include "notificationsengine.h"
#include "notificationservice.h"
#include "notificationsadaptor.h"
+#include "notificationsanitizer.h"
#include <QDebug>
#include <KConfigGroup>
@@ -261,23 +262,7 @@ uint NotificationsEngine::Notify(const QString &app_name, uint replaces_id,
const QString s... | CWE-200 | null | null |
8,669 | ascii_to_bin(char ch)
{
if (ch > 'z')
return (0);
if (ch >= 'a')
return (ch - 'a' + 38);
if (ch > 'Z')
return (0);
if (ch >= 'A')
return (ch - 'A' + 12);
if (ch > '9')
return (0);
if (ch >= '.')
return (ch - '.');
return (0);
}
| null | 0 | ascii_to_bin(char ch)
{
if (ch > 'z')
return (0);
if (ch >= 'a')
return (ch - 'a' + 38);
if (ch > 'Z')
return (0);
if (ch >= 'A')
return (ch - 'A' + 12);
if (ch > '9')
return (0);
if (ch >= '.')
return (ch - '.');
return (0);
}
| @@ -670,7 +670,8 @@ px_crypt_des(const char *key, const char *setting)
q = (uint8 *) keybuf;
while (q - (uint8 *) keybuf - 8)
{
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key != '\0')
key++;
}
if (des_setkey((char *) keybuf)) | CWE-310 | null | null |
8,670 | des_setkey(const char *key)
{
uint32 k0,
k1,
rawkey0,
rawkey1;
int shifts,
round;
if (!des_initialised)
des_init();
rawkey0 = ntohl(*(const uint32 *) key);
rawkey1 = ntohl(*(const uint32 *) (key + 4));
if ((rawkey0 | rawkey1)
&& rawkey0 == old_rawkey0
&& rawkey1 == old_rawkey1)
{
/*... | null | 0 | des_setkey(const char *key)
{
uint32 k0,
k1,
rawkey0,
rawkey1;
int shifts,
round;
if (!des_initialised)
des_init();
rawkey0 = ntohl(*(const uint32 *) key);
rawkey1 = ntohl(*(const uint32 *) (key + 4));
if ((rawkey0 | rawkey1)
&& rawkey0 == old_rawkey0
&& rawkey1 == old_rawkey1)
{
/*... | @@ -670,7 +670,8 @@ px_crypt_des(const char *key, const char *setting)
q = (uint8 *) keybuf;
while (q - (uint8 *) keybuf - 8)
{
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key != '\0')
key++;
}
if (des_setkey((char *) keybuf)) | CWE-310 | null | null |
8,671 | do_des(uint32 l_in, uint32 r_in, uint32 *l_out, uint32 *r_out, int count)
{
/*
* l_in, r_in, l_out, and r_out are in pseudo-"big-endian" format.
*/
uint32 l,
r,
*kl,
*kr,
*kl1,
*kr1;
uint32 f,
r48l,
r48r;
int round;
if (count == 0)
return (1);
else if (count > 0)
{
... | null | 0 | do_des(uint32 l_in, uint32 r_in, uint32 *l_out, uint32 *r_out, int count)
{
/*
* l_in, r_in, l_out, and r_out are in pseudo-"big-endian" format.
*/
uint32 l,
r,
*kl,
*kr,
*kl1,
*kr1;
uint32 f,
r48l,
r48r;
int round;
if (count == 0)
return (1);
else if (count > 0)
{
... | @@ -670,7 +670,8 @@ px_crypt_des(const char *key, const char *setting)
q = (uint8 *) keybuf;
while (q - (uint8 *) keybuf - 8)
{
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key != '\0')
key++;
}
if (des_setkey((char *) keybuf)) | CWE-310 | null | null |
8,672 | setup_salt(long salt)
{
uint32 obit,
saltbit;
int i;
if (salt == old_salt)
return;
old_salt = salt;
saltbits = 0L;
saltbit = 1;
obit = 0x800000;
for (i = 0; i < 24; i++)
{
if (salt & saltbit)
saltbits |= obit;
saltbit <<= 1;
obit >>= 1;
}
}
| null | 0 | setup_salt(long salt)
{
uint32 obit,
saltbit;
int i;
if (salt == old_salt)
return;
old_salt = salt;
saltbits = 0L;
saltbit = 1;
obit = 0x800000;
for (i = 0; i < 24; i++)
{
if (salt & saltbit)
saltbits |= obit;
saltbit <<= 1;
obit >>= 1;
}
}
| @@ -670,7 +670,8 @@ px_crypt_des(const char *key, const char *setting)
q = (uint8 *) keybuf;
while (q - (uint8 *) keybuf - 8)
{
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key != '\0')
key++;
}
if (des_setkey((char *) keybuf)) | CWE-310 | null | null |
8,673 | _crypt_extended(const char *key, const char *setting)
{
static int initialized = 0;
static struct php_crypt_extended_data data;
if (!initialized) {
_crypt_extended_init();
initialized = 1;
data.initialized = 0;
}
return _crypt_extended_r(key, setting, &data);
}
| null | 0 | _crypt_extended(const char *key, const char *setting)
{
static int initialized = 0;
static struct php_crypt_extended_data data;
if (!initialized) {
_crypt_extended_init();
initialized = 1;
data.initialized = 0;
}
return _crypt_extended_r(key, setting, &data);
}
| @@ -629,7 +629,8 @@ _crypt_extended_r(const char *key, const char *setting,
*/
q = (u_char *) keybuf;
while (q - (u_char *) keybuf < sizeof(keybuf)) {
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key)
key++;
}
... | CWE-310 | null | null |
8,674 | des_cipher(const char *in, char *out, uint32_t salt, int count,
struct php_crypt_extended_data *data)
{
uint32_t l_out, r_out, rawl, rawr;
int retval;
setup_salt(salt, data);
rawl =
(uint32_t)(u_char)in[3] |
((uint32_t)(u_char)in[2] << 8) |
((uint32_t)(u_char)in[1] << 16) |
((uint32_t)(u_char)in[0] << 24... | null | 0 | des_cipher(const char *in, char *out, uint32_t salt, int count,
struct php_crypt_extended_data *data)
{
uint32_t l_out, r_out, rawl, rawr;
int retval;
setup_salt(salt, data);
rawl =
(uint32_t)(u_char)in[3] |
((uint32_t)(u_char)in[2] << 8) |
((uint32_t)(u_char)in[1] << 16) |
((uint32_t)(u_char)in[0] << 24... | @@ -629,7 +629,8 @@ _crypt_extended_r(const char *key, const char *setting,
*/
q = (u_char *) keybuf;
while (q - (u_char *) keybuf < sizeof(keybuf)) {
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key)
key++;
}
... | CWE-310 | null | null |
8,675 | des_init_local(struct php_crypt_extended_data *data)
{
data->old_rawkey0 = data->old_rawkey1 = 0;
data->saltbits = 0;
data->old_salt = 0;
data->initialized = 1;
}
| null | 0 | des_init_local(struct php_crypt_extended_data *data)
{
data->old_rawkey0 = data->old_rawkey1 = 0;
data->saltbits = 0;
data->old_salt = 0;
data->initialized = 1;
}
| @@ -629,7 +629,8 @@ _crypt_extended_r(const char *key, const char *setting,
*/
q = (u_char *) keybuf;
while (q - (u_char *) keybuf < sizeof(keybuf)) {
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key)
key++;
}
... | CWE-310 | null | null |
8,676 | des_setkey(const char *key, struct php_crypt_extended_data *data)
{
uint32_t k0, k1, rawkey0, rawkey1;
int shifts, round;
rawkey0 =
(uint32_t)(u_char)key[3] |
((uint32_t)(u_char)key[2] << 8) |
((uint32_t)(u_char)key[1] << 16) |
((uint32_t)(u_char)key[0] << 24);
rawkey1 =
(uint32_t)(u_char)key[7] |
((ui... | null | 0 | des_setkey(const char *key, struct php_crypt_extended_data *data)
{
uint32_t k0, k1, rawkey0, rawkey1;
int shifts, round;
rawkey0 =
(uint32_t)(u_char)key[3] |
((uint32_t)(u_char)key[2] << 8) |
((uint32_t)(u_char)key[1] << 16) |
((uint32_t)(u_char)key[0] << 24);
rawkey1 =
(uint32_t)(u_char)key[7] |
((ui... | @@ -629,7 +629,8 @@ _crypt_extended_r(const char *key, const char *setting,
*/
q = (u_char *) keybuf;
while (q - (u_char *) keybuf < sizeof(keybuf)) {
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key)
key++;
}
... | CWE-310 | null | null |
8,677 | setup_salt(uint32_t salt, struct php_crypt_extended_data *data)
{
uint32_t obit, saltbit, saltbits;
int i;
if (salt == data->old_salt)
return;
data->old_salt = salt;
saltbits = 0;
saltbit = 1;
obit = 0x800000;
for (i = 0; i < 24; i++) {
if (salt & saltbit)
saltbits |= obit;
saltbit <<= 1;
obit >>= ... | null | 0 | setup_salt(uint32_t salt, struct php_crypt_extended_data *data)
{
uint32_t obit, saltbit, saltbits;
int i;
if (salt == data->old_salt)
return;
data->old_salt = salt;
saltbits = 0;
saltbit = 1;
obit = 0x800000;
for (i = 0; i < 24; i++) {
if (salt & saltbit)
saltbits |= obit;
saltbit <<= 1;
obit >>= ... | @@ -629,7 +629,8 @@ _crypt_extended_r(const char *key, const char *setting,
*/
q = (u_char *) keybuf;
while (q - (u_char *) keybuf < sizeof(keybuf)) {
- if ((*q++ = *key << 1))
+ *q++ = *key << 1;
+ if (*key)
key++;
}
... | CWE-310 | null | null |
8,678 | _ksba_cert_cmp (ksba_cert_t a, ksba_cert_t b)
{
const unsigned char *img_a, *img_b;
size_t len_a, len_b;
img_a = ksba_cert_get_image (a, &len_a);
if (!img_a)
return 1;
img_b = ksba_cert_get_image (b, &len_b);
if (!img_b)
return 1;
return !(len_a == len_b && !memcmp (img_a, img_b, len_a));
}
| DoS | 0 | _ksba_cert_cmp (ksba_cert_t a, ksba_cert_t b)
{
const unsigned char *img_a, *img_b;
size_t len_a, len_b;
img_a = ksba_cert_get_image (a, &len_a);
if (!img_a)
return 1;
img_b = ksba_cert_get_image (b, &len_b);
if (!img_b)
return 1;
return !(len_a == len_b && !memcmp (img_a, img_b, len_a));
}
| @@ -1335,9 +1335,15 @@ ksba_cert_get_cert_policies (ksba_cert_t cert, char **r_policies)
err = gpg_error (GPG_ERR_NOT_DER_ENCODED);
goto leave;
}
+ if (ti.length > derlen)
+ {
+ err = gpg_error (GPG_ERR_BAD_BER);
+ ... | CWE-20 | null | null |
8,679 | _ksba_cert_get_public_key_ptr (ksba_cert_t cert,
unsigned char const **ptr, size_t *length)
{
asn_node_t n;
if (!cert || !cert->initialized || !ptr || !length)
return gpg_error (GPG_ERR_INV_VALUE);
n = _ksba_asn_find_node (cert->root,
"Certificate.tb... | DoS | 0 | _ksba_cert_get_public_key_ptr (ksba_cert_t cert,
unsigned char const **ptr, size_t *length)
{
asn_node_t n;
if (!cert || !cert->initialized || !ptr || !length)
return gpg_error (GPG_ERR_INV_VALUE);
n = _ksba_asn_find_node (cert->root,
"Certificate.tb... | @@ -1335,9 +1335,15 @@ ksba_cert_get_cert_policies (ksba_cert_t cert, char **r_policies)
err = gpg_error (GPG_ERR_NOT_DER_ENCODED);
goto leave;
}
+ if (ti.length > derlen)
+ {
+ err = gpg_error (GPG_ERR_BAD_BER);
+ ... | CWE-20 | null | null |
8,680 | _ksba_cert_get_serial_ptr (ksba_cert_t cert,
unsigned char const **ptr, size_t *length)
{
asn_node_t n;
if (!cert || !cert->initialized || !ptr || !length)
return gpg_error (GPG_ERR_INV_VALUE);
n = _ksba_asn_find_node (cert->root,
"Certificate.tbsCertific... | DoS | 0 | _ksba_cert_get_serial_ptr (ksba_cert_t cert,
unsigned char const **ptr, size_t *length)
{
asn_node_t n;
if (!cert || !cert->initialized || !ptr || !length)
return gpg_error (GPG_ERR_INV_VALUE);
n = _ksba_asn_find_node (cert->root,
"Certificate.tbsCertific... | @@ -1335,9 +1335,15 @@ ksba_cert_get_cert_policies (ksba_cert_t cert, char **r_policies)
err = gpg_error (GPG_ERR_NOT_DER_ENCODED);
goto leave;
}
+ if (ti.length > derlen)
+ {
+ err = gpg_error (GPG_ERR_BAD_BER);
+ ... | CWE-20 | null | null |
8,681 | append_cert_policy (char **policies, const char *oid, int crit)
{
char *p;
if (!*policies)
{
*policies = xtrymalloc (strlen (oid) + 4);
if (!*policies)
return gpg_error (GPG_ERR_ENOMEM);
p = *policies;
}
else
{
char *tmp = xtryrealloc (*policies,
... | DoS | 0 | append_cert_policy (char **policies, const char *oid, int crit)
{
char *p;
if (!*policies)
{
*policies = xtrymalloc (strlen (oid) + 4);
if (!*policies)
return gpg_error (GPG_ERR_ENOMEM);
p = *policies;
}
else
{
char *tmp = xtryrealloc (*policies,
... | @@ -1335,9 +1335,15 @@ ksba_cert_get_cert_policies (ksba_cert_t cert, char **r_policies)
err = gpg_error (GPG_ERR_NOT_DER_ENCODED);
goto leave;
}
+ if (ti.length > derlen)
+ {
+ err = gpg_error (GPG_ERR_BAD_BER);
+ ... | CWE-20 | null | null |
8,682 | get_name (ksba_cert_t cert, int idx, int use_subject, char **result)
{
gpg_error_t err;
char *p;
int i;
const char *oid;
struct tag_info ti;
const unsigned char *der;
size_t off, derlen, seqlen;
if (!cert || !cert->initialized || !result)
return gpg_error (GPG_ERR_INV_VALUE);
if (idx < 0)
ret... | DoS | 0 | get_name (ksba_cert_t cert, int idx, int use_subject, char **result)
{
gpg_error_t err;
char *p;
int i;
const char *oid;
struct tag_info ti;
const unsigned char *der;
size_t off, derlen, seqlen;
if (!cert || !cert->initialized || !result)
return gpg_error (GPG_ERR_INV_VALUE);
if (idx < 0)
ret... | @@ -1335,9 +1335,15 @@ ksba_cert_get_cert_policies (ksba_cert_t cert, char **r_policies)
err = gpg_error (GPG_ERR_NOT_DER_ENCODED);
goto leave;
}
+ if (ti.length > derlen)
+ {
+ err = gpg_error (GPG_ERR_BAD_BER);
+ ... | CWE-20 | null | null |
8,683 | ksba_name_enum (ksba_name_t name, int idx)
{
if (!name || idx < 0)
return NULL;
if (idx >= name->n_names)
return NULL; /* end of list */
return name->names[idx];
}
| DoS | 0 | ksba_name_enum (ksba_name_t name, int idx)
{
if (!name || idx < 0)
return NULL;
if (idx >= name->n_names)
return NULL; /* end of list */
return name->names[idx];
}
| @@ -113,7 +113,7 @@ _ksba_name_new_from_der (ksba_name_t *r_name,
*r_name = NULL;
- /* count and check for encoding errors - we won;t do this again
+ /* Count and check for encoding errors - we won't do this again
during the second pass */
der = image;
derlen = imagelen; | CWE-20 | null | null |
8,684 | ksba_name_get_uri (ksba_name_t name, int idx)
{
const char *s = ksba_name_enum (name, idx);
int n;
char *buf;
if (!s || strncmp (s, "(3:uri", 6))
return NULL; /* we do only return URIs */
s += 6;
for (n=0; *s && *s != ':' && digitp (s); s++)
n = n*10 + atoi_1 (s);
if (!n || *s != ':')
return... | DoS | 0 | ksba_name_get_uri (ksba_name_t name, int idx)
{
const char *s = ksba_name_enum (name, idx);
int n;
char *buf;
if (!s || strncmp (s, "(3:uri", 6))
return NULL; /* we do only return URIs */
s += 6;
for (n=0; *s && *s != ':' && digitp (s); s++)
n = n*10 + atoi_1 (s);
if (!n || *s != ':')
return... | @@ -113,7 +113,7 @@ _ksba_name_new_from_der (ksba_name_t *r_name,
*r_name = NULL;
- /* count and check for encoding errors - we won;t do this again
+ /* Count and check for encoding errors - we won't do this again
during the second pass */
der = image;
derlen = imagelen; | CWE-20 | null | null |
8,685 | ksba_name_new (ksba_name_t *r_name)
{
*r_name = xtrycalloc (1, sizeof **r_name);
if (!*r_name)
return gpg_error_from_errno (errno);
(*r_name)->ref_count++;
return 0;
}
| DoS | 0 | ksba_name_new (ksba_name_t *r_name)
{
*r_name = xtrycalloc (1, sizeof **r_name);
if (!*r_name)
return gpg_error_from_errno (errno);
(*r_name)->ref_count++;
return 0;
}
| @@ -113,7 +113,7 @@ _ksba_name_new_from_der (ksba_name_t *r_name,
*r_name = NULL;
- /* count and check for encoding errors - we won;t do this again
+ /* Count and check for encoding errors - we won't do this again
during the second pass */
der = image;
derlen = imagelen; | CWE-20 | null | null |
8,686 | ksba_name_ref (ksba_name_t name)
{
if (!name)
fprintf (stderr, "BUG: ksba_name_ref for NULL\n");
else
++name->ref_count;
}
| DoS | 0 | ksba_name_ref (ksba_name_t name)
{
if (!name)
fprintf (stderr, "BUG: ksba_name_ref for NULL\n");
else
++name->ref_count;
}
| @@ -113,7 +113,7 @@ _ksba_name_new_from_der (ksba_name_t *r_name,
*r_name = NULL;
- /* count and check for encoding errors - we won;t do this again
+ /* Count and check for encoding errors - we won't do this again
during the second pass */
der = image;
derlen = imagelen; | CWE-20 | null | null |
8,687 | ksba_name_release (ksba_name_t name)
{
int i;
if (!name)
return;
if (name->ref_count < 1)
{
fprintf (stderr, "BUG: trying to release an already released name\n");
return;
}
if (--name->ref_count)
return;
for (i=0; i < name->n_names; i++)
xfree (name->names[i]);
xfree (name-... | DoS | 0 | ksba_name_release (ksba_name_t name)
{
int i;
if (!name)
return;
if (name->ref_count < 1)
{
fprintf (stderr, "BUG: trying to release an already released name\n");
return;
}
if (--name->ref_count)
return;
for (i=0; i < name->n_names; i++)
xfree (name->names[i]);
xfree (name-... | @@ -113,7 +113,7 @@ _ksba_name_new_from_der (ksba_name_t *r_name,
*r_name = NULL;
- /* count and check for encoding errors - we won;t do this again
+ /* Count and check for encoding errors - we won't do this again
during the second pass */
der = image;
derlen = imagelen; | CWE-20 | null | null |
8,688 | issuer_key_hash (ksba_cert_t cert, unsigned char *sha1_buffer)
{
gpg_error_t err;
const unsigned char *ptr;
size_t length, dummy;
err = _ksba_cert_get_public_key_ptr (cert, &ptr, &length);
if (!err)
{
err = _ksba_hash_buffer (NULL, ptr, length, 20, sha1_buffer, &dummy);
if (!err && dummy != 2... | DoS | 0 | issuer_key_hash (ksba_cert_t cert, unsigned char *sha1_buffer)
{
gpg_error_t err;
const unsigned char *ptr;
size_t length, dummy;
err = _ksba_cert_get_public_key_ptr (cert, &ptr, &length);
if (!err)
{
err = _ksba_hash_buffer (NULL, ptr, length, 20, sha1_buffer, &dummy);
if (!err && dummy != 2... | @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,689 | issuer_name_hash (ksba_cert_t cert, unsigned char *sha1_buffer)
{
gpg_error_t err;
const unsigned char *ptr;
size_t length, dummy;
err = _ksba_cert_get_subject_dn_ptr (cert, &ptr, &length);
if (!err)
{
err = _ksba_hash_buffer (NULL, ptr, length, 20, sha1_buffer, &dummy);
if (!err && dummy != ... | DoS | 0 | issuer_name_hash (ksba_cert_t cert, unsigned char *sha1_buffer)
{
gpg_error_t err;
const unsigned char *ptr;
size_t length, dummy;
err = _ksba_cert_get_subject_dn_ptr (cert, &ptr, &length);
if (!err)
{
err = _ksba_hash_buffer (NULL, ptr, length, 20, sha1_buffer, &dummy);
if (!err && dummy != ... | @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,690 | ksba_ocsp_add_cert (ksba_ocsp_t ocsp, ksba_cert_t cert)
{
(void)ocsp;
(void)cert;
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
}
| DoS | 0 | ksba_ocsp_add_cert (ksba_ocsp_t ocsp, ksba_cert_t cert)
{
(void)ocsp;
(void)cert;
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
}
| @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,691 | ksba_ocsp_add_target (ksba_ocsp_t ocsp,
ksba_cert_t cert, ksba_cert_t issuer_cert)
{
struct ocsp_reqitem_s *ri;
if (!ocsp || !cert || !issuer_cert)
return gpg_error (GPG_ERR_INV_VALUE);
ri = xtrycalloc (1, sizeof *ri);
if (!ri)
return gpg_error_from_errno (errno);
ksba_cert_ref... | DoS | 0 | ksba_ocsp_add_target (ksba_ocsp_t ocsp,
ksba_cert_t cert, ksba_cert_t issuer_cert)
{
struct ocsp_reqitem_s *ri;
if (!ocsp || !cert || !issuer_cert)
return gpg_error (GPG_ERR_INV_VALUE);
ri = xtrycalloc (1, sizeof *ri);
if (!ri)
return gpg_error_from_errno (errno);
ksba_cert_ref... | @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,692 | ksba_ocsp_build_request (ksba_ocsp_t ocsp,
unsigned char **r_buffer, size_t *r_buflen)
{
gpg_error_t err;
if (!ocsp || !r_buffer || !r_buflen)
return gpg_error (GPG_ERR_INV_VALUE);
*r_buffer = NULL;
*r_buflen = 0;
if (!ocsp->requestlist)
return gpg_error (GPG_ERR_MISSING_ACT... | DoS | 0 | ksba_ocsp_build_request (ksba_ocsp_t ocsp,
unsigned char **r_buffer, size_t *r_buflen)
{
gpg_error_t err;
if (!ocsp || !r_buffer || !r_buflen)
return gpg_error (GPG_ERR_INV_VALUE);
*r_buffer = NULL;
*r_buflen = 0;
if (!ocsp->requestlist)
return gpg_error (GPG_ERR_MISSING_ACT... | @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,693 | ksba_ocsp_get_cert (ksba_ocsp_t ocsp, int idx)
{
struct ocsp_certlist_s *cl;
if (!ocsp || idx < 0)
return NULL;
for (cl=ocsp->received_certs; cl && idx; cl = cl->next, idx--)
;
if (!cl)
return NULL;
ksba_cert_ref (cl->cert);
return cl->cert;
}
| DoS | 0 | ksba_ocsp_get_cert (ksba_ocsp_t ocsp, int idx)
{
struct ocsp_certlist_s *cl;
if (!ocsp || idx < 0)
return NULL;
for (cl=ocsp->received_certs; cl && idx; cl = cl->next, idx--)
;
if (!cl)
return NULL;
ksba_cert_ref (cl->cert);
return cl->cert;
}
| @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,694 | ksba_ocsp_get_digest_algo (ksba_ocsp_t ocsp)
{
return ocsp? ocsp->digest_oid : NULL;
}
| DoS | 0 | ksba_ocsp_get_digest_algo (ksba_ocsp_t ocsp)
{
return ocsp? ocsp->digest_oid : NULL;
}
| @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,695 | ksba_ocsp_get_extension (ksba_ocsp_t ocsp, ksba_cert_t cert, int idx,
char const **r_oid, int *r_crit,
unsigned char const **r_der, size_t *r_derlen)
{
struct ocsp_extension_s *ex;
if (!ocsp)
return gpg_error (GPG_ERR_INV_VALUE);
if (!ocsp->requestlist)
r... | DoS | 0 | ksba_ocsp_get_extension (ksba_ocsp_t ocsp, ksba_cert_t cert, int idx,
char const **r_oid, int *r_crit,
unsigned char const **r_der, size_t *r_derlen)
{
struct ocsp_extension_s *ex;
if (!ocsp)
return gpg_error (GPG_ERR_INV_VALUE);
if (!ocsp->requestlist)
r... | @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,696 | ksba_ocsp_get_responder_id (ksba_ocsp_t ocsp,
char **r_name, ksba_sexp_t *r_keyid)
{
if (r_name)
*r_name = NULL;
if (r_keyid)
*r_keyid = NULL;
if (!ocsp)
return gpg_error (GPG_ERR_INV_VALUE);
if (ocsp->responder_id.name && r_name)
{
*r_name = xtrystrdup (ocsp-... | DoS | 0 | ksba_ocsp_get_responder_id (ksba_ocsp_t ocsp,
char **r_name, ksba_sexp_t *r_keyid)
{
if (r_name)
*r_name = NULL;
if (r_keyid)
*r_keyid = NULL;
if (!ocsp)
return gpg_error (GPG_ERR_INV_VALUE);
if (ocsp->responder_id.name && r_name)
{
*r_name = xtrystrdup (ocsp-... | @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,697 | ksba_ocsp_get_sig_val (ksba_ocsp_t ocsp, ksba_isotime_t produced_at)
{
ksba_sexp_t p;
if (produced_at)
*produced_at = 0;
if (!ocsp || !ocsp->sigval )
return NULL;
if (produced_at)
_ksba_copy_time (produced_at, ocsp->produced_at);
p = ocsp->sigval;
ocsp->sigval = NULL;
return p;
}
| DoS | 0 | ksba_ocsp_get_sig_val (ksba_ocsp_t ocsp, ksba_isotime_t produced_at)
{
ksba_sexp_t p;
if (produced_at)
*produced_at = 0;
if (!ocsp || !ocsp->sigval )
return NULL;
if (produced_at)
_ksba_copy_time (produced_at, ocsp->produced_at);
p = ocsp->sigval;
ocsp->sigval = NULL;
return p;
}
| @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,698 | ksba_ocsp_hash_request (ksba_ocsp_t ocsp,
void (*hasher)(void *, const void *,
size_t length),
void *hasher_arg)
{
(void)ocsp;
(void)hasher;
(void)hasher_arg;
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
}
| DoS | 0 | ksba_ocsp_hash_request (ksba_ocsp_t ocsp,
void (*hasher)(void *, const void *,
size_t length),
void *hasher_arg)
{
(void)ocsp;
(void)hasher;
(void)hasher_arg;
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
}
| @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
8,699 | ksba_ocsp_hash_response (ksba_ocsp_t ocsp,
const unsigned char *msg, size_t msglen,
void (*hasher)(void *, const void *, size_t length),
void *hasher_arg)
{
if (!ocsp || !msg || !hasher)
return gpg_error (GPG_ERR_INV_VALUE);
if (!ocsp->... | DoS | 0 | ksba_ocsp_hash_response (ksba_ocsp_t ocsp,
const unsigned char *msg, size_t msglen,
void (*hasher)(void *, const void *, size_t length),
void *hasher_arg)
{
if (!ocsp || !msg || !hasher)
return gpg_error (GPG_ERR_INV_VALUE);
if (!ocsp->... | @@ -231,6 +231,8 @@ parse_asntime_into_isotime (unsigned char const **buf, size_t *len,
&& (ti.tag == TYPE_UTC_TIME || ti.tag == TYPE_GENERALIZED_TIME)
&& !ti.is_constructed) )
err = gpg_error (GPG_ERR_INV_OBJ);
+ else if (ti.length > *len)
+ err = gpg_error (GPG_ERR_INV_BER);
... | CWE-20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.