if (ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY)
{
log_error(LOG_LEVEL_CONNECT, "The peer notified us that "
- "the connection on socket %d is going to be closed",
+ "the connection on socket %d is going to be closed.",
ssl_attr->mbedtls_attr.socket_fd.fd);
return 0;
}
if (ssl_attr->mbedtls_attr.ciphersuites_list == NULL)
{
log_error(LOG_LEVEL_ERROR,
- "Setting the cipher list '%s' for the client connection failed",
+ "Setting the cipher list '%s' for the client connection failed.",
csp->config->cipher_list);
ret = -1;
goto exit;
if (ssl_attr->mbedtls_attr.ciphersuites_list == NULL)
{
log_error(LOG_LEVEL_ERROR,
- "Setting the cipher list '%s' for the server connection failed",
+ "Setting the cipher list '%s' for the server connection failed.",
csp->config->cipher_list);
ret = -1;
goto exit;
* Handshake with server
*/
log_error(LOG_LEVEL_CONNECT,
- "Performing the TLS/SSL handshake with the server");
+ "Performing the TLS/SSL handshake with the server.");
while ((ret = mbedtls_ssl_handshake(&(ssl_attr->mbedtls_attr.ssl))) != 0)
{
*/
if ((f = fopen(output_file, "w")) == NULL)
{
- log_error(LOG_LEVEL_ERROR, "Opening file %s to save certificate failed",
+ log_error(LOG_LEVEL_ERROR, "Opening file %s to save certificate failed.",
output_file);
return -1;
}
if (fwrite(cert_buf, 1, len, f) != len)
{
log_error(LOG_LEVEL_ERROR,
- "Writing certificate into file %s failed", output_file);
+ "Writing certificate into file %s failed.", output_file);
fclose(f);
return -1;
}
{
fclose(f);
log_error(LOG_LEVEL_ERROR,
- "Writing private key into file %s failed",
+ "Writing private key into file %s failed.",
key_file_path);
ret = -1;
goto exit;
if ((ret = write_private_key(&key, key_buf, key_opt.key_file_path)) < 0)
{
log_error(LOG_LEVEL_ERROR,
- "Writing private key into file %s failed", key_opt.key_file_path);
+ "Writing private key into file %s failed.", key_opt.key_file_path);
ret = -1;
goto exit;
}
{
freez(cert_opt.output_file);
freez(cert_opt.subject_key);
- log_error(LOG_LEVEL_ERROR, "Key generating failed");
+ log_error(LOG_LEVEL_ERROR, "Key generating failed.");
return -1;
}
if (ret < 0 || ret >= serial_num_size)
{
log_error(LOG_LEVEL_ERROR,
- "Converting certificate serial number into string failed");
+ "Converting certificate serial number into string failed.");
ret = -1;
goto exit;
}
if (get_certificate_valid_from_date(cert_valid_from, sizeof(cert_valid_from), VALID_DATETIME_FMT)
|| get_certificate_valid_to_date(cert_valid_to, sizeof(cert_valid_to), VALID_DATETIME_FMT))
{
- log_error(LOG_LEVEL_ERROR, "Generating one of the validity dates failed");
+ log_error(LOG_LEVEL_ERROR, "Generating one of the validity dates failed.");
ret = -1;
goto exit;
}
*/
if (subject_key_len == 0)
{
- log_error(LOG_LEVEL_ERROR, "Subject key was already created");
+ log_error(LOG_LEVEL_ERROR, "Subject key was already created.");
ret = 0;
goto exit;
}
mbedtls_ctr_drbg_random, &ctr_drbg);
if (ret < 0)
{
- log_error(LOG_LEVEL_ERROR, "Writing certificate into file failed");
+ log_error(LOG_LEVEL_ERROR, "Writing certificate into file failed.");
goto exit;
}
if (MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL != ret)
{
log_error(LOG_LEVEL_ERROR,
- "Failed to figure out the required X509 PEM certificate buffer size");
+ "Failed to figure out the required X509 PEM certificate buffer size.");
return -1;
}
pem_buffer_length = olen;
if (last->file_buf == NULL)
{
log_error(LOG_LEVEL_ERROR,
- "Failed to allocate %lu bytes to store the X509 PEM certificate",
+ "Failed to allocate %lu bytes to store the X509 PEM certificate.",
pem_buffer_length);
return -1;
}
if (encoded_text == NULL)
{
log_error(LOG_LEVEL_ERROR,
- "Failed to HTML-encode the certificate information");
+ "Failed to HTML-encode the certificate information.");
return -1;
}
strlcpy(last->info_buf, encoded_text, sizeof(last->info_buf));