diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-08-30 07:35:54 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-08-30 07:35:54 +0200 |
commit | a6fde3edc5ec390d23e50110c93492d42f1e23e1 (patch) | |
tree | 6f017ad6fad779cc1a6d6809898309f32fe82a8f | |
parent | 85216d3d95505c19a57d3bbe74e8a7eca109a8e6 (diff) |
rsa(2): document asn1encodeRSApriv() and asn1encodeRSApub() functions
-rw-r--r-- | sys/man/2/rsa | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/sys/man/2/rsa b/sys/man/2/rsa index 59606e923..627991e18 100644 --- a/sys/man/2/rsa +++ b/sys/man/2/rsa @@ -2,6 +2,8 @@ .SH NAME asn1dump, asn1toRSApriv, +asn1encodeRSApriv, +asn1encodeRSApub, decodePEM, rsadecrypt, rsaencrypt, @@ -62,7 +64,13 @@ RSApub* X509toRSApub(uchar *cert, int ncert, char *name, int nname) RSApriv* asn1toRSApriv(uchar *priv, int npriv) .PP .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 .B 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 structure. .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 prints an ASN1 object to standard output. .PP |