Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
35c20561
Commit
35c20561
authored
Sep 12, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gcc 4.0 warnings.
parent
ca2c8c86
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
encode.c
dlls/crypt32/tests/encode.c
+25
-17
No files found.
dlls/crypt32/tests/encode.c
View file @
35c20561
...
@@ -613,19 +613,29 @@ static const char surName[] = "Lang";
...
@@ -613,19 +613,29 @@ static const char surName[] = "Lang";
static
const
char
bogusIA5
[]
=
"
\x80
"
;
static
const
char
bogusIA5
[]
=
"
\x80
"
;
static
const
char
bogusPrintable
[]
=
"~"
;
static
const
char
bogusPrintable
[]
=
"~"
;
static
const
char
bogusNumeric
[]
=
"A"
;
static
const
char
bogusNumeric
[]
=
"A"
;
static
const
unsigned
char
bin39
[]
=
{
0x30
,
0x15
,
0x31
,
0x13
,
0x30
,
0x11
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x13
,
0x0a
,
'J'
,
'u'
,
'a'
,
'n'
,
' '
,
'L'
,
'a'
,
'n'
,
'g'
,
0
};
static
const
unsigned
char
bin40
[]
=
{
0x30
,
0x15
,
0x31
,
0x13
,
0x30
,
0x11
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x16
,
0x0a
,
'J'
,
'u'
,
'a'
,
'n'
,
' '
,
'L'
,
'a'
,
'n'
,
'g'
,
0
};
static
const
unsigned
char
bin41
[]
=
{
0x30
,
0x10
,
0x31
,
0x0e
,
0x30
,
0x0c
,
0x06
,
0x03
,
0x55
,
0x04
,
0x04
,
0x16
,
0x05
,
'L'
,
'a'
,
'n'
,
'g'
,
0
};
static
const
unsigned
char
bin42
[]
=
{
0x30
,
0x12
,
0x31
,
0x10
,
0x30
,
0x0e
,
0x06
,
0x00
,
0x13
,
0x0a
,
'J'
,
'u'
,
'a'
,
'n'
,
' '
,
'L'
,
'a'
,
'n'
,
'g'
,
0
};
static
const
unsigned
char
bin43
[]
=
{
0x30
,
0x0d
,
0x31
,
0x0b
,
0x30
,
0x09
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x16
,
0x02
,
0x80
,
0
};
static
const
unsigned
char
bin44
[]
=
{
0x30
,
0x0d
,
0x31
,
0x0b
,
0x30
,
0x09
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x13
,
0x02
,
0x7e
,
0
};
static
const
unsigned
char
bin45
[]
=
{
0x30
,
0x0d
,
0x31
,
0x0b
,
0x30
,
0x09
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x12
,
0x02
,
0x41
,
0
};
static
const
struct
EncodedName
names
[]
=
{
static
const
struct
EncodedName
names
[]
=
{
{
{
szOID_COMMON_NAME
,
CERT_RDN_PRINTABLE_STRING
,
{
{
szOID_COMMON_NAME
,
CERT_RDN_PRINTABLE_STRING
,
{
sizeof
(
commonName
),
(
BYTE
*
)
commonName
}
},
{
sizeof
(
commonName
),
(
BYTE
*
)
commonName
}
},
bin39
},
"
\x30\x15\x31\x13\x30\x11\x06\x03\x55\x04\x03\x13\x0a
Juan Lang"
},
{
{
szOID_COMMON_NAME
,
CERT_RDN_IA5_STRING
,
{
{
szOID_COMMON_NAME
,
CERT_RDN_IA5_STRING
,
{
sizeof
(
commonName
),
(
BYTE
*
)
commonName
}
},
{
sizeof
(
commonName
),
(
BYTE
*
)
commonName
}
},
bin40
},
"
\x30\x15\x31\x13\x30\x11\x06\x03\x55\x04\x03\x16\x0a
Juan Lang"
},
{
{
szOID_SUR_NAME
,
CERT_RDN_IA5_STRING
,
{
{
szOID_SUR_NAME
,
CERT_RDN_IA5_STRING
,
{
sizeof
(
surName
),
(
BYTE
*
)
surName
}
},
{
sizeof
(
surName
),
(
BYTE
*
)
surName
}
},
bin41
},
"
\x30\x10\x31\x0e\x30\x0c\x06\x03\x55\x04\x04\x16\x05
Lang"
},
{
{
NULL
,
CERT_RDN_PRINTABLE_STRING
,
{
{
NULL
,
CERT_RDN_PRINTABLE_STRING
,
{
sizeof
(
commonName
),
(
BYTE
*
)
commonName
}
},
{
sizeof
(
commonName
),
(
BYTE
*
)
commonName
}
},
bin42
},
"
\x30\x12\x31\x10\x30\x0e\x06\x00\x13\x0a
Juan Lang"
},
/* The following test isn't a very good one, because it doesn't encode any
/* The following test isn't a very good one, because it doesn't encode any
* Japanese characters. I'm leaving it out for now.
* Japanese characters. I'm leaving it out for now.
{ { szOID_COMMON_NAME, CERT_RDN_T61_STRING,
{ { szOID_COMMON_NAME, CERT_RDN_T61_STRING,
...
@@ -637,21 +647,19 @@ static const struct EncodedName names[] = {
...
@@ -637,21 +647,19 @@ static const struct EncodedName names[] = {
* including them to justify my lazy encoding.
* including them to justify my lazy encoding.
*/
*/
{
{
szOID_COMMON_NAME
,
CERT_RDN_IA5_STRING
,
{
{
szOID_COMMON_NAME
,
CERT_RDN_IA5_STRING
,
{
sizeof
(
bogusIA5
),
(
BYTE
*
)
bogusIA5
}
},
{
sizeof
(
bogusIA5
),
(
BYTE
*
)
bogusIA5
}
},
bin43
},
"
\x30\x0d\x31\x0b\x30\x09\x06\x03\x55\x04\x03\x16\x02\x80
"
},
{
{
szOID_COMMON_NAME
,
CERT_RDN_PRINTABLE_STRING
,
{
{
szOID_COMMON_NAME
,
CERT_RDN_PRINTABLE_STRING
,
{
sizeof
(
bogusPrintable
),
(
BYTE
*
)
bogusPrintable
}
},
{
sizeof
(
bogusPrintable
),
(
BYTE
*
)
bogusPrintable
}
},
bin44
},
"
\x30\x0d\x31\x0b\x30\x09\x06\x03\x55\x04\x03\x13\x02\x7e
"
},
{
{
szOID_COMMON_NAME
,
CERT_RDN_NUMERIC_STRING
,
{
{
szOID_COMMON_NAME
,
CERT_RDN_NUMERIC_STRING
,
{
sizeof
(
bogusNumeric
),
(
BYTE
*
)
bogusNumeric
}
},
{
sizeof
(
bogusNumeric
),
(
BYTE
*
)
bogusNumeric
}
},
bin45
},
"
\x30\x0d\x31\x0b\x30\x09\x06\x03\x55\x04\x03\x12\x02\x41
"
},
};
};
static
const
BYTE
emptyName
[]
=
{
0x30
,
0
};
static
const
BYTE
emptyName
[]
=
{
0x30
,
0
};
static
const
BYTE
emptyRDNs
[]
=
{
0x30
,
0x02
,
0x31
,
0
};
static
const
BYTE
emptyRDNs
[]
=
{
0x30
,
0x02
,
0x31
,
0
};
static
const
BYTE
twoRDNs
[]
=
"
\x30\x23\x31\x21\x30\x0c\x06\x03\x55\x04\x04
"
static
const
BYTE
twoRDNs
[]
=
{
"
\x13\x05\x4c\x61\x6e\x67\x00\x30\x11\x06\x03\x55\x04\x03
"
0x30
,
0x23
,
0x31
,
0x21
,
0x30
,
0x0c
,
0x06
,
0x03
,
0x55
,
0x04
,
0x04
,
"
\x13\x0a\x4a\x75\x61\x6e\x20\x4c\x61\x6e\x67
"
;
0x13
,
0x05
,
0x4c
,
0x61
,
0x6e
,
0x67
,
0x00
,
0x30
,
0x11
,
0x06
,
0x03
,
0x55
,
0x04
,
0x03
,
0x13
,
0x0a
,
0x4a
,
0x75
,
0x61
,
0x6e
,
0x20
,
0x4c
,
0x61
,
0x6e
,
0x67
,
0
};
static
void
test_encodeName
(
DWORD
dwEncoding
)
static
void
test_encodeName
(
DWORD
dwEncoding
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment