shithub: riscv

Download patch

ref: 1d34a855fe736729fe35013f2c5a007d9d715877
parent: 8fdf22d5fb5dca8b0acb1cbfccca1eda33b7d39f
author: cinap_lenrek <[email protected]>
date: Mon Oct 16 00:06:17 EDT 2017

ape/libsec: fix the build, bring ape libsec.h in sync with plan9 version

--- a/sys/include/ape/libsec.h
+++ b/sys/include/ape/libsec.h
@@ -364,6 +364,7 @@
 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 @@
 
 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
  */