diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-11-25 21:16:58 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-11-25 21:16:58 +0000 |
commit | cb31c5e82982447c5036ace732feac15b8042eac (patch) | |
tree | df6700c5747d4e29682dd02e8927a551ef81fcce /src/include | |
parent | a6b3bddb41db1771ac9190a77caac1c7217e7e4b (diff) | |
download | s6-networking-cb31c5e82982447c5036ace732feac15b8042eac.tar.xz |
Add EC certificate issuer key type detection for sbearssl
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/s6-networking/sbearssl.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/include/s6-networking/sbearssl.h b/src/include/s6-networking/sbearssl.h index 4589822..d8f9021 100644 --- a/src/include/s6-networking/sbearssl.h +++ b/src/include/s6-networking/sbearssl.h @@ -25,6 +25,21 @@ extern int sbearssl_isder (unsigned char const *, size_t) ; + /* Certificates (x509-encoded) */ + +typedef struct sbearssl_cert_s sbearssl_cert, *sbearssl_cert_ref ; +struct sbearssl_cert_s +{ + size_t data ; + size_t datalen ; +} ; + +extern int sbearssl_cert_from (sbearssl_cert *, br_x509_certificate const *, stralloc *) ; +extern void sbearssl_cert_to (sbearssl_cert const *, br_x509_certificate *, char *) ; + +extern int sbearssl_cert_readfile (char const *, genalloc *, stralloc *) ; + + /* Private keys */ typedef struct sbearssl_rsa_skey_s sbearssl_rsa_skey, *sbearssl_rsa_skey_ref ; @@ -57,7 +72,7 @@ struct sbearssl_ec_skey_s extern int sbearssl_ec_skey_from (sbearssl_ec_skey *, br_ec_private_key const *, stralloc *) ; extern void sbearssl_ec_skey_to (sbearssl_ec_skey const *, br_ec_private_key *, char *) ; - +extern int sbearssl_ec_issuer_keytype (int *, br_x509_certificate const *) ; union sbearssl_skey_u { @@ -135,21 +150,6 @@ extern int sbearssl_pkey_from (sbearssl_pkey *, br_x509_pkey const *, stralloc * extern int sbearssl_pkey_to (sbearssl_pkey const *, br_x509_pkey *, char *) ; - /* Certificates (x509-encoded) */ - -typedef struct sbearssl_cert_s sbearssl_cert, *sbearssl_cert_ref ; -struct sbearssl_cert_s -{ - size_t data ; - size_t datalen ; -} ; - -extern int sbearssl_cert_from (sbearssl_cert *, br_x509_certificate const *, stralloc *) ; -extern void sbearssl_cert_to (sbearssl_cert const *, br_x509_certificate *, char *) ; - -extern int sbearssl_cert_readfile (char const *, genalloc *, stralloc *) ; - - /* Generic PEM */ typedef struct sbearssl_pemobject_s sbearssl_pemobject, *sbearssl_pemobject_ref ; |