From 5578c5bcd5915b3b2e3cbdeeb33a989fe0bee8ab Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 21 Mar 2014 20:05:50 +0100 Subject: userpref: Try to output similar error messages in GnuTLS and OpenSSL logic --- common/userpref.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/userpref.c b/common/userpref.c index 04341a4..808c55c 100644 --- a/common/userpref.c +++ b/common/userpref.c @@ -545,7 +545,7 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da { BIO *membp = BIO_new_mem_buf(public_key.data, public_key.size); if (!PEM_read_bio_RSAPublicKey(membp, &pubkey, NULL, NULL)) { - debug_info("Could not read public key"); + debug_info("WARNING: Could not read public key"); } BIO_free(membp); } @@ -706,6 +706,8 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da } if (pkcs1) asn1_delete_structure(&pkcs1); + } else { + debug_info("WARNING: Could not read public key"); } /* now generate certificates */ @@ -747,6 +749,8 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da dev_cert_pem.data = gnutls_malloc(export_size); gnutls_x509_crt_export(dev_cert, GNUTLS_X509_FMT_PEM, dev_cert_pem.data, &export_size); dev_cert_pem.size = export_size; + } else { + debug_info("ERROR: Signing device certificate with root private key failed!"); } } -- cgit v1.1-32-gdbae