Capitalization of the name OpenSSL

Started by Daniel Gustafssonover 7 years ago6 messages
#1Daniel Gustafsson
daniel@yesql.se
1 attachment(s)

Skimming over SSL code and docs I noticed that we almost always properly
capitalize “OpenSSL" when referring to the name of the library, using "openssl”
for when referring to the cli application. The attached patch fixes the few
occurrences where the name is referred to, but which aren’t spelled “OpenSSL”.
Also moves the link to openssl.org to using https:// as it redirects anyways.

cheers ./daniel

Attachments:

capitalize_OpenSSL.patchapplication/octet-stream; name=capitalize_OpenSSL.patch; x-unix-mode=0644Download
From 769aa5b8b5b74458d2ff67db47e1a127a93985ce Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Thu, 28 Jun 2018 00:07:47 +0200
Subject: [PATCH] Properly capitalize OpenSSL when used as a name

OpenSSL is the name of the library, openssl is the cli application
bundled with it.
---
 doc/src/sgml/install-windows.sgml     | 6 +++---
 src/backend/libpq/be-secure-openssl.c | 6 +++---
 src/test/ssl/Makefile                 | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml
index 99e9c7b78e..02d2c6f846 100644
--- a/doc/src/sgml/install-windows.sgml
+++ b/doc/src/sgml/install-windows.sgml
@@ -293,11 +293,11 @@ $ENV{MSBFLAGS}="/m";
     </varlistentry>
 
     <varlistentry>
-     <term><productname>openssl</productname></term>
+     <term><productname>OpenSSL</productname></term>
      <listitem><para>
       Required for SSL support. Binaries can be downloaded from
       <ulink url="http://www.slproweb.com/products/Win32OpenSSL.html"></ulink>
-      or source from <ulink url="http://www.openssl.org"></ulink>.
+      or source from <ulink url="https://www.openssl.org"></ulink>.
      </para></listitem>
     </varlistentry>
 
@@ -348,7 +348,7 @@ $ENV{MSBFLAGS}="/m";
 
   <para>
    To use a server-side third party library such as <productname>python</productname> or
-   <productname>openssl</productname>, this library <emphasis>must</emphasis> also be
+   <productname>OpenSSL</productname>, this library <emphasis>must</emphasis> also be
    64-bit. There is no support for loading a 32-bit library in a 64-bit
    server. Several of the third party libraries that PostgreSQL supports may
    only be available in 32-bit versions, in which case they cannot be used with
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 48b468f62f..310e9ba348 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -187,7 +187,7 @@ be_tls_init(bool isServerStart)
 	SSL_CTX_set_options(context, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
 
 	/* disallow SSL session tickets */
-#ifdef SSL_OP_NO_TICKET			/* added in openssl 0.9.8f */
+#ifdef SSL_OP_NO_TICKET			/* added in OpenSSL 0.9.8f */
 	SSL_CTX_set_options(context, SSL_OP_NO_TICKET);
 #endif
 
@@ -638,7 +638,7 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor)
  * Private substitute BIO: this does the sending and receiving using send() and
  * recv() instead. This is so that we can enable and disable interrupts
  * just while calling recv(). We cannot have interrupts occurring while
- * the bulk of openssl runs, because it uses malloc() and possibly other
+ * the bulk of OpenSSL runs, because it uses malloc() and possibly other
  * non-reentrant libc facilities. We also need to call send() and recv()
  * directly so it gets passed through the socket/signals layer on Win32.
  *
@@ -736,7 +736,7 @@ my_BIO_s_socket(void)
 	return my_bio_methods;
 }
 
-/* This should exactly match openssl's SSL_set_fd except for using my BIO */
+/* This should exactly match OpenSSL's SSL_set_fd except for using my BIO */
 static int
 my_SSL_set_fd(Port *port, int fd)
 {
diff --git a/src/test/ssl/Makefile b/src/test/ssl/Makefile
index df477f1d40..97389c90f8 100644
--- a/src/test/ssl/Makefile
+++ b/src/test/ssl/Makefile
@@ -32,7 +32,7 @@ SSLFILES := $(CERTIFICATES:%=ssl/%.key) $(CERTIFICATES:%=ssl/%.crt) \
 # This target generates all the key and certificate files.
 sslfiles: $(SSLFILES)
 
-# Openssl requires a directory to put all generated certificates in. We don't
+# OpenSSL requires a directory to put all generated certificates in. We don't
 # use this for anything, but we need a location.
 ssl/new_certs_dir:
 	mkdir ssl/new_certs_dir
-- 
2.14.1.145.gb3622a4ee

#2Michael Paquier
michael@paquier.xyz
In reply to: Daniel Gustafsson (#1)
Re: Capitalization of the name OpenSSL

On Thu, Jun 28, 2018 at 12:16:52AM +0200, Daniel Gustafsson wrote:

Skimming over SSL code and docs I noticed that we almost always properly
capitalize “OpenSSL" when referring to the name of the library, using "openssl”
for when referring to the cli application. The attached patch fixes the few
occurrences where the name is referred to, but which aren’t spelled “OpenSSL”.
Also moves the link to openssl.org to using https:// as it redirects anyways.

I see more that 860 references to openssl as lower case with lots of
noise around file names and translations. And I can see that you missed
two of them:

contrib/pgcrypto/openssl.c: * Check if strong crypto is supported. Some
openssl installations

src/interfaces/libpq/fe-secure-openssl.c:/* This should exactly match
openssl's SSL_set_fd except for using my BIO */

I don't think that the comments are worth bothering for anything else
than HEAD, now should the doc changes be back-patched? I would tend to
do so.
--
Michael

#3Magnus Hagander
magnus@hagander.net
In reply to: Michael Paquier (#2)
Re: Capitalization of the name OpenSSL

On Thu, Jun 28, 2018 at 4:54 AM, Michael Paquier <michael@paquier.xyz>
wrote:

On Thu, Jun 28, 2018 at 12:16:52AM +0200, Daniel Gustafsson wrote:

Skimming over SSL code and docs I noticed that we almost always properly
capitalize “OpenSSL" when referring to the name of the library, using

"openssl”

for when referring to the cli application. The attached patch fixes the

few

occurrences where the name is referred to, but which aren’t spelled

“OpenSSL”.

Also moves the link to openssl.org to using https:// as it redirects

anyways.

I see more that 860 references to openssl as lower case with lots of
noise around file names and translations. And I can see that you missed
two of them:

contrib/pgcrypto/openssl.c: * Check if strong crypto is supported. Some
openssl installations

src/interfaces/libpq/fe-secure-openssl.c:/* This should exactly match
openssl's SSL_set_fd except for using my BIO */

I don't think that the comments are worth bothering for anything else
than HEAD, now should the doc changes be back-patched? I would tend to
do so.

Normally I'm the biggest promoter for back-patching documentation changes
:) But in the case when it's really just about the capitalization, I think
it's fine to just bother with HEAD for it.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;

#4Daniel Gustafsson
daniel@yesql.se
In reply to: Michael Paquier (#2)
1 attachment(s)
Re: Capitalization of the name OpenSSL

On 28 Jun 2018, at 04:54, Michael Paquier <michael@paquier.xyz> wrote:

I see more that 860 references to openssl as lower case with lots of
noise around file names and translations. And I can see that you missed
two of them:

Nice catch, fixed in the attached.

I don't think that the comments are worth bothering for anything else
than HEAD, now should the doc changes be back-patched? I would tend to
do so.

Not sure if it’s worth any back-patching at all to be honest, but I’ll leave
that call to you.

cheers ./daniel

Attachments:

capitalize_OpenSSL-v2.patchapplication/octet-stream; name=capitalize_OpenSSL-v2.patch; x-unix-mode=0644Download
From eea88040f39946731b361f1211d42c6b35e77a03 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Thu, 28 Jun 2018 00:07:47 +0200
Subject: [PATCH] Properly capitalize OpenSSL when used as a name

OpenSSL is the name of the library, openssl is the cli application
bundled with it.
---
 contrib/pgcrypto/openssl.c               | 2 +-
 doc/src/sgml/install-windows.sgml        | 6 +++---
 src/backend/libpq/be-secure-openssl.c    | 6 +++---
 src/interfaces/libpq/fe-secure-openssl.c | 2 +-
 src/test/ssl/Makefile                    | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/contrib/pgcrypto/openssl.c b/contrib/pgcrypto/openssl.c
index f71a933407..7d686f3940 100644
--- a/contrib/pgcrypto/openssl.c
+++ b/contrib/pgcrypto/openssl.c
@@ -408,7 +408,7 @@ gen_ossl_encrypt(PX_Cipher *c, const uint8 *data, unsigned dlen,
 /* Blowfish */
 
 /*
- * Check if strong crypto is supported. Some openssl installations
+ * Check if strong crypto is supported. Some OpenSSL installations
  * support only short keys and unfortunately BF_set_key does not return any
  * error value. This function tests if is possible to use strong key.
  */
diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml
index 99e9c7b78e..02d2c6f846 100644
--- a/doc/src/sgml/install-windows.sgml
+++ b/doc/src/sgml/install-windows.sgml
@@ -293,11 +293,11 @@ $ENV{MSBFLAGS}="/m";
     </varlistentry>
 
     <varlistentry>
-     <term><productname>openssl</productname></term>
+     <term><productname>OpenSSL</productname></term>
      <listitem><para>
       Required for SSL support. Binaries can be downloaded from
       <ulink url="http://www.slproweb.com/products/Win32OpenSSL.html"></ulink>
-      or source from <ulink url="http://www.openssl.org"></ulink>.
+      or source from <ulink url="https://www.openssl.org"></ulink>.
      </para></listitem>
     </varlistentry>
 
@@ -348,7 +348,7 @@ $ENV{MSBFLAGS}="/m";
 
   <para>
    To use a server-side third party library such as <productname>python</productname> or
-   <productname>openssl</productname>, this library <emphasis>must</emphasis> also be
+   <productname>OpenSSL</productname>, this library <emphasis>must</emphasis> also be
    64-bit. There is no support for loading a 32-bit library in a 64-bit
    server. Several of the third party libraries that PostgreSQL supports may
    only be available in 32-bit versions, in which case they cannot be used with
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 48b468f62f..310e9ba348 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -187,7 +187,7 @@ be_tls_init(bool isServerStart)
 	SSL_CTX_set_options(context, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
 
 	/* disallow SSL session tickets */
-#ifdef SSL_OP_NO_TICKET			/* added in openssl 0.9.8f */
+#ifdef SSL_OP_NO_TICKET			/* added in OpenSSL 0.9.8f */
 	SSL_CTX_set_options(context, SSL_OP_NO_TICKET);
 #endif
 
@@ -638,7 +638,7 @@ be_tls_write(Port *port, void *ptr, size_t len, int *waitfor)
  * Private substitute BIO: this does the sending and receiving using send() and
  * recv() instead. This is so that we can enable and disable interrupts
  * just while calling recv(). We cannot have interrupts occurring while
- * the bulk of openssl runs, because it uses malloc() and possibly other
+ * the bulk of OpenSSL runs, because it uses malloc() and possibly other
  * non-reentrant libc facilities. We also need to call send() and recv()
  * directly so it gets passed through the socket/signals layer on Win32.
  *
@@ -736,7 +736,7 @@ my_BIO_s_socket(void)
 	return my_bio_methods;
 }
 
-/* This should exactly match openssl's SSL_set_fd except for using my BIO */
+/* This should exactly match OpenSSL's SSL_set_fd except for using my BIO */
 static int
 my_SSL_set_fd(Port *port, int fd)
 {
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index 43640e3799..045405e92b 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1588,7 +1588,7 @@ my_BIO_s_socket(void)
 	return my_bio_methods;
 }
 
-/* This should exactly match openssl's SSL_set_fd except for using my BIO */
+/* This should exactly match OpenSSL's SSL_set_fd except for using my BIO */
 static int
 my_SSL_set_fd(PGconn *conn, int fd)
 {
diff --git a/src/test/ssl/Makefile b/src/test/ssl/Makefile
index df477f1d40..97389c90f8 100644
--- a/src/test/ssl/Makefile
+++ b/src/test/ssl/Makefile
@@ -32,7 +32,7 @@ SSLFILES := $(CERTIFICATES:%=ssl/%.key) $(CERTIFICATES:%=ssl/%.crt) \
 # This target generates all the key and certificate files.
 sslfiles: $(SSLFILES)
 
-# Openssl requires a directory to put all generated certificates in. We don't
+# OpenSSL requires a directory to put all generated certificates in. We don't
 # use this for anything, but we need a location.
 ssl/new_certs_dir:
 	mkdir ssl/new_certs_dir
-- 
2.14.1.145.gb3622a4ee

#5Michael Paquier
michael@paquier.xyz
In reply to: Magnus Hagander (#3)
Re: Capitalization of the name OpenSSL

On Thu, Jun 28, 2018 at 09:44:13AM +0200, Magnus Hagander wrote:

Normally I'm the biggest promoter for back-patching documentation changes
:) But in the case when it's really just about the capitalization, I think
it's fine to just bother with HEAD for it.

Yeah, after second-thoughts I think that I'll just fix that on HEAD
tomorrow and call it a day if there are no objections after
double-checking that no spots are missing as that's mainly cosmetic.
--
Michael

#6Michael Paquier
michael@paquier.xyz
In reply to: Daniel Gustafsson (#4)
Re: Capitalization of the name OpenSSL

On Thu, Jun 28, 2018 at 09:54:35AM +0200, Daniel Gustafsson wrote:

On 28 Jun 2018, at 04:54, Michael Paquier <michael@paquier.xyz> wrote:

I see more that 860 references to openssl as lower case with lots of
noise around file names and translations. And I can see that you missed
two of them:

Nice catch, fixed in the attached.

I found a couple of extra ones in the past release notes, which I fixed
as well to make all references more consistent.

I don't think that the comments are worth bothering for anything else
than HEAD, now should the doc changes be back-patched? I would tend to
do so.

Not sure if it’s worth any back-patching at all to be honest, but I’ll leave
that call to you.

Yes, done only on HEAD.
--
Michael