[SCM] Samba Shared Repository - branch master updated
Matthieu Patou
mat at samba.org
Wed Oct 27 14:09:01 MDT 2010
The branch, master has been updated
via f8d4995 tls: Inform the user if the cert/ca/private key can't be saved
from 0bc94c2 Fix bug 7754 - samba uses index(), marked as legacy.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f8d49958b2a5c55e837ebe903dd5207a92d19d63
Author: Matthieu Patou <mat at matws.net>
Date: Wed Oct 27 22:59:25 2010 +0400
tls: Inform the user if the cert/ca/private key can't be saved
Most of the time this problem is due to a missing <private>/tls dir.
Should close bug 7640.
Autobuild-User: Matthieu Patou <mat at samba.org>
Autobuild-Date: Wed Oct 27 20:08:54 UTC 2010 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source4/lib/tls/tlscert.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/lib/tls/tlscert.c b/source4/lib/tls/tlscert.c
index 62e7a72..bef6348 100644
--- a/source4/lib/tls/tlscert.c
+++ b/source4/lib/tls/tlscert.c
@@ -138,15 +138,24 @@ void tls_cert_generate(TALLOC_CTX *mem_ctx,
bufsize = sizeof(buf);
TLSCHECK(gnutls_x509_crt_export(crt, GNUTLS_X509_FMT_PEM, buf, &bufsize));
- file_save(certfile, buf, bufsize);
+ if (!file_save(certfile, buf, bufsize)) {
+ DEBUG(0,("Unable to save certificate in %s parent dir exists ?\n", certfile));
+ goto failed;
+ }
bufsize = sizeof(buf);
TLSCHECK(gnutls_x509_crt_export(cacrt, GNUTLS_X509_FMT_PEM, buf, &bufsize));
- file_save(cafile, buf, bufsize);
+ if (!file_save(cafile, buf, bufsize)) {
+ DEBUG(0,("Unable to save ca cert in %s parent dir exists ?\n", cafile));
+ goto failed;
+ }
bufsize = sizeof(buf);
TLSCHECK(gnutls_x509_privkey_export(key, GNUTLS_X509_FMT_PEM, buf, &bufsize));
- file_save(keyfile, buf, bufsize);
+ if (!file_save(keyfile, buf, bufsize)) {
+ DEBUG(0,("Unable to save privatekey in %s parent dir exists ?\n", keyfile));
+ goto failed;
+ }
gnutls_x509_privkey_deinit(key);
gnutls_x509_privkey_deinit(cakey);
--
Samba Shared Repository
More information about the samba-cvs
mailing list