> @@ -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

Reply via email to