summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-01-06 08:34:25 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-01-06 08:34:25 +0100
commit8ff72ce20ddeaa6fce39bc722cfd0e2d826fc6eb (patch)
treeef4f18b5c1e48c12900d837dbce53b331a52af46 /sys/src
parenta200ecd3a65539ed3320e076b3679afe84f6a79e (diff)
libsec: remove asn1toDSApriv()
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/libsec/port/x509.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/sys/src/libsec/port/x509.c b/sys/src/libsec/port/x509.c
index 2ec9d9551..873d19186 100644
--- a/sys/src/libsec/port/x509.c
+++ b/sys/src/libsec/port/x509.c
@@ -2084,61 +2084,6 @@ errret:
}
/*
- * DSAPrivateKey ::= SEQUENCE{
- * version Version,
- * p INTEGER,
- * q INTEGER,
- * g INTEGER, -- alpha
- * pub_key INTEGER, -- key
- * priv_key INTEGER, -- secret
- * }
- */
-DSApriv*
-asn1toDSApriv(uchar *buf, int len)
-{
- int version;
- Elem e;
- Elist *el;
- DSApriv* key = nil;
-
- if(decode(buf, len, &e) != ASN_OK)
- goto errret;
- if(!is_seq(&e, &el) || elistlen(el) != 6)
- goto errret;
- version = -1;
- if(!is_int(&el->hd, &version) || version != 0)
- goto errret;
-
- key = dsaprivalloc();
- el = el->tl;
- if((key->pub.p = asn1mpint(&el->hd)) == nil)
- goto errret;
-
- el = el->tl;
- if((key->pub.q = asn1mpint(&el->hd)) == nil)
- goto errret;
-
- el = el->tl;
- if((key->pub.alpha = asn1mpint(&el->hd)) == nil)
- goto errret;
-
- el = el->tl;
- if((key->pub.key = asn1mpint(&el->hd)) == nil)
- goto errret;
-
- el = el->tl;
- if((key->secret = asn1mpint(&el->hd)) == nil)
- goto errret;
-
- freevalfields(&e.val);
- return key;
-errret:
- freevalfields(&e.val);
- dsaprivfree(key);
- return nil;
-}
-
-/*
* digest(CertificateInfo)
* Our ASN.1 library doesn't return pointers into the original
* data array, so we need to do a little hand decoding.