Bug 242862 - mail/sendmail patch-tls.c breaks STARTTLS - sm_RSA_generate_key() returns NULL all the times
Summary: mail/sendmail patch-tls.c breaks STARTTLS - sm_RSA_generate_key() returns NUL...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-24 15:48 UTC by Dan Lukes
Modified: 2019-12-25 10:28 UTC (History)
0 users

See Also:
dinoex: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Lukes 2019-12-24 15:48:14 UTC
patch-tls.c introduces sm_RSA_generate_key() function used as replacement of original RSA_generate_key/RSA_generate_key_ex function.

Because of forgotten/excessive "return NULL" the function returns NULL all the times. As a result, server TLS initialisation fails and STARTTLS feature is not offered by server.

Lines
98 	+                       rsa = NULL;
99 	+               }
100 	+               return NULL;

should be

98 	+                       rsa = NULL;
99 	+               }
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2019-12-24 20:50:50 UTC
Thanks for reporting this.
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-12-24 21:31:33 UTC
A commit references this bug:

Author: dinoex
Date: Tue Dec 24 21:30:57 UTC 2019
New revision: 520819
URL: https://svnweb.freebsd.org/changeset/ports/520819

Log:
  - fix RSA_generate_key
  PR:		242862
  Submitted by:	Dan Lukes

Changes:
  head/mail/sendmail/Makefile
  head/mail/sendmail/files/patch-tls.c
Comment 3 Dan Lukes 2019-12-25 10:28:31 UTC
My former PRs has been waiting years for someone's attention. This one has been accepted and committed within hours. Christmas day is simply a time of miracles. Thanks.