Re: svn commit: r342057 - head/crypto/openssl/crypto/engine

2018-12-14 Thread Jung-uk Kim
On 18. 12. 13., Kevin Bowling wrote:
> But why, you can trivially see the open() call with truss or more
> advanced tracers if you are debugging this

Sure.  I just followed OpenSSL coding style.

Jung-uk Kim

> On Thu, Dec 13, 2018 at 6:39 PM Kubilay Kocak  > wrote:
> 
> On 14/12/2018 12:06 pm, Jung-uk Kim wrote:
> > Author: jkim
> > Date: Fri Dec 14 01:06:34 2018
> > New Revision: 342057
> > URL: https://svnweb.freebsd.org/changeset/base/342057
> >
> > Log:
> >    Do not complain when /dev/crypto does not exist.
> >   
> >    Now the new devcrypto engine is enabled since r342009, many
> users started
> >    seeing "Could not open /dev/crypto: No such file or
> directory".  Disable
> >    the annoying error message as it is not very useful anyway.
> >   
> >    Note the patch was submitted upstream.
> >   
> >    https://github.com/openssl/openssl/pull/7896
> >
> > Modified:
> >    head/crypto/openssl/crypto/engine/eng_devcrypto.c
> >
> > Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c
> >
> 
> ==
> > --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14
> 00:40:38 2018        (r342056)
> > +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14
> 01:06:34 2018        (r342057)
> > @@ -24,6 +24,8 @@
> >   
> >   #include "internal/engine.h"
> >   
> > +/* #define ENGINE_DEVCRYPTO_DEBUG */
> > +
> >   #ifdef CRYPTO_ALGORITHM_MIN
> >   # define CHECK_BSD_STYLE_MACROS
> >   #endif
> > @@ -615,6 +617,9 @@ void engine_load_devcrypto_int()
> >       ENGINE *e = NULL;
> >   
> >       if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
> > +#ifndef ENGINE_DEVCRYPTO_DEBUG
> > +        if (errno != ENOENT)
> > +#endif
> >           fprintf(stderr, "Could not open /dev/crypto: %s\n",
> strerror(errno));
> >           return;
> >       }
> 
> How trivially could devcrypto_debug  be modified to be a runtime
> configuration (say sysctl) setting?



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r342057 - head/crypto/openssl/crypto/engine

2018-12-14 Thread Jung-uk Kim
On 18. 12. 13., Kubilay Kocak wrote:
> On 14/12/2018 12:06 pm, Jung-uk Kim wrote:
>> Author: jkim
>> Date: Fri Dec 14 01:06:34 2018
>> New Revision: 342057
>> URL: https://svnweb.freebsd.org/changeset/base/342057
>>
>> Log:
>>    Do not complain when /dev/crypto does not exist.
>>       Now the new devcrypto engine is enabled since r342009, many
>> users started
>>    seeing "Could not open /dev/crypto: No such file or directory". 
>> Disable
>>    the annoying error message as it is not very useful anyway.
>>       Note the patch was submitted upstream.
>>       https://github.com/openssl/openssl/pull/7896
>>
>> Modified:
>>    head/crypto/openssl/crypto/engine/eng_devcrypto.c
>>
>> Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c
>> ==
>>
>> --- head/crypto/openssl/crypto/engine/eng_devcrypto.c    Fri Dec 14
>> 00:40:38 2018    (r342056)
>> +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c    Fri Dec 14
>> 01:06:34 2018    (r342057)
>> @@ -24,6 +24,8 @@
>>     #include "internal/engine.h"
>>   +/* #define ENGINE_DEVCRYPTO_DEBUG */
>> +
>>   #ifdef CRYPTO_ALGORITHM_MIN
>>   # define CHECK_BSD_STYLE_MACROS
>>   #endif
>> @@ -615,6 +617,9 @@ void engine_load_devcrypto_int()
>>   ENGINE *e = NULL;
>>     if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
>> +#ifndef ENGINE_DEVCRYPTO_DEBUG
>> +    if (errno != ENOENT)
>> +#endif
>>   fprintf(stderr, "Could not open /dev/crypto: %s\n",
>> strerror(errno));
>>   return;
>>   }
> 
> How trivially could devcrypto_debug  be modified to be a runtime
> configuration (say sysctl) setting?

This file came from OpenSSL and we will not implement any
FreeBSD-specific code like that.

Jung-uk Kim



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r342057 - head/crypto/openssl/crypto/engine

2018-12-13 Thread Kevin Bowling
But why, you can trivially see the open() call with truss or more advanced
tracers if you are debugging this

On Thu, Dec 13, 2018 at 6:39 PM Kubilay Kocak  wrote:

> On 14/12/2018 12:06 pm, Jung-uk Kim wrote:
> > Author: jkim
> > Date: Fri Dec 14 01:06:34 2018
> > New Revision: 342057
> > URL: https://svnweb.freebsd.org/changeset/base/342057
> >
> > Log:
> >Do not complain when /dev/crypto does not exist.
> >
> >Now the new devcrypto engine is enabled since r342009, many users
> started
> >seeing "Could not open /dev/crypto: No such file or directory".
> Disable
> >the annoying error message as it is not very useful anyway.
> >
> >Note the patch was submitted upstream.
> >
> >https://github.com/openssl/openssl/pull/7896
> >
> > Modified:
> >head/crypto/openssl/crypto/engine/eng_devcrypto.c
> >
> > Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c
> >
> ==
> > --- head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14
> 00:40:38 2018(r342056)
> > +++ head/crypto/openssl/crypto/engine/eng_devcrypto.c Fri Dec 14
> 01:06:34 2018(r342057)
> > @@ -24,6 +24,8 @@
> >
> >   #include "internal/engine.h"
> >
> > +/* #define ENGINE_DEVCRYPTO_DEBUG */
> > +
> >   #ifdef CRYPTO_ALGORITHM_MIN
> >   # define CHECK_BSD_STYLE_MACROS
> >   #endif
> > @@ -615,6 +617,9 @@ void engine_load_devcrypto_int()
> >   ENGINE *e = NULL;
> >
> >   if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
> > +#ifndef ENGINE_DEVCRYPTO_DEBUG
> > +if (errno != ENOENT)
> > +#endif
> >   fprintf(stderr, "Could not open /dev/crypto: %s\n",
> strerror(errno));
> >   return;
> >   }
>
> How trivially could devcrypto_debug  be modified to be a runtime
> configuration (say sysctl) setting?
> ___
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r342057 - head/crypto/openssl/crypto/engine

2018-12-13 Thread Kubilay Kocak

On 14/12/2018 12:06 pm, Jung-uk Kim wrote:

Author: jkim
Date: Fri Dec 14 01:06:34 2018
New Revision: 342057
URL: https://svnweb.freebsd.org/changeset/base/342057

Log:
   Do not complain when /dev/crypto does not exist.
   
   Now the new devcrypto engine is enabled since r342009, many users started

   seeing "Could not open /dev/crypto: No such file or directory".  Disable
   the annoying error message as it is not very useful anyway.
   
   Note the patch was submitted upstream.
   
   https://github.com/openssl/openssl/pull/7896


Modified:
   head/crypto/openssl/crypto/engine/eng_devcrypto.c

Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c
==
--- head/crypto/openssl/crypto/engine/eng_devcrypto.c   Fri Dec 14 00:40:38 
2018(r342056)
+++ head/crypto/openssl/crypto/engine/eng_devcrypto.c   Fri Dec 14 01:06:34 
2018(r342057)
@@ -24,6 +24,8 @@
  
  #include "internal/engine.h"
  
+/* #define ENGINE_DEVCRYPTO_DEBUG */

+
  #ifdef CRYPTO_ALGORITHM_MIN
  # define CHECK_BSD_STYLE_MACROS
  #endif
@@ -615,6 +617,9 @@ void engine_load_devcrypto_int()
  ENGINE *e = NULL;
  
  if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {

+#ifndef ENGINE_DEVCRYPTO_DEBUG
+if (errno != ENOENT)
+#endif
  fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
  return;
  }


How trivially could devcrypto_debug  be modified to be a runtime 
configuration (say sysctl) setting?

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r342057 - head/crypto/openssl/crypto/engine

2018-12-13 Thread Jung-uk Kim
Author: jkim
Date: Fri Dec 14 01:06:34 2018
New Revision: 342057
URL: https://svnweb.freebsd.org/changeset/base/342057

Log:
  Do not complain when /dev/crypto does not exist.
  
  Now the new devcrypto engine is enabled since r342009, many users started
  seeing "Could not open /dev/crypto: No such file or directory".  Disable
  the annoying error message as it is not very useful anyway.
  
  Note the patch was submitted upstream.
  
  https://github.com/openssl/openssl/pull/7896

Modified:
  head/crypto/openssl/crypto/engine/eng_devcrypto.c

Modified: head/crypto/openssl/crypto/engine/eng_devcrypto.c
==
--- head/crypto/openssl/crypto/engine/eng_devcrypto.c   Fri Dec 14 00:40:38 
2018(r342056)
+++ head/crypto/openssl/crypto/engine/eng_devcrypto.c   Fri Dec 14 01:06:34 
2018(r342057)
@@ -24,6 +24,8 @@
 
 #include "internal/engine.h"
 
+/* #define ENGINE_DEVCRYPTO_DEBUG */
+
 #ifdef CRYPTO_ALGORITHM_MIN
 # define CHECK_BSD_STYLE_MACROS
 #endif
@@ -615,6 +617,9 @@ void engine_load_devcrypto_int()
 ENGINE *e = NULL;
 
 if ((cfd = open("/dev/crypto", O_RDWR, 0)) < 0) {
+#ifndef ENGINE_DEVCRYPTO_DEBUG
+if (errno != ENOENT)
+#endif
 fprintf(stderr, "Could not open /dev/crypto: %s\n", strerror(errno));
 return;
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"