summaryrefslogtreecommitdiff
path: root/sys/include/libsec.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-10-06 20:52:18 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2017-10-06 20:52:18 +0200
commit8a67560183b3b726c827bcac02632b2b8e3ba59d (patch)
tree81bd4e0c83cea7760680491c412648f0d692c143 /sys/include/libsec.h
parent5f42da15355e3548634b778271251e7d078f01e6 (diff)
libsec: export asn1encodedigest(), asn1encodeRSApub(), asn1toRSApub(), pkcs1padbuf() and pkcs1unpadbuf()
Diffstat (limited to 'sys/include/libsec.h')
-rw-r--r--sys/include/libsec.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/include/libsec.h b/sys/include/libsec.h
index 12f4d4be4..99df9791b 100644
--- a/sys/include/libsec.h
+++ b/sys/include/libsec.h
@@ -355,6 +355,7 @@ RSApriv* rsaprivalloc(void);
void rsaprivfree(RSApriv*);
RSApub* rsaprivtopub(RSApriv*);
RSApub* X509toRSApub(uchar*, int, char*, int);
+RSApub* asn1toRSApub(uchar*, int);
RSApriv* asn1toRSApriv(uchar*, int);
void asn1dump(uchar *der, int len);
uchar* decodePEM(char *s, char *type, int *len, char **new_s);
@@ -366,6 +367,13 @@ 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
*/