use lower-case labels

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2021-12-02 17:07:59 +01:00
parent c3c28cb4c1
commit b0631e322f
3 changed files with 10 additions and 10 deletions

View File

@@ -110,7 +110,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, unsigned long timeout)
xmpp_debug(ctx, "xmpp", "Send error occurred, disconnecting.");
conn->error = ECONNABORTED;
conn_disconnect(conn);
goto NEXT_ITEM;
goto next_item;
}
}
@@ -158,7 +158,7 @@ void xmpp_run_once(xmpp_ctx_t *ctx, unsigned long timeout)
conn->error = ECONNABORTED;
conn_disconnect(conn);
}
NEXT_ITEM:
next_item:
connitem = connitem->next;
}

View File

@@ -57,13 +57,13 @@ static gnutls_x509_crt_t _tls_load_cert(xmpp_conn_t *conn)
if (gnutls_x509_crt_init(&cert) < 0)
return NULL;
if (gnutls_load_file(conn->tls_client_cert, &data) < 0)
goto LBL_ERR;
goto error_out;
res = gnutls_x509_crt_import(cert, &data, GNUTLS_X509_FMT_PEM);
gnutls_free(data.data);
if (res < 0)
goto LBL_ERR;
goto error_out;
return cert;
LBL_ERR:
error_out:
gnutls_x509_crt_deinit(cert);
return NULL;
}

View File

@@ -398,25 +398,25 @@ static xmpp_tlscert_t *_x509_to_tlscert(xmpp_ctx_t *ctx, X509 *cert)
BIO *b = BIO_new(BIO_s_mem());
if (!b)
goto ERR_OUT;
goto error_out;
PEM_write_bio_X509(b, cert);
BUF_MEM *bptr;
BIO_get_mem_ptr(b, &bptr);
tlscert->pem = xmpp_alloc(ctx, bptr->length + 1);
if (!tlscert->pem)
goto ERR_OUT;
goto error_out;
memcpy(tlscert->pem, bptr->data, bptr->length);
tlscert->pem[bptr->length] = '\0';
BIO_free(b);
subject = X509_NAME_oneline(X509_get_subject_name(cert), NULL, 0);
if (!subject)
goto ERR_OUT;
goto error_out;
tlscert->elements[XMPP_CERT_SUBJECT] = xmpp_strdup(ctx, subject);
OPENSSL_free(subject);
issuer = X509_NAME_oneline(X509_get_issuer_name(cert), NULL, 0);
if (!issuer)
goto ERR_OUT;
goto error_out;
tlscert->elements[XMPP_CERT_ISSUER] = xmpp_strdup(ctx, issuer);
OPENSSL_free(issuer);
@@ -466,7 +466,7 @@ static xmpp_tlscert_t *_x509_to_tlscert(xmpp_ctx_t *ctx, X509 *cert)
}
return tlscert;
ERR_OUT:
error_out:
xmpp_tlscert_free(tlscert);
return NULL;
}