summaryrefslogtreecommitdiff
path: root/sys/include/ape/libsec.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-10-16 04:06:17 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2017-10-16 04:06:17 +0200
commit1d34a855fe736729fe35013f2c5a007d9d715877 (patch)
tree776361083e600e31ecc9d392e13824eaac04e3c2 /sys/include/ape/libsec.h
parent8fdf22d5fb5dca8b0acb1cbfccca1eda33b7d39f (diff)
ape/libsec: fix the build, bring ape libsec.h in sync with plan9 version
Diffstat (limited to 'sys/include/ape/libsec.h')
-rw-r--r--sys/include/ape/libsec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/include/ape/libsec.h b/sys/include/ape/libsec.h
index 954d3641d..b76f5eb63 100644
--- a/sys/include/ape/libsec.h
+++ b/sys/include/ape/libsec.h
@@ -364,6 +364,7 @@ void rsaprivfree(RSApriv*);
RSApub* rsaprivtopub(RSApriv*);
RSApub* X509toRSApub(uchar*, int, char*, int);
RSApriv* asn1toRSApriv(uchar*, int);
+RSApub* asn1toRSApub(uchar*, int);
void asn1dump(uchar *der, int len);
uchar* decodePEM(char *s, char *type, int *len, char **new_s);
PEMChain* decodepemchain(char *s, char *type);
@@ -374,6 +375,12 @@ char* X509rsaverifydigest(uchar *sig, int siglen, uchar *edigest, int edigestle
void X509dump(uchar *cert, int ncert);
+mpint* pkcs1padbuf(uchar *buf, int len, mpint *modulus, int blocktype);
+int pkcs1unpadbuf(uchar *buf, int len, mpint *modulus, int blocktype);
+int asn1encodeRSApub(RSApub *pk, uchar *buf, int len);
+int asn1encodedigest(DigestState* (*fun)(uchar*, ulong, uchar*, DigestState*),
+ uchar *digest, uchar *buf, int len);
+
/*
* elgamal
*/