diff options
author | tedu <> | 2014-04-18 00:10:08 +0000 |
---|---|---|
committer | tedu <> | 2014-04-18 00:10:08 +0000 |
commit | 07f5c09b19f56c323fa22ebd5efb5a4df9f5dc4d (patch) | |
tree | 6327d50d69a1982f840dc68fe928ea459e2c41e0 /src/lib/libcrypto/asn1/t_pkey.c | |
parent | 288a9e368d9d4a72792b12a00ad69e3592d94073 (diff) | |
download | openbsd-07f5c09b19f56c323fa22ebd5efb5a4df9f5dc4d.tar.gz openbsd-07f5c09b19f56c323fa22ebd5efb5a4df9f5dc4d.tar.bz2 openbsd-07f5c09b19f56c323fa22ebd5efb5a4df9f5dc4d.zip |
putting most of the braces in the right column is the very least we can do.
Diffstat (limited to 'src/lib/libcrypto/asn1/t_pkey.c')
-rw-r--r-- | src/lib/libcrypto/asn1/t_pkey.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libcrypto/asn1/t_pkey.c b/src/lib/libcrypto/asn1/t_pkey.c index 9dd18f6579..61f5cd61f1 100644 --- a/src/lib/libcrypto/asn1/t_pkey.c +++ b/src/lib/libcrypto/asn1/t_pkey.c | |||
@@ -64,7 +64,7 @@ | |||
64 | 64 | ||
65 | int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, | 65 | int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, |
66 | unsigned char *buf, int off) | 66 | unsigned char *buf, int off) |
67 | { | 67 | { |
68 | int n,i; | 68 | int n,i; |
69 | const char *neg; | 69 | const char *neg; |
70 | 70 | ||
@@ -73,20 +73,20 @@ int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, | |||
73 | if(!BIO_indent(bp,off,128)) | 73 | if(!BIO_indent(bp,off,128)) |
74 | return 0; | 74 | return 0; |
75 | if (BN_is_zero(num)) | 75 | if (BN_is_zero(num)) |
76 | { | 76 | { |
77 | if (BIO_printf(bp, "%s 0\n", number) <= 0) | 77 | if (BIO_printf(bp, "%s 0\n", number) <= 0) |
78 | return 0; | 78 | return 0; |
79 | return 1; | 79 | return 1; |
80 | } | 80 | } |
81 | 81 | ||
82 | if (BN_num_bytes(num) <= BN_BYTES) | 82 | if (BN_num_bytes(num) <= BN_BYTES) |
83 | { | 83 | { |
84 | if (BIO_printf(bp,"%s %s%lu (%s0x%lx)\n",number,neg, | 84 | if (BIO_printf(bp,"%s %s%lu (%s0x%lx)\n",number,neg, |
85 | (unsigned long)num->d[0],neg,(unsigned long)num->d[0]) | 85 | (unsigned long)num->d[0],neg,(unsigned long)num->d[0]) |
86 | <= 0) return(0); | 86 | <= 0) return(0); |
87 | } | 87 | } |
88 | else | 88 | else |
89 | { | 89 | { |
90 | buf[0]=0; | 90 | buf[0]=0; |
91 | if (BIO_printf(bp,"%s%s",number, | 91 | if (BIO_printf(bp,"%s%s",number, |
92 | (neg[0] == '-')?" (Negative)":"") <= 0) | 92 | (neg[0] == '-')?" (Negative)":"") <= 0) |
@@ -98,17 +98,17 @@ int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, | |||
98 | else buf++; | 98 | else buf++; |
99 | 99 | ||
100 | for (i=0; i<n; i++) | 100 | for (i=0; i<n; i++) |
101 | { | 101 | { |
102 | if ((i%15) == 0) | 102 | if ((i%15) == 0) |
103 | { | 103 | { |
104 | if(BIO_puts(bp,"\n") <= 0 | 104 | if(BIO_puts(bp,"\n") <= 0 |
105 | || !BIO_indent(bp,off+4,128)) | 105 | || !BIO_indent(bp,off+4,128)) |
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | if (BIO_printf(bp,"%02x%s",buf[i],((i+1) == n)?"":":") | 108 | if (BIO_printf(bp,"%02x%s",buf[i],((i+1) == n)?"":":") |
109 | <= 0) return(0); | 109 | <= 0) return(0); |
110 | } | ||
111 | if (BIO_write(bp,"\n",1) <= 0) return(0); | ||
112 | } | 110 | } |
113 | return(1); | 111 | if (BIO_write(bp,"\n",1) <= 0) return(0); |
114 | } | 112 | } |
113 | return(1); | ||
114 | } | ||