print subject name in certificate check (#1174)

waja notifications at github.com
Tue Jul 29 13:02:03 CEST 2014


> @@ -176,10 +177,15 @@ int np_net_ssl_check_cert(int days_till_exp_warn,
> int days_till_exp_crit){
>	/* Retrieve timestamp of certificate */
>	tm = X509_get_notAfter(certificate);
>  
> +	/* Retrieve subject name in certificate. */
> +	*subject = '\0';
> +	X509_NAME_get_text_by_NID(X509_get_subject_name(certificate),
> NID_commonName, subject, 256);

shouldn't be the subject already stored in 'subj'? see
https://github.com/monitoring-plugins/monitoring-plugins/blob/master/plugins/sslutils.c#L166
So we don't need to gather that once again.

-- 
Reply to this email on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/pull/1174/files#r15516933
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20140729/4af7495a/attachment.html>


More information about the Devel mailing list