<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sssd.git/src/util/crypto, branch sssctl</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/'/>
<entry>
<title>Fix minor spelling mistakes</title>
<updated>2017-10-25T08:24:49+00:00</updated>
<author>
<name>René Genz</name>
<email>liebundartig@freenet.de</email>
</author>
<published>2017-10-22T20:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=a02a5ed51178b2cbede0396d66aed716b8898096'/>
<id>a02a5ed51178b2cbede0396d66aed716b8898096</id>
<content type='text'>
Merges: https://pagure.io/SSSD/sssd/pull-request/3556

Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Merges: https://pagure.io/SSSD/sssd/pull-request/3556

Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CRYPTO: Do not call NSS_Shutdown after every operation</title>
<updated>2017-07-24T19:39:38+00:00</updated>
<author>
<name>Jakub Hrozek</name>
<email>jhrozek@redhat.com</email>
</author>
<published>2017-06-07T13:55:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=a6f606117e5cfe64c4b49f94e514bf82054716d3'/>
<id>a6f606117e5cfe64c4b49f94e514bf82054716d3</id>
<content type='text'>
Calling setup and teardown on every encryption cases issues like the one
described in https://bugzilla.redhat.com/show_bug.cgi?id=1456151
eventually.

Similarly to other crypto functions, don't tear down NSS by calling
NSS_Shutdown. Let the OS reclaim the resources.

Resolves:
https://pagure.io/SSSD/sssd/issue/3424

Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calling setup and teardown on every encryption cases issues like the one
described in https://bugzilla.redhat.com/show_bug.cgi?id=1456151
eventually.

Similarly to other crypto functions, don't tear down NSS by calling
NSS_Shutdown. Let the OS reclaim the resources.

Resolves:
https://pagure.io/SSSD/sssd/issue/3424

Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UTIL: Remove fcntl.h from util/util.h</title>
<updated>2017-06-08T15:09:36+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2017-05-27T17:07:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=8890a30f5d054187fd7d5b50503f82a49cd025f0'/>
<id>8890a30f5d054187fd7d5b50503f82a49cd025f0</id>
<content type='text'>
fcntl.h is not used directly by util/util.h. The header file fcntl.h
must be included in 49 files and after removing it from util.h it had to be
added only to 7 missing file which were using either directly syscall fcntl
or syscall open.

Reviewed-by: Fabiano Fidêncio &lt;fidencio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fcntl.h is not used directly by util/util.h. The header file fcntl.h
must be included in 49 files and after removing it from util.h it had to be
added only to 7 missing file which were using either directly syscall fcntl
or syscall open.

Reviewed-by: Fabiano Fidêncio &lt;fidencio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sss_crypto.h: include required headers</title>
<updated>2016-12-19T22:22:26+00:00</updated>
<author>
<name>Pavel Březina</name>
<email>pbrezina@redhat.com</email>
</author>
<published>2016-11-16T13:56:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=35d1617655ca7270a23a716f60e7a4497cbba4ba'/>
<id>35d1617655ca7270a23a716f60e7a4497cbba4ba</id>
<content type='text'>
So we do not depend on #include order.

Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So we do not depend on #include order.

Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcrypto: Check right value of CRYPTO_memcmp</title>
<updated>2016-10-21T16:03:54+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2016-10-19T14:46:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=0c2be9700d3b54db33c1a3dd5d230b34bfaceb50'/>
<id>0c2be9700d3b54db33c1a3dd5d230b34bfaceb50</id>
<content type='text'>
sss_decrypt failed even though should pass because
we were checking wrong value of CRYPTO_memcmp.
Nobody noticed that because there was not a unit test :-)

Reviewed-by: Christian Heimes &lt;cheimes@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sss_decrypt failed even though should pass because
we were checking wrong value of CRYPTO_memcmp.
Nobody noticed that because there was not a unit test :-)

Reviewed-by: Christian Heimes &lt;cheimes@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: Port libcrypto code to openssl-1.1</title>
<updated>2016-10-20T12:51:42+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2016-10-17T13:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=8f1316a0c677f211eaaa1346e21a03446b8c4fb1'/>
<id>8f1316a0c677f211eaaa1346e21a03446b8c4fb1</id>
<content type='text'>
EVP_MD_CTX and EVP_CIPHER_CTX are opaque in openssl-1.1

Reviewed-by: Tomas Mraz &lt;tmraz@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
EVP_MD_CTX and EVP_CIPHER_CTX are opaque in openssl-1.1

Reviewed-by: Tomas Mraz &lt;tmraz@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>UTIL: Use sss_atomic_read_s in generate_csprng_buffer</title>
<updated>2016-08-17T14:55:15+00:00</updated>
<author>
<name>Jakub Hrozek</name>
<email>jhrozek@redhat.com</email>
</author>
<published>2016-08-08T12:07:04+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=b3a22ee1d91aa4ed1544475be16ec2b7cf886180'/>
<id>b3a22ee1d91aa4ed1544475be16ec2b7cf886180</id>
<content type='text'>
There was a bug in generate_csprng_buffer() where if we read the exact
amount of bytes from /dev/urandom, we would always return EIO. Instead,
let's reuse the existing code from sss_atomic_read_s() which fixes this
bug and reduces code duplication.

Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
Reviewed-by: Fabiano Fidêncio &lt;fabiano@fidencio.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There was a bug in generate_csprng_buffer() where if we read the exact
amount of bytes from /dev/urandom, we would always return EIO. Instead,
let's reuse the existing code from sss_atomic_read_s() which fixes this
bug and reduces code duplication.

Reviewed-by: Lukáš Slebodník &lt;lslebodn@redhat.com&gt;
Reviewed-by: Fabiano Fidêncio &lt;fabiano@fidencio.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Secrets: Add encryption at rest</title>
<updated>2016-06-29T19:46:52+00:00</updated>
<author>
<name>Simo Sorce</name>
<email>simo@redhat.com</email>
</author>
<published>2016-05-09T15:34:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=625bb2ddf15e8f305a53afa44e87f2146fa930af'/>
<id>625bb2ddf15e8f305a53afa44e87f2146fa930af</id>
<content type='text'>
Generates a master key file if it doesn't exist and encrypts secrets
using the master key contained in the file.

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generates a master key file if it doesn't exist and encrypts secrets
using the master key contained in the file.

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CRYPTO: Use unprefixed version of function stpncpy</title>
<updated>2014-05-18T03:40:57+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2014-05-17T16:34:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=83e1ea9e24aabe6ade180649ecfc9c253ad19395'/>
<id>83e1ea9e24aabe6ade180649ecfc9c253ad19395</id>
<content type='text'>
glibc contains two versions of finction stpncpy
sh-4.2$ nm --dynamic --defined-only /lib64/libc.so.6 | grep stpncpy
0000003ce1c89b00 i stpncpy
0000003ce1c89b00 i __stpncpy
0000003ce1d040a0 T __stpncpy_chk

We should use more portable version of stpncpy without prefix with underscores.

The function __stpncpy was used in initial veersion
e65c65fc710fa030bfb8319efc43fcdc9ce5a26f, which was based on
http://people.redhat.com/drepper/SHA-crypt.txt

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
glibc contains two versions of finction stpncpy
sh-4.2$ nm --dynamic --defined-only /lib64/libc.so.6 | grep stpncpy
0000003ce1c89b00 i stpncpy
0000003ce1c89b00 i __stpncpy
0000003ce1d040a0 T __stpncpy_chk

We should use more portable version of stpncpy without prefix with underscores.

The function __stpncpy was used in initial veersion
e65c65fc710fa030bfb8319efc43fcdc9ce5a26f, which was based on
http://people.redhat.com/drepper/SHA-crypt.txt

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CRYPTO: Fix access to uninitialized data</title>
<updated>2014-04-28T20:14:23+00:00</updated>
<author>
<name>Lukas Slebodnik</name>
<email>lslebodn@redhat.com</email>
</author>
<published>2014-03-18T17:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/pbrezina/public_git/sssd.git/commit/?id=9faab6d48145d3a0d7b9a225ed35bdcaa32eca2c'/>
<id>9faab6d48145d3a0d7b9a225ed35bdcaa32eca2c</id>
<content type='text'>
The size of output buffer(obufsize) was longer than initialised data.
In calculation, uint32_t was used for length of the cryptotext,
but uint16_t was written into buffer. The end of buffer was not initialised
and it caused valgrind warning.

 Use of uninitialised value of size 8
    at 0x37AE40F363: pl_base64_encode_buffer (nssb64e.c:180)
    by 0x37AE40F6ED: NSSBase64_EncodeItem_Util (nssb64e.c:482)
    by 0x37AE40F87A: BTOA_DataToAscii_Util (nssb64e.c:721)
    by 0x40208A: sss_base64_encode (nss_base64.c:47)
    by 0x403305: sss_password_encrypt (nss_obfuscate.c:358)

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The size of output buffer(obufsize) was longer than initialised data.
In calculation, uint32_t was used for length of the cryptotext,
but uint16_t was written into buffer. The end of buffer was not initialised
and it caused valgrind warning.

 Use of uninitialised value of size 8
    at 0x37AE40F363: pl_base64_encode_buffer (nssb64e.c:180)
    by 0x37AE40F6ED: NSSBase64_EncodeItem_Util (nssb64e.c:482)
    by 0x37AE40F87A: BTOA_DataToAscii_Util (nssb64e.c:721)
    by 0x40208A: sss_base64_encode (nss_base64.c:47)
    by 0x403305: sss_password_encrypt (nss_obfuscate.c:358)

Reviewed-by: Jakub Hrozek &lt;jhrozek@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
