aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/auth/factotum/pkcs1.c
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-10 14:44:21 +0000
committerDan Cross <cross@gajendra.net>2020-01-10 14:54:30 +0000
commitfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch)
tree81d26256d152435135bcb1ae43121979a49f5f2b /src/cmd/auth/factotum/pkcs1.c
parent77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff)
downloadplan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/cmd/auth/factotum/pkcs1.c')
-rw-r--r--src/cmd/auth/factotum/pkcs1.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/cmd/auth/factotum/pkcs1.c b/src/cmd/auth/factotum/pkcs1.c
index f3278454..0e116f2d 100644
--- a/src/cmd/auth/factotum/pkcs1.c
+++ b/src/cmd/auth/factotum/pkcs1.c
@@ -12,7 +12,7 @@
*
* We sign hashes of messages instead of the messages
* themselves.
- *
+ *
* The hashes are encoded in ASN.1 DER to identify
* the signature type, and then prefixed with 0x01 PAD 0x00
* where PAD is as many 0xFF bytes as desired.
@@ -138,7 +138,7 @@ mptoberjust(mpint *b, uchar *buf, uint len)
#define O3(x) \
(((x)>>14)&0x7F)|0x80, \
(((x)>>7)&0x7F)|0x80, \
- ((x)&0x7F)
+ ((x)&0x7F)
uchar oidsha1[] = { O0(1, 3), 14, 3, 2, 26 };
uchar oidmd2[] = { O0(1, 2), O2(840), O3(113549), 2, 2 };
uchar oidmd5[] = { O0(1, 2), O2(840), O3(113549), 2, 5 };
@@ -174,11 +174,11 @@ mkasn1(uchar *asn1, DigestAlg *alg, uchar *d, uint dlen)
sysfatal("bad alg in mkasn1");
return -1;
}
-
+
p = asn1;
*p++ = 0x30; /* sequence */
p++;
-
+
*p++ = 0x30; /* another sequence */
p++;
@@ -186,12 +186,12 @@ mkasn1(uchar *asn1, DigestAlg *alg, uchar *d, uint dlen)
*p++ = olen;
memmove(p, obj, olen);
p += olen;
-
+
*p++ = 0x05; /* null */
*p++ = 0;
-
+
asn1[3] = p - (asn1+4); /* end of inner sequence */
-
+
*p++ = 0x04; /* octet string */
*p++ = dlen;
memmove(p, d, dlen);
@@ -200,4 +200,3 @@ mkasn1(uchar *asn1, DigestAlg *alg, uchar *d, uint dlen)
asn1[1] = p - (asn1+2); /* end of outer sequence */
return p-asn1;
}
-