summaryrefslogtreecommitdiff
path: root/src/sbearssl/sbearssl_skey_readfile.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 19:39:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 19:39:01 +0000
commit53091e3bce487ee82e2805a0231e780551561717 (patch)
treef0fa36ff8eadaf1f01d4510597b5e3a310764dc7 /src/sbearssl/sbearssl_skey_readfile.c
parentf85b8a70f3b44510a5cf3895bf7357ae90655f65 (diff)
downloads6-networking-53091e3bce487ee82e2805a0231e780551561717.tar.xz
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/sbearssl/sbearssl_skey_readfile.c')
-rw-r--r--src/sbearssl/sbearssl_skey_readfile.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sbearssl/sbearssl_skey_readfile.c b/src/sbearssl/sbearssl_skey_readfile.c
index c406de0..7e7df51 100644
--- a/src/sbearssl/sbearssl_skey_readfile.c
+++ b/src/sbearssl/sbearssl_skey_readfile.c
@@ -1,9 +1,8 @@
/* ISC license. */
-#include <sys/types.h>
+#include <string.h>
#include <errno.h>
#include <bearssl.h>
-#include <skalibs/bytestr.h>
#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>
#include <skalibs/djbunix.h>
@@ -49,9 +48,9 @@ int sbearssl_skey_readfile (char const *fn, sbearssl_skey *key, stralloc *sa)
for (; i < n ; i++)
{
char const *name = tmp.s + p[i].name ;
- if (!str_diff(name, "RSA PRIVATE KEY")
- || !str_diff(name, "EC PRIVATE KEY")
- || !str_diff(name, "PRIVATE KEY"))
+ if (!strcmp(name, "RSA PRIVATE KEY")
+ || !strcmp(name, "EC PRIVATE KEY")
+ || !strcmp(name, "PRIVATE KEY"))
{
r = decode_key(key, tmp.s + p[i].data, p[i].datalen, sa) ;
if (r) goto fail ;