rsa(2): document asn1encodeRSApriv() and asn1encodeRSApub() functions

This commit is contained in:
cinap_lenrek 2019-08-30 07:35:54 +02:00
parent 85216d3d95
commit a6fde3edc5

View file

@ -2,6 +2,8 @@
.SH NAME .SH NAME
asn1dump, asn1dump,
asn1toRSApriv, asn1toRSApriv,
asn1encodeRSApriv,
asn1encodeRSApub,
decodePEM, decodePEM,
rsadecrypt, rsadecrypt,
rsaencrypt, rsaencrypt,
@ -62,7 +64,13 @@ RSApub* X509toRSApub(uchar *cert, int ncert, char *name, int nname)
RSApriv* asn1toRSApriv(uchar *priv, int npriv) RSApriv* asn1toRSApriv(uchar *priv, int npriv)
.PP .PP
.B .B
void asn1dump(uchar *der, int len) int asn1encodeRSApriv(RSApriv *k, uchar *buf, int len)
.PP
.B
int asn1encodeRSApub(RSApub *pk, uchar *buf, int len)
.PP
.B
void asn1dump(uchar *der, int len)
.PP .PP
.B .B
uchar* decodePEM(char *s, char *type, int *len, char **new_s) uchar* decodePEM(char *s, char *type, int *len, char **new_s)
@ -207,6 +215,21 @@ converts an ASN1 formatted RSA private key into the corresponding
.B RSApriv .B RSApriv
structure. structure.
.PP .PP
.I Asn1encodeRSApriv
and
.I asn1encodeRSApub
export a
.B RSApriv
or
.B RSApub
structure to ASN1 format.
On success,
.I buf
is filled and the encoded byte length is returned.
Otherwise
.B -1
is returned and error string is set.
.PP
.I Asn1dump .I Asn1dump
prints an ASN1 object to standard output. prints an ASN1 object to standard output.
.PP .PP