summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmc <>2016-11-06 16:56:46 +0000
committerjmc <>2016-11-06 16:56:46 +0000
commit6e1ed006025265aaf8271fa45e8f32e3fd5597f3 (patch)
treec36cd6bc8a3b0e53016ff27bf82b098357c85685
parent8040a7483ddcf8dccda1702c21839b3bd23089fc (diff)
downloadopenbsd-6e1ed006025265aaf8271fa45e8f32e3fd5597f3.tar.gz
openbsd-6e1ed006025265aaf8271fa45e8f32e3fd5597f3.tar.bz2
openbsd-6e1ed006025265aaf8271fa45e8f32e3fd5597f3.zip
some minor cleanup;
-rw-r--r--src/lib/libcrypto/man/ASN1_OBJECT_new.310
-rw-r--r--src/lib/libcrypto/man/ASN1_STRING_length.36
-rw-r--r--src/lib/libcrypto/man/ASN1_STRING_new.34
-rw-r--r--src/lib/libcrypto/man/ASN1_STRING_print_ex.341
-rw-r--r--src/lib/libcrypto/man/ASN1_generate_nconf.324
5 files changed, 42 insertions, 43 deletions
diff --git a/src/lib/libcrypto/man/ASN1_OBJECT_new.3 b/src/lib/libcrypto/man/ASN1_OBJECT_new.3
index 9c73dcb0ce..cdae2be12c 100644
--- a/src/lib/libcrypto/man/ASN1_OBJECT_new.3
+++ b/src/lib/libcrypto/man/ASN1_OBJECT_new.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ASN1_OBJECT_new.3,v 1.4 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: ASN1_OBJECT_new.3,v 1.5 2016/11/06 16:56:46 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 6 2016 $
4.Dt ASN1_OBJECT_NEW 3 4.Dt ASN1_OBJECT_NEW 3
@@ -6,7 +6,7 @@
6.Sh NAME 6.Sh NAME
7.Nm ASN1_OBJECT_new , 7.Nm ASN1_OBJECT_new ,
8.Nm ASN1_OBJECT_free 8.Nm ASN1_OBJECT_free
9.Nd ASN1 object allocation functions 9.Nd ASN.1 object allocation functions
10.Sh SYNOPSIS 10.Sh SYNOPSIS
11.In openssl/asn1.h 11.In openssl/asn1.h
12.Ft ASN1_OBJECT * 12.Ft ASN1_OBJECT *
@@ -20,7 +20,7 @@
20.Sh DESCRIPTION 20.Sh DESCRIPTION
21The ASN1_OBJECT allocation routines allocate and free an 21The ASN1_OBJECT allocation routines allocate and free an
22.Vt ASN1_OBJECT 22.Vt ASN1_OBJECT
23structure, which represents an ASN1 OBJECT IDENTIFIER. 23structure, which represents an ASN.1 OBJECT IDENTIFIER.
24.Pp 24.Pp
25.Fn ASN1_OBJECT_new 25.Fn ASN1_OBJECT_new
26allocates and initializes an 26allocates and initializes an
@@ -32,13 +32,13 @@ frees up the
32.Vt ASN1_OBJECT 32.Vt ASN1_OBJECT
33structure 33structure
34.Fa a . 34.Fa a .
35.Sh NOTES 35.Pp
36Although 36Although
37.Fn ASN1_OBJECT_new 37.Fn ASN1_OBJECT_new
38allocates a new 38allocates a new
39.Vt ASN1_OBJECT 39.Vt ASN1_OBJECT
40structure, it is almost never used in applications. 40structure, it is almost never used in applications.
41The ASN1 object utility functions such as 41The ASN.1 object utility functions such as
42.Xr OBJ_nid2obj 3 42.Xr OBJ_nid2obj 3
43are used instead. 43are used instead.
44.Sh RETURN VALUES 44.Sh RETURN VALUES
diff --git a/src/lib/libcrypto/man/ASN1_STRING_length.3 b/src/lib/libcrypto/man/ASN1_STRING_length.3
index 1fa794fc46..f76e867d6a 100644
--- a/src/lib/libcrypto/man/ASN1_STRING_length.3
+++ b/src/lib/libcrypto/man/ASN1_STRING_length.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ASN1_STRING_length.3,v 1.3 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: ASN1_STRING_length.3,v 1.4 2016/11/06 16:56:46 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 6 2016 $
4.Dt ASN1_STRING_LENGTH 3 4.Dt ASN1_STRING_LENGTH 3
@@ -121,8 +121,8 @@ returns the type of
121.Fa x , 121.Fa x ,
122using standard constants such as 122using standard constants such as
123.Dv V_ASN1_OCTET_STRING . 123.Dv V_ASN1_OCTET_STRING .
124.Sh NOTES 124.Pp
125Almost all ASN1 types in OpenSSL are represented as 125Almost all ASN.1 types in OpenSSL are represented as
126.Vt ASN1_STRING 126.Vt ASN1_STRING
127structures. 127structures.
128Other types such as 128Other types such as
diff --git a/src/lib/libcrypto/man/ASN1_STRING_new.3 b/src/lib/libcrypto/man/ASN1_STRING_new.3
index 5810d5a15f..81fa9386aa 100644
--- a/src/lib/libcrypto/man/ASN1_STRING_new.3
+++ b/src/lib/libcrypto/man/ASN1_STRING_new.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ASN1_STRING_new.3,v 1.3 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: ASN1_STRING_new.3,v 1.4 2016/11/06 16:56:46 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 6 2016 $
4.Dt ASN1_STRING_NEW 3 4.Dt ASN1_STRING_NEW 3
@@ -38,7 +38,7 @@ structure of type
38.Fn ASN1_STRING_free 38.Fn ASN1_STRING_free
39frees up 39frees up
40.Fa a . 40.Fa a .
41.Sh NOTES 41.Pp
42Other string types call the ASN1_STRING functions. 42Other string types call the ASN1_STRING functions.
43For example 43For example
44.Fn ASN1_OCTET_STRING_new 44.Fn ASN1_OCTET_STRING_new
diff --git a/src/lib/libcrypto/man/ASN1_STRING_print_ex.3 b/src/lib/libcrypto/man/ASN1_STRING_print_ex.3
index 75a07a0b6e..19ff081f79 100644
--- a/src/lib/libcrypto/man/ASN1_STRING_print_ex.3
+++ b/src/lib/libcrypto/man/ASN1_STRING_print_ex.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ASN1_STRING_print_ex.3,v 1.3 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: ASN1_STRING_print_ex.3,v 1.4 2016/11/06 16:56:46 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 6 2016 $
4.Dt ASN1_STRING_PRINT_EX 3 4.Dt ASN1_STRING_PRINT_EX 3
@@ -33,14 +33,14 @@ These functions output an
33structure. 33structure.
34.Vt ASN1_STRING 34.Vt ASN1_STRING
35is used to 35is used to
36represent all the ASN1 string types. 36represent all the ASN.1 string types.
37.Pp 37.Pp
38.Fn ASN1_STRING_print_ex 38.Fn ASN1_STRING_print_ex
39outputs 39outputs
40.Fa str 40.Fa str
41to 41to
42.Fa out , 42.Fa out ,
43the format is determined by the options 43the format being determined by the options
44.Fa flags . 44.Fa flags .
45.Fn ASN1_STRING_print_ex_fp 45.Fn ASN1_STRING_print_ex_fp
46is identical except it outputs to 46is identical except it outputs to
@@ -56,15 +56,16 @@ but using a different format to
56.Fn ASN1_STRING_print_ex . 56.Fn ASN1_STRING_print_ex .
57It replaces unprintable characters (other than CR, LF) with 57It replaces unprintable characters (other than CR, LF) with
58.Sq \&. . 58.Sq \&. .
59.Sh NOTES 59.Pp
60.Fn ASN1_STRING_print 60.Fn ASN1_STRING_print
61is a legacy function which should be avoided in new 61is a legacy function which should be avoided in new
62applications. 62applications.
63.Pp 63.Pp
64Although there are a large number of options frequently 64Although there are a large number of options,
65.Dv ASN1_STRFLGS_RFC2253
66is often suitable, or on UTF-8 terminals
65.Dv ASN1_STRFLGS_RFC2253 67.Dv ASN1_STRFLGS_RFC2253
66is suitable, or on UTF8 terminals 68and
67.Dv ASN1_STRFLGS_RFC2253 No &
68.Pf ~ Dv ASN1_STRFLGS_ESC_MSB . 69.Pf ~ Dv ASN1_STRFLGS_ESC_MSB .
69.Pp 70.Pp
70The complete set of supported options for 71The complete set of supported options for
@@ -74,7 +75,7 @@ is listed below.
74Various characters can be escaped. 75Various characters can be escaped.
75If 76If
76.Dv ASN1_STRFLGS_ESC_2253 77.Dv ASN1_STRFLGS_ESC_2253
77is set, the characters determined by RFC2253 are escaped. 78is set, the characters determined by RFC 2253 are escaped.
78If 79If
79.Dv ASN1_STRFLGS_ESC_CTRL 80.Dv ASN1_STRFLGS_ESC_CTRL
80is set, control characters are escaped. 81is set, control characters are escaped.
@@ -82,15 +83,14 @@ If
82.Dv ASN1_STRFLGS_ESC_MSB 83.Dv ASN1_STRFLGS_ESC_MSB
83is set, characters with the MSB set are escaped: this option should 84is set, characters with the MSB set are escaped: this option should
84.Em not 85.Em not
85be used if the terminal correctly interprets UTF8 sequences. 86be used if the terminal correctly interprets UTF-8 sequences.
86.Pp 87.Pp
87Escaping takes several forms. 88Escaping takes several forms.
88.Pp 89If the character being escaped is a 16-bit character then the form "\eUXXXX"
89If the character being escaped is a 16 bit character then the form "\eUXXXX"
90is used using exactly four characters for the hex representation. 90is used using exactly four characters for the hex representation.
91If it is 32 bits then "\eWXXXXXXXX" is used using eight characters 91If it is 32 bits then "\eWXXXXXXXX" is used using eight characters
92of its hex representation. 92of its hex representation.
93These forms will only be used if UTF8 conversion is not set (see below). 93These forms will only be used if UTF-8 conversion is not set (see below).
94.Pp 94.Pp
95Printable characters are normally escaped using the backslash 95Printable characters are normally escaped using the backslash
96.Pq Sq \e 96.Pq Sq \e
@@ -104,24 +104,24 @@ representation.
104.Pp 104.Pp
105If 105If
106.Dv ASN1_STRFLGS_UTF8_CONVERT 106.Dv ASN1_STRFLGS_UTF8_CONVERT
107is set, then characters are converted to UTF8 format first. 107is set, then characters are converted to UTF-8 format first.
108If the terminal supports the display of UTF8 sequences then this 108If the terminal supports the display of UTF-8 sequences then this
109option will correctly display multi byte characters. 109option will correctly display multi-byte characters.
110.Pp 110.Pp
111If 111If
112.Dv ASN1_STRFLGS_IGNORE_TYPE 112.Dv ASN1_STRFLGS_IGNORE_TYPE
113is set, then the string type is not interpreted at all: 113is set, then the string type is not interpreted at all:
114everything is assumed to be one byte per character. 114everything is assumed to be one byte per character.
115This is primarily for debugging purposes and can result 115This is primarily for debugging purposes and can result
116in confusing output in multi character strings. 116in confusing output in multi-character strings.
117.Pp 117.Pp
118If 118If
119.Dv ASN1_STRFLGS_SHOW_TYPE 119.Dv ASN1_STRFLGS_SHOW_TYPE
120is set, then the string type itself is printed out before its value 120is set, then the string type itself is printed before its value
121(for example "BMPSTRING"), this actually uses 121(for example "BMPSTRING"), using
122.Fn ASN1_tag2str . 122.Fn ASN1_tag2str .
123.Pp 123.Pp
124The content of a string instead of being interpreted can be "dumped": 124Instead of being interpreted the contents of a string can be "dumped":
125this just outputs the value of the string using the form #XXXX 125this just outputs the value of the string using the form #XXXX
126using hex format for each octet. 126using hex format for each octet.
127.Pp 127.Pp
@@ -129,7 +129,7 @@ If
129.Dv ASN1_STRFLGS_DUMP_ALL 129.Dv ASN1_STRFLGS_DUMP_ALL
130is set, then any type is dumped. 130is set, then any type is dumped.
131.Pp 131.Pp
132Normally non character string types (such as OCTET STRING) 132Normally non-character string types (such as OCTET STRING)
133are assumed to be one byte per character; if 133are assumed to be one byte per character; if
134.Dv ASN1_STRFLGS_DUMP_UNKNOWN 134.Dv ASN1_STRFLGS_DUMP_UNKNOWN
135is set, then they will be dumped instead. 135is set, then they will be dumped instead.
@@ -149,5 +149,4 @@ It is equivalent to
149.Dv ASN1_STRFLGS_DUMP_UNKNOWN | 149.Dv ASN1_STRFLGS_DUMP_UNKNOWN |
150.Dv ASN1_STRFLGS_DUMP_DER . 150.Dv ASN1_STRFLGS_DUMP_DER .
151.Sh SEE ALSO 151.Sh SEE ALSO
152.Xr ASN1_tag2str 3 ,
153.Xr X509_NAME_print_ex 3 152.Xr X509_NAME_print_ex 3
diff --git a/src/lib/libcrypto/man/ASN1_generate_nconf.3 b/src/lib/libcrypto/man/ASN1_generate_nconf.3
index 1fd7f38d26..39929782ee 100644
--- a/src/lib/libcrypto/man/ASN1_generate_nconf.3
+++ b/src/lib/libcrypto/man/ASN1_generate_nconf.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ASN1_generate_nconf.3,v 1.5 2016/11/06 15:52:50 jmc Exp $ 1.\" $OpenBSD: ASN1_generate_nconf.3,v 1.6 2016/11/06 16:56:46 jmc Exp $
2.\" 2.\"
3.Dd $Mdocdate: November 6 2016 $ 3.Dd $Mdocdate: November 6 2016 $
4.Dt ASN1_GENERATE_NCONF 3 4.Dt ASN1_GENERATE_NCONF 3
@@ -6,7 +6,7 @@
6.Sh NAME 6.Sh NAME
7.Nm ASN1_generate_nconf , 7.Nm ASN1_generate_nconf ,
8.Nm ASN1_generate_v3 8.Nm ASN1_generate_v3
9.Nd ASN1 generation functions 9.Nd ASN.1 generation functions
10.Sh SYNOPSIS 10.Sh SYNOPSIS
11.In openssl/asn1.h 11.In openssl/asn1.h
12.Ft ASN1_TYPE * 12.Ft ASN1_TYPE *
@@ -20,7 +20,7 @@
20.Fa "X509V3_CTX *cnf" 20.Fa "X509V3_CTX *cnf"
21.Fc 21.Fc
22.Sh DESCRIPTION 22.Sh DESCRIPTION
23These functions generate the ASN1 encoding of a string in an 23These functions generate the ASN.1 encoding of a string in an
24.Vt ASN1_TYPE 24.Vt ASN1_TYPE
25structure. 25structure.
26.Pp 26.Pp
@@ -93,7 +93,7 @@ The
93.Ar value 93.Ar value
94string must not be present. 94string must not be present.
95.It Cm INTEGER , INT 95.It Cm INTEGER , INT
96Encodes an ASN1 INTEGER type. 96Encodes an ASN.1 INTEGER type.
97The 97The
98.Ar value 98.Ar value
99string represents the value of the integer. 99string represents the value of the integer.
@@ -102,24 +102,24 @@ and is normally interpreted as a decimal value unless the prefix
102.Cm 0x 102.Cm 0x
103is included. 103is included.
104.It Cm ENUMERATED , ENUM 104.It Cm ENUMERATED , ENUM
105Encodes the ASN1 ENUMERATED type. 105Encodes the ASN.1 ENUMERATED type.
106It is otherwise identical to 106It is otherwise identical to
107.Cm INTEGER . 107.Cm INTEGER .
108.It Cm OBJECT , OID 108.It Cm OBJECT , OID
109Encodes an ASN1 OBJECT IDENTIFIER. 109Encodes an ASN.1 OBJECT IDENTIFIER.
110The 110The
111.Ar value 111.Ar value
112string can be a short name, a long name, or numerical format. 112string can be a short name, a long name, or numerical format.
113.It Cm UTCTIME , UTC 113.It Cm UTCTIME , UTC
114Encodes an ASN1 UTCTime structure. 114Encodes an ASN.1 UTCTime structure.
115The value should be in the format 115The value should be in the format
116.Ar YYMMDDHHMMSSZ . 116.Ar YYMMDDHHMMSSZ .
117.It Cm GENERALIZEDTIME , GENTIME 117.It Cm GENERALIZEDTIME , GENTIME
118Encodes an ASN1 GeneralizedTime structure. 118Encodes an ASN.1 GeneralizedTime structure.
119The value should be in the format 119The value should be in the format
120.Ar YYYYMMDDHHMMSSZ . 120.Ar YYYYMMDDHHMMSSZ .
121.It Cm OCTETSTRING , OCT 121.It Cm OCTETSTRING , OCT
122Encodes an ASN1 OCTET STRING. 122Encodes an ASN.1 OCTET STRING.
123.Ar value 123.Ar value
124represents the contents of this structure. 124represents the contents of this structure.
125The format strings 125The format strings
@@ -129,7 +129,7 @@ and
129can be used to specify the format of 129can be used to specify the format of
130.Ar value . 130.Ar value .
131.It Cm BITSTRING , BITSTR 131.It Cm BITSTRING , BITSTR
132Encodes an ASN1 BIT STRING. 132Encodes an ASN.1 BIT STRING.
133.Ar value 133.Ar value
134represents the contents of this structure. 134represents the contents of this structure.
135The format strings 135The format strings
@@ -163,7 +163,7 @@ The format can be
163or 163or
164.Cm UTF8 . 164.Cm UTF8 .
165.It Cm SEQUENCE , SEQ , SET 165.It Cm SEQUENCE , SEQ , SET
166Formats the result as an ASN1 SEQUENCE or SET type. 166Formats the result as an ASN.1 SEQUENCE or SET type.
167.Ar value 167.Ar value
168should be a section name which will contain the contents. 168should be a section name which will contain the contents.
169The field names in the section are ignored 169The field names in the section are ignored
@@ -215,7 +215,7 @@ If
215.Cm UTF8 215.Cm UTF8
216is specified, then the 216is specified, then the
217.Ar value 217.Ar value
218string must be a valid UTF8 string. 218string must be a valid UTF-8 string.
219For 219For
220.Cm HEX , 220.Cm HEX ,
221the output must be a set of hex digits. 221the output must be a set of hex digits.