OpenSSL 1.0.0 patch for enabling *:123 host syntax and ephemeral ports with Win32

2010-04-13 Thread Modem Man
Hi,

I found and fixed a small bug in crypto\bio\b_sock.c and want to ask
where to post the patch / fix.

please note:
I can not guarantee of production grade quality of my fix, but it works
pretty well with my implementation of an FTP server.

regards,
Maik,
the modem-man


B.T.W.: what is preferred diff format here? I used diff -bw -u. Okay?


--- 1.0.0\b_sock.c  Thu Jan 07 14:15:40 2010
+++ 1.0.0.patchw32asteriskhost\b_sock.c Fri Apr 09 21:02:18 2010
@@ -672,7 +672,21 @@
 #endif
}
else if (h[0]=='*'  h[1]=='\0')
+ {
+# ifdef _WIN32 /* modem-man patch, sure for windows. not sure for other OS 
*/
+   /* h=0.0.0.0; */ /* quick hack, but dirty! */
+   hint.ai_flags |= AI_PASSIVE;  /* better way of '*' 
handling! */
+# else /* modem-man patch */
h=NULL;
+# endif /* modem-man patch */
+ }
+   }
+   if (p  (p[0]=='*'  p[1]=='\0'))
+   {
+# ifdef _WIN32 /* modem-man patch */
+   p=0; /* ephemeral port number */
+   hint.ai_flags |= AI_PASSIVE;  /* better way of '*' 
handling! */
+# endif /* modem-man patch */
}
 
if ((*p_getaddrinfo.f)(h,p,hint,res)) break;


Re: OpenSSL 1.0.0 patch for enabling *:123 host syntax and ephemeral ports with Win32

2010-04-13 Thread Ger Hobbelt
Your diff is fine as others use that too.

The address to post bug reports, patches and such to is

  r...@openssl.org

You'll get a moderated auto-response from that once it has passed the
[spam]filters there, I guess, and it will then end up being forwarded to the
developers mailing list of openssl while having an issue number attached in
the subject line, so that you and others can track the item.


Couple of things to consider:

- zeroeth: might help the team decide  prioritize when you mention against
which version of openssl this has been tested.
I'm most definitely not on the team, so this is your captain who's directing
from the sidewalk (at least that's what the Dutch would say; don't know the
English/American version of that saying), but I guess mentioning you've
tested it against, say, CVS HEAD of date /mm/dd might get some hands
together, as would listing other (released) versions. Even when those
versions have few or no diffs among them at a spot where you worked on, it
just helps people to see what your base was and how far you've gone in
testing this baby and will give them a bit of a feeling how much it would
take to integrate and test the bugger, that's all.

- first: make sure your bug report /patch/ ... has a easily understandable
subject line; this is your '2 seconds elevator pitch' line. (I'd say yours
is very fine.)

- second, don't expect instant 'done!' responses. I believe the few people
working on OpenSSL are a tad overloaded tongue in cheek so a bit of very
gentle nudging after a while may help keep your item in the front ranks. And
even then, it may be a long wait. If nothing else helps, consider Zen. Um
mani padme Um. The guys just don't like getting kicking off their mortgages
any better than you do, so that is the bottomest bottom line in OpenSSL RT
triage, I'ld say.

- third: attach patch files (as you already did! Excellent!) instead of
inlining them; helps extraction and processing as email is not a nice medium
for inline source exchange.

- fourth: If you haven't already, you might want to subscribe to the dev
mailing list; though 'proper procedure'[*] would be to send any replies
regarding the item through rt@ again for total tracability, we all glitch
every once in a while so replies can end up in openssl-dev@ alone (and not
RT).


[*]) nope, don't ask me where that SOP is written down because I only
'gleaned' that one from leeching the lists for ages. The Internet is so
great because it not only allows you to see but above all /overlook/ a lot
of relevant detail.

And if this 'documentation' is not on the net yet, than hopefully I got it
right and some poor soul will copy it into the FAQ or thereabouts for those
searching and seeking to find.




On Tue, Apr 13, 2010 at 8:28 PM, Modem Man modem-...@gmx.net wrote:

 Hi,

 I found and fixed a small bug in crypto\bio\b_sock.c and want to ask
 where to post the patch / fix.

 please note:
 I can not guarantee of production grade quality of my fix, but it works
 pretty well with my implementation of an FTP server.

 regards,
 Maik,
 the modem-man


 B.T.W.: what is preferred diff format here? I used diff -bw -u. Okay?



-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--
web:http://www.hobbelt.com/
   http://www.hebbut.net/
mail:   g...@hobbelt.com
mobile: +31-6-11 120 978
--