Compare commits
173 Commits
OpenSSL_0_
...
OpenSSL_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22e5a7935f | ||
|
|
01671ab2df | ||
|
|
93aeac64ce | ||
|
|
9addd9b6fb | ||
|
|
0231911dec | ||
|
|
4bb61becbb | ||
|
|
b392e52050 | ||
|
|
0858b71b41 | ||
|
|
657129f748 | ||
|
|
c710c7b3a3 | ||
|
|
ff731ae3db | ||
|
|
d9bfe4f97c | ||
|
|
dc0ed30cfe | ||
|
|
e248596bac | ||
|
|
6049399baf | ||
|
|
f763e0b5ae | ||
|
|
eb3eab20a8 | ||
|
|
6d69d74bb8 | ||
|
|
4848cbf1cf | ||
|
|
9f2027e56d | ||
|
|
4d2b407ba2 | ||
|
|
e1d51de41f | ||
|
|
81ee80ab88 | ||
|
|
7d727231b7 | ||
|
|
69740c2b3f | ||
|
|
119d1a1dd4 | ||
|
|
afe01cd3f6 | ||
|
|
70f34a5841 | ||
|
|
c2e40d0f9a | ||
|
|
0abfd60604 | ||
|
|
e5dbccc182 | ||
|
|
f8fa22d826 | ||
|
|
c393222280 | ||
|
|
631bae4723 | ||
|
|
f6bfb559f7 | ||
|
|
60fd574cdf | ||
|
|
73705abc34 | ||
|
|
12bdb64375 | ||
|
|
7bdf8eed69 | ||
|
|
bbc0ac37b0 | ||
|
|
48c832b6b7 | ||
|
|
8298632d14 | ||
|
|
f3e427f6f9 | ||
|
|
62a25c6129 | ||
|
|
8bb826ee53 | ||
|
|
ce53d920fb | ||
|
|
884b3fc23c | ||
|
|
5d1430f390 | ||
|
|
45d10efc35 | ||
|
|
db3cb0e97a | ||
|
|
41a15c4f0f | ||
|
|
fea4280a8b | ||
|
|
e852b8533f | ||
|
|
20a3439ea9 | ||
|
|
a273a2824c | ||
|
|
24c97c819d | ||
|
|
42ba5d2329 | ||
|
|
c3e6402857 | ||
|
|
0821bcd4de | ||
|
|
c3e28480d7 | ||
|
|
4a6a2032ed | ||
|
|
e72b9658f8 | ||
|
|
c01d2b974e | ||
|
|
8c04994bfe | ||
|
|
989c0f8215 | ||
|
|
b0ef321cc8 | ||
|
|
7a8c728860 | ||
|
|
4cf8f9369c | ||
|
|
6141b86a49 | ||
|
|
2950db5995 | ||
|
|
801fea5f11 | ||
|
|
da26bcb5de | ||
|
|
23fadaa084 | ||
|
|
e27a259696 | ||
|
|
41e455bfc4 | ||
|
|
59b6836ab2 | ||
|
|
9fc9b55237 | ||
|
|
689c6f2542 | ||
|
|
f4bfd357e5 | ||
|
|
130db968b8 | ||
|
|
8d274837e5 | ||
|
|
5855038049 | ||
|
|
d18685d959 | ||
|
|
9f6715d4bb | ||
|
|
ab185b6038 | ||
|
|
1642000707 | ||
|
|
f7f2125522 | ||
|
|
2b61034b0b | ||
|
|
80c808b90b | ||
|
|
af1048c25c | ||
|
|
ecc5ef8793 | ||
|
|
c9a112f540 | ||
|
|
5286db697f | ||
|
|
f69a8aebab | ||
|
|
9d10b15ef9 | ||
|
|
da30c74a27 | ||
|
|
67ea999d4a | ||
|
|
e1892f2370 | ||
|
|
fe28866d71 | ||
|
|
de4ab1e629 | ||
|
|
216ddfaf6b | ||
|
|
8aa36bcac9 | ||
|
|
485e30dbe1 | ||
|
|
877dbcb8a0 | ||
|
|
62d27939c2 | ||
|
|
8c3c570134 | ||
|
|
97a1630e81 | ||
|
|
bf746f0f46 | ||
|
|
a229e3038e | ||
|
|
4aca9297dc | ||
|
|
b2c5960935 | ||
|
|
fbdce13e5a | ||
|
|
e532a6c449 | ||
|
|
14bcdb087f | ||
|
|
b7efa56a4a | ||
|
|
8359421d90 | ||
|
|
efde5230f1 | ||
|
|
f5ffad9d1d | ||
|
|
57a68b2129 | ||
|
|
bac252a5e3 | ||
|
|
a963395a7b | ||
|
|
d8863f0bdb | ||
|
|
addb6e16a8 | ||
|
|
4d27c4c960 | ||
|
|
ed65fab910 | ||
|
|
90cc40911b | ||
|
|
a7201e9a1b | ||
|
|
fcd5cca418 | ||
|
|
9222bc6b4e | ||
|
|
e6d27baf52 | ||
|
|
e7e1150706 | ||
|
|
5d727078ac | ||
|
|
108159ffcc | ||
|
|
c4d423511a | ||
|
|
b15a93a9c5 | ||
|
|
d9248e5780 | ||
|
|
0b52f89b81 | ||
|
|
7de4b5b060 | ||
|
|
02a00bb054 | ||
|
|
3b4de6e4cc | ||
|
|
bdbc9b4d1a | ||
|
|
09ef94d2c9 | ||
|
|
3ffb8d42bc | ||
|
|
25866e3982 | ||
|
|
3b3df98ca6 | ||
|
|
2e4a99f38b | ||
|
|
e90faddaf8 | ||
|
|
f1ce306f30 | ||
|
|
37b11ca78e | ||
|
|
a17af9e277 | ||
|
|
6951c23afd | ||
|
|
de421076a5 | ||
|
|
bd16cd6bcc | ||
|
|
0c51600203 | ||
|
|
9850f7f6b2 | ||
|
|
131e064e4a | ||
|
|
556b8f3f77 | ||
|
|
045d3285e2 | ||
|
|
d1df5b4339 | ||
|
|
25558bf743 | ||
|
|
713147109c | ||
|
|
76ef6ac956 | ||
|
|
a842df6659 | ||
|
|
c05a7f5dfd | ||
|
|
627bd6709c | ||
|
|
fbf218b8c3 | ||
|
|
3c97bd833b | ||
|
|
abbc186bd2 | ||
|
|
de6859e442 | ||
|
|
5e8904f289 | ||
|
|
0c0788ba0a | ||
|
|
905fd45b36 | ||
|
|
c162b132eb |
@@ -15,3 +15,6 @@ cctest.a
|
||||
libcrypto.so.*
|
||||
libssl.so.*
|
||||
libcrypto.sha1
|
||||
libcrypto.a.sha1
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
19
CHANGES
19
CHANGES
@@ -2,6 +2,25 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 0.9.7f and 0.9.7g [11 Apr 2005]
|
||||
|
||||
*) Fixes for newer kerberos headers. NB: the casts are needed because
|
||||
the 'length' field is signed on one version and unsigned on another
|
||||
with no (?) obvious way to tell the difference, without these VC++
|
||||
complains. Also the "definition" of FAR (blank) is no longer included
|
||||
nor is the error ENOMEM. KRB5_PRIVATE has to be set to 1 to pick up
|
||||
some needed definitions.
|
||||
[Steve Henson]
|
||||
|
||||
*) Undo Cygwin change.
|
||||
[Ulf M<>ller]
|
||||
|
||||
*) Added support for proxy certificates according to RFC 3820.
|
||||
Because they may be a security thread to unaware applications,
|
||||
they must be explicitely allowed in run-time. See
|
||||
docs/HOWTO/proxy_certificates.txt for further information.
|
||||
[Richard Levitte]
|
||||
|
||||
Changes between 0.9.7e and 0.9.7f [22 Mar 2005]
|
||||
|
||||
*) Use (SSL_RANDOM_VALUE - 4) bytes of pseudo random data when generating
|
||||
|
||||
14
Configure
14
Configure
@@ -169,9 +169,19 @@ my %table=(
|
||||
# 7_x86) /usr/ccs/bin/as fails to assemble with "Illegal mnemonic"
|
||||
# error message.
|
||||
"solaris-x86-gcc","gcc:-O3 -fomit-frame-pointer -m486 -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
# -shared -static-libgcc might appear controversial, but modules taken
|
||||
# from static libgcc do not have relocations and linking them into our
|
||||
# shared objects doesn't have any negative side-effects. On the contrary,
|
||||
# doing so makes it possible to use gcc shared build with Sun C. Given
|
||||
# that gcc generates faster code [thanks to inline assembler], I would
|
||||
# actually recommend to consider using gcc shared build even with vendor
|
||||
# compiler:-)
|
||||
# <appro@fy.chalmers.se>
|
||||
"solaris64-x86_64-gcc","gcc:-m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:asm/x86_64-gcc.o::::::asm/rc4-amd64.o:::dlfcn:solaris-shared:-fPIC:-m64 -shared -static-libgcc:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### Solaris x86 with Sun C setups
|
||||
"solaris-x86-cc","cc:-fast -O -Xa::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
"solaris64-x86_64-cc","cc:-fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN::-D_REENTRANT::-lsocket -lnsl -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL::::::::::dlfcn:solaris-shared:-KPIC:-xarch=amd64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
#### SPARC Solaris with GNU C setups
|
||||
"solaris-sparcv7-gcc","gcc:-O3 -fomit-frame-pointer -Wall -DB_ENDIAN -DBN_DIV2W::-D_REENTRANT::-lsocket -lnsl -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::dlfcn:solaris-shared:-fPIC:-shared:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
@@ -520,14 +530,14 @@ my %table=(
|
||||
"BC-16","bcc:::(unknown):WIN16::BN_LLONG DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||
|
||||
# MinGW
|
||||
"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:-D_DLL:-mno-cygwin:.dll",
|
||||
"mingw", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -mno-cygwin -Wall:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll",
|
||||
|
||||
# UWIN
|
||||
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
|
||||
# Cygwin
|
||||
"Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:cygwin-shared:::.dll",
|
||||
"Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:cygwin-shared:-D_WINDLL::.dll",
|
||||
|
||||
# DJGPP
|
||||
"DJGPP", "gcc:-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O2 -Wall -DDEVRANDOM=\"/dev/urandom\\x24\":::MSDOS:-L/dev/env/WATT_ROOT/lib -lwatt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::",
|
||||
|
||||
19
FAQ
19
FAQ
@@ -70,7 +70,7 @@ OpenSSL - Frequently Asked Questions
|
||||
* Which is the current version of OpenSSL?
|
||||
|
||||
The current version is available from <URL: http://www.openssl.org>.
|
||||
OpenSSL 0.9.7f was released on March 22, 2005.
|
||||
OpenSSL 0.9.7g was released on April 11, 2005.
|
||||
|
||||
In addition to the current stable release, you can also access daily
|
||||
snapshots of the OpenSSL development version at <URL:
|
||||
@@ -792,9 +792,20 @@ that is allocated when an application starts up. Since such tables do not grow
|
||||
in size over time they are harmless.
|
||||
|
||||
These internal tables can be freed up when an application closes using various
|
||||
functions. Currently these include: EVP_cleanup(), ERR_remove_state(),
|
||||
ERR_free_strings(), ENGINE_cleanup(), CONF_modules_unload() and
|
||||
CRYPTO_cleanup_all_ex_data().
|
||||
functions. Currently these include following:
|
||||
|
||||
Thread-local cleanup functions:
|
||||
|
||||
ERR_remove_state()
|
||||
|
||||
Application-global cleanup functions that are aware of usage (and therefore
|
||||
thread-safe):
|
||||
|
||||
ENGINE_cleanup() and CONF_modules_unload()
|
||||
|
||||
"Brutal" (thread-unsafe) Application-global cleanup functions:
|
||||
|
||||
ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
9
NEWS
9
NEWS
@@ -5,6 +5,15 @@
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g:
|
||||
|
||||
o More compilation issues fixed.
|
||||
o Adaptation to more modern Kerberos API.
|
||||
o Enhanced or corrected configuration for Solaris64, Mingw and Cygwin.
|
||||
o Enhanced x86_64 assembler BIGNUM module.
|
||||
o More constification.
|
||||
o Added processing of proxy certificates (RFC 3820).
|
||||
|
||||
Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f:
|
||||
|
||||
o Several compilation issues fixed.
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 0.9.7f 22 March 2005
|
||||
OpenSSL 0.9.7g 11 April 2005
|
||||
|
||||
Copyright (c) 1998-2005 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
||||
3
STATUS
3
STATUS
@@ -1,10 +1,11 @@
|
||||
|
||||
OpenSSL STATUS Last modified at
|
||||
______________ $Date: 2005/03/22 18:17:22 $
|
||||
______________ $Date: 2005/04/11 15:10:06 $
|
||||
|
||||
DEVELOPMENT STATE
|
||||
|
||||
o OpenSSL 0.9.8: Under development...
|
||||
o OpenSSL 0.9.7g: Released on April 11th, 2005
|
||||
o OpenSSL 0.9.7f: Released on March 22nd, 2005
|
||||
o OpenSSL 0.9.7e: Released on October 25th, 2004
|
||||
o OpenSSL 0.9.7d: Released on March 17th, 2004
|
||||
|
||||
54
TABLE
54
TABLE
@@ -94,7 +94,7 @@ $rmd160_obj = asm/rm86-out.o
|
||||
$rc5_obj = asm/r586-out.o
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= cygwin-shared
|
||||
$shared_cflag =
|
||||
$shared_cflag = -D_WINDLL
|
||||
$shared_ldflag =
|
||||
$shared_extension = .dll
|
||||
$ranlib =
|
||||
@@ -3569,7 +3569,7 @@ $rmd160_obj = asm/rm86-out.o
|
||||
$rc5_obj = asm/r586-out.o
|
||||
$dso_scheme = win32
|
||||
$shared_target= cygwin-shared
|
||||
$shared_cflag = -D_DLL
|
||||
$shared_cflag = -D_WINDLL
|
||||
$shared_ldflag = -mno-cygwin
|
||||
$shared_extension = .dll
|
||||
$ranlib =
|
||||
@@ -4175,6 +4175,56 @@ $shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** solaris64-x86_64-cc
|
||||
$cc = cc
|
||||
$cflags = -fast -xarch=amd64 -xstrconst -Xa -DL_ENDIAN
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj =
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -KPIC
|
||||
$shared_ldflag = -xarch=amd64
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** solaris64-x86_64-gcc
|
||||
$cc = gcc
|
||||
$cflags = -m64 -O3 -Wall -DL_ENDIAN -DMD32_REG_T=int
|
||||
$unistd =
|
||||
$thread_cflag = -D_REENTRANT
|
||||
$sys_id =
|
||||
$lflags = -lsocket -lnsl -ldl
|
||||
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL
|
||||
$bn_obj = asm/x86_64-gcc.o
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
$md5_obj =
|
||||
$sha1_obj =
|
||||
$cast_obj =
|
||||
$rc4_obj = asm/rc4-amd64.o
|
||||
$rmd160_obj =
|
||||
$rc5_obj =
|
||||
$dso_scheme = dlfcn
|
||||
$shared_target= solaris-shared
|
||||
$shared_cflag = -fPIC
|
||||
$shared_ldflag = -m64 -shared -static-libgcc
|
||||
$shared_extension = .so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
|
||||
$ranlib =
|
||||
$arflags =
|
||||
|
||||
*** sunos-gcc
|
||||
$cc = gcc
|
||||
$cflags = -O3 -mv8 -Dssize_t=int
|
||||
|
||||
@@ -4,3 +4,5 @@ der_chop
|
||||
der_chop.bak
|
||||
CA.pl
|
||||
openssl.sha1
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -258,3 +258,56 @@ basicConstraints = CA:true
|
||||
|
||||
# issuerAltName=issuer:copy
|
||||
authorityKeyIdentifier=keyid:always,issuer:always
|
||||
|
||||
[ proxy_cert_ext ]
|
||||
# These extensions should be added when creating a proxy certificate
|
||||
|
||||
# This goes against PKIX guidelines but some CAs do it and some software
|
||||
# requires this to avoid interpreting an end user certificate as a CA.
|
||||
|
||||
basicConstraints=CA:FALSE
|
||||
|
||||
# Here are some examples of the usage of nsCertType. If it is omitted
|
||||
# the certificate can be used for anything *except* object signing.
|
||||
|
||||
# This is OK for an SSL server.
|
||||
# nsCertType = server
|
||||
|
||||
# For an object signing certificate this would be used.
|
||||
# nsCertType = objsign
|
||||
|
||||
# For normal client use this is typical
|
||||
# nsCertType = client, email
|
||||
|
||||
# and for everything including object signing:
|
||||
# nsCertType = client, email, objsign
|
||||
|
||||
# This is typical in keyUsage for a client certificate.
|
||||
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
||||
|
||||
# This will be displayed in Netscape's comment listbox.
|
||||
nsComment = "OpenSSL Generated Certificate"
|
||||
|
||||
# PKIX recommendations harmless if included in all certificates.
|
||||
subjectKeyIdentifier=hash
|
||||
authorityKeyIdentifier=keyid,issuer:always
|
||||
|
||||
# This stuff is for subjectAltName and issuerAltname.
|
||||
# Import the email address.
|
||||
# subjectAltName=email:copy
|
||||
# An alternative to produce certificates that aren't
|
||||
# deprecated according to PKIX.
|
||||
# subjectAltName=email:move
|
||||
|
||||
# Copy subject details
|
||||
# issuerAltName=issuer:copy
|
||||
|
||||
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
|
||||
#nsBaseUrl
|
||||
#nsRevocationUrl
|
||||
#nsRenewalUrl
|
||||
#nsCaPolicyUrl
|
||||
#nsSslServerName
|
||||
|
||||
# This really needs to be in place for it to be a proxy certificate.
|
||||
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
|
||||
|
||||
@@ -258,3 +258,56 @@ basicConstraints = CA:true
|
||||
|
||||
# issuerAltName=issuer:copy
|
||||
authorityKeyIdentifier=keyid:always,issuer:always
|
||||
|
||||
[ proxy_cert_ext ]
|
||||
# These extensions should be added when creating a proxy certificate
|
||||
|
||||
# This goes against PKIX guidelines but some CAs do it and some software
|
||||
# requires this to avoid interpreting an end user certificate as a CA.
|
||||
|
||||
basicConstraints=CA:FALSE
|
||||
|
||||
# Here are some examples of the usage of nsCertType. If it is omitted
|
||||
# the certificate can be used for anything *except* object signing.
|
||||
|
||||
# This is OK for an SSL server.
|
||||
# nsCertType = server
|
||||
|
||||
# For an object signing certificate this would be used.
|
||||
# nsCertType = objsign
|
||||
|
||||
# For normal client use this is typical
|
||||
# nsCertType = client, email
|
||||
|
||||
# and for everything including object signing:
|
||||
# nsCertType = client, email, objsign
|
||||
|
||||
# This is typical in keyUsage for a client certificate.
|
||||
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
||||
|
||||
# This will be displayed in Netscape's comment listbox.
|
||||
nsComment = "OpenSSL Generated Certificate"
|
||||
|
||||
# PKIX recommendations harmless if included in all certificates.
|
||||
subjectKeyIdentifier=hash
|
||||
authorityKeyIdentifier=keyid,issuer:always
|
||||
|
||||
# This stuff is for subjectAltName and issuerAltname.
|
||||
# Import the email address.
|
||||
# subjectAltName=email:copy
|
||||
# An alternative to produce certificates that aren't
|
||||
# deprecated according to PKIX.
|
||||
# subjectAltName=email:move
|
||||
|
||||
# Copy subject details
|
||||
# issuerAltName=issuer:copy
|
||||
|
||||
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
|
||||
#nsBaseUrl
|
||||
#nsRevocationUrl
|
||||
#nsRenewalUrl
|
||||
#nsCaPolicyUrl
|
||||
#nsSslServerName
|
||||
|
||||
# This really needs to be in place for it to be a proxy certificate.
|
||||
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
|
||||
|
||||
14
config
14
config
@@ -337,6 +337,9 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
|
||||
echo "mips-sony-newsos4"; exit 0;
|
||||
;;
|
||||
|
||||
MINGW*)
|
||||
echo "${MACHINE}-whatever-mingw"; echo 0;
|
||||
;;
|
||||
CYGWIN*)
|
||||
case "$RELEASE" in
|
||||
[bB]*|1.0|1.[12].*)
|
||||
@@ -442,7 +445,7 @@ if [ "$SYSTEM" = "SunOS" ]; then
|
||||
egrep -e '^cc: .* C [0-9]\.[0-9]' | \
|
||||
sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
|
||||
CCVER=${CCVER:-0}
|
||||
if [ $CCVER -gt 40 ]; then
|
||||
if [ $MACHINE != i86pc -a $CCVER -gt 40 ]; then
|
||||
CC=cc # overrides gcc!!!
|
||||
if [ $CCVER -eq 50 ]; then
|
||||
echo "WARNING! Detected WorkShop C 5.0. Do make sure you have"
|
||||
@@ -654,7 +657,14 @@ EOF
|
||||
sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
|
||||
sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
|
||||
sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;;
|
||||
*86*-*-solaris2) OUT="solaris-x86-$CC" ;;
|
||||
*86*-*-solaris2)
|
||||
ISA64=`(isalist) 2>/dev/null | grep amd64`
|
||||
if [ "$ISA64" != "" ]; then
|
||||
OUT="solaris64-x86_64-$CC"
|
||||
else
|
||||
OUT="solaris-x86-$CC"
|
||||
fi
|
||||
;;
|
||||
*-*-sunos4) OUT="sunos-$CC" ;;
|
||||
alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
|
||||
sparc64-*-freebsd*) OUT="FreeBSD-sparc64" ;;
|
||||
|
||||
@@ -2,3 +2,5 @@ lib
|
||||
buildinf.h
|
||||
opensslconf.h
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
int ASN1_PRINTABLE_type(unsigned char *s, int len)
|
||||
int ASN1_PRINTABLE_type(const unsigned char *s, int len)
|
||||
{
|
||||
int c;
|
||||
int ia5=0;
|
||||
|
||||
@@ -829,7 +829,7 @@ BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai,BIGNUM *bn);
|
||||
|
||||
/* General */
|
||||
/* given a string, return the correct type, max is the maximum length */
|
||||
int ASN1_PRINTABLE_type(unsigned char *s, int max);
|
||||
int ASN1_PRINTABLE_type(const unsigned char *s, int max);
|
||||
|
||||
int i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);
|
||||
ASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, unsigned char **pp,
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
bx86unix.cpp
|
||||
bx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -118,6 +118,7 @@ asm/ia64-cpp.o: asm/ia64.S
|
||||
rm -f /tmp/ia64.$$$$.s
|
||||
|
||||
asm/x86_64-gcc.o: asm/x86_64-gcc.c
|
||||
$(CC) $(ASFLAGS) -c -o $@ $<
|
||||
|
||||
asm/pa-risc2W.o: asm/pa-risc2W.s
|
||||
/usr/ccs/bin/as -o asm/pa-risc2W.o asm/pa-risc2W.s
|
||||
|
||||
@@ -2,3 +2,5 @@ bn86unix.cpp
|
||||
co86unix.cpp
|
||||
bn86-elf.s
|
||||
co86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -13,20 +13,42 @@
|
||||
* A. Well, that's because this code is basically a quick-n-dirty
|
||||
* proof-of-concept hack. As you can see it's implemented with
|
||||
* inline assembler, which means that you're bound to GCC and that
|
||||
* there must be a room for fine-tuning.
|
||||
* there might be enough room for further improvement.
|
||||
*
|
||||
* Q. Why inline assembler?
|
||||
* A. x86_64 features own ABI I'm not familiar with. Which is why
|
||||
* I decided to let the compiler take care of subroutine
|
||||
* prologue/epilogue as well as register allocation.
|
||||
* A. x86_64 features own ABI which I'm not familiar with. This is
|
||||
* why I decided to let the compiler take care of subroutine
|
||||
* prologue/epilogue as well as register allocation. For reference.
|
||||
* Win64 implements different ABI for AMD64, different from Linux.
|
||||
*
|
||||
* Q. How much faster does it get?
|
||||
* A. Unfortunately people sitting on x86_64 hardware are prohibited
|
||||
* to disclose the performance numbers, so they (SuSE labs to be
|
||||
* specific) wouldn't tell me. However! Very similar coding technique
|
||||
* (reaching out for 128-bit result from 64x64-bit multiplication)
|
||||
* results in >3 times performance improvement on MIPS and I see no
|
||||
* reason why gain on x86_64 would be so much different:-)
|
||||
* A. 'apps/openssl speed rsa dsa' output with no-asm:
|
||||
*
|
||||
* sign verify sign/s verify/s
|
||||
* rsa 512 bits 0.0006s 0.0001s 1683.8 18456.2
|
||||
* rsa 1024 bits 0.0028s 0.0002s 356.0 6407.0
|
||||
* rsa 2048 bits 0.0172s 0.0005s 58.0 1957.8
|
||||
* rsa 4096 bits 0.1155s 0.0018s 8.7 555.6
|
||||
* sign verify sign/s verify/s
|
||||
* dsa 512 bits 0.0005s 0.0006s 2100.8 1768.3
|
||||
* dsa 1024 bits 0.0014s 0.0018s 692.3 559.2
|
||||
* dsa 2048 bits 0.0049s 0.0061s 204.7 165.0
|
||||
*
|
||||
* 'apps/openssl speed rsa dsa' output with this module:
|
||||
*
|
||||
* sign verify sign/s verify/s
|
||||
* rsa 512 bits 0.0004s 0.0000s 2767.1 33297.9
|
||||
* rsa 1024 bits 0.0012s 0.0001s 867.4 14674.7
|
||||
* rsa 2048 bits 0.0061s 0.0002s 164.0 5270.0
|
||||
* rsa 4096 bits 0.0384s 0.0006s 26.1 1650.8
|
||||
* sign verify sign/s verify/s
|
||||
* dsa 512 bits 0.0002s 0.0003s 4442.2 3786.3
|
||||
* dsa 1024 bits 0.0005s 0.0007s 1835.1 1497.4
|
||||
* dsa 2048 bits 0.0016s 0.0020s 620.4 504.6
|
||||
*
|
||||
* For the reference. IA-32 assembler implementation performs
|
||||
* very much like 64-bit code compiled with no-asm on the same
|
||||
* machine.
|
||||
*/
|
||||
|
||||
#define BN_ULONG unsigned long
|
||||
@@ -151,7 +173,7 @@ BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
|
||||
}
|
||||
|
||||
BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
{ BN_ULONG ret,i;
|
||||
{ BN_ULONG ret=0,i=0;
|
||||
|
||||
if (n <= 0) return 0;
|
||||
|
||||
@@ -164,7 +186,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n"
|
||||
: "+a"(ret),"+c"(n),"+r"(i)
|
||||
: "=&a"(ret),"+c"(n),"=&r"(i)
|
||||
: "r"(rp),"r"(ap),"r"(bp)
|
||||
: "cc"
|
||||
);
|
||||
@@ -174,7 +196,7 @@ BN_ULONG bn_add_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
|
||||
#ifndef SIMICS
|
||||
BN_ULONG bn_sub_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
{ BN_ULONG ret,i;
|
||||
{ BN_ULONG ret=0,i=0;
|
||||
|
||||
if (n <= 0) return 0;
|
||||
|
||||
@@ -187,7 +209,7 @@ BN_ULONG bn_sub_words (BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int n)
|
||||
" leaq 1(%2),%2 \n"
|
||||
" loop 1b \n"
|
||||
" sbbq %0,%0 \n"
|
||||
: "+a"(ret),"+c"(n),"+r"(i)
|
||||
: "=&a"(ret),"+c"(n),"=&r"(i)
|
||||
: "r"(rp),"r"(ap),"r"(bp)
|
||||
: "cc"
|
||||
);
|
||||
@@ -318,7 +340,6 @@ BN_ULONG bn_sub_words(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n)
|
||||
|
||||
void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
{
|
||||
BN_ULONG bl,bh;
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
@@ -423,7 +444,6 @@ void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
|
||||
void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
{
|
||||
BN_ULONG bl,bh;
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
@@ -464,7 +484,6 @@ void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
|
||||
|
||||
void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a)
|
||||
{
|
||||
BN_ULONG bl,bh;
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
@@ -541,7 +560,6 @@ void bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a)
|
||||
|
||||
void bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a)
|
||||
{
|
||||
BN_ULONG bl,bh;
|
||||
BN_ULONG t1,t2;
|
||||
BN_ULONG c1,c2,c3;
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
cx86unix.cpp
|
||||
cx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -480,13 +480,12 @@ const char *CRYPTO_get_lock_name(int type)
|
||||
return(sk_value(app_locks,type-CRYPTO_NUM_LOCKS));
|
||||
}
|
||||
|
||||
#ifdef _DLL
|
||||
#ifdef OPENSSL_SYS_WIN32
|
||||
#if defined(_WIN32) && defined(_WINDLL)
|
||||
|
||||
/* All we really need to do is remove the 'error' state when a thread
|
||||
* detaches */
|
||||
|
||||
BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
LPVOID lpvReserved)
|
||||
{
|
||||
switch(fdwReason)
|
||||
@@ -505,8 +504,6 @@ BOOL WINAPI DLLEntryPoint(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
void OpenSSLDie(const char *file,int line,const char *assertion)
|
||||
{
|
||||
fprintf(stderr,
|
||||
|
||||
@@ -247,7 +247,7 @@ $ LIB_X509 = "x509_def,x509_d2,x509_r2x,x509_cmp,"+ -
|
||||
$ LIB_X509V3 = "v3_bcons,v3_bitst,v3_conf,v3_extku,v3_ia5,v3_lib,"+ -
|
||||
"v3_prn,v3_utl,v3err,v3_genn,v3_alt,v3_skey,v3_akey,v3_pku,"+ -
|
||||
"v3_int,v3_enum,v3_sxnet,v3_cpols,v3_crld,v3_purp,v3_info,"+ -
|
||||
"v3_ocsp,v3_akeya"
|
||||
"v3_ocsp,v3_akeya,v3_pcia,v3_pci"
|
||||
$ LIB_CONF = "conf_err,conf_lib,conf_api,conf_def,conf_mod,conf_mall,conf_sap"
|
||||
$ LIB_TXT_DB = "txt_db"
|
||||
$ LIB_PKCS7 = "pk7_asn1,pk7_lib,pkcs7err,pk7_doit,pk7_smime,pk7_attr,"+ -
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
lib
|
||||
Makefile.save
|
||||
des
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -3,3 +3,5 @@ yx86unix.cpp
|
||||
des_enc-sparc.S
|
||||
dx86-elf.s
|
||||
yx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -69,7 +69,7 @@ static const EVP_CIPHER n_cipher=
|
||||
{
|
||||
NID_undef,
|
||||
1,0,0,
|
||||
0,
|
||||
EVP_CIPH_FLAG_FIPS,
|
||||
null_init_key,
|
||||
null_cipher,
|
||||
NULL,
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
mx86unix.cpp
|
||||
mx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
#define NUM_NID 662
|
||||
#define NUM_SN 655
|
||||
#define NUM_LN 655
|
||||
#define NUM_OBJ 619
|
||||
#define NUM_NID 668
|
||||
#define NUM_SN 660
|
||||
#define NUM_LN 660
|
||||
#define NUM_OBJ 624
|
||||
|
||||
static unsigned char lvalues[4461]={
|
||||
static unsigned char lvalues[4500]={
|
||||
0x00, /* [ 0] OBJ_undef */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */
|
||||
0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */
|
||||
@@ -687,6 +687,11 @@ static unsigned char lvalues[4461]={
|
||||
0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x03,/* [4444] OBJ_ms_upn */
|
||||
0x55,0x04,0x09, /* [4454] OBJ_streetAddress */
|
||||
0x55,0x04,0x11, /* [4457] OBJ_postalCode */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x15, /* [4460] OBJ_id_ppl */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x0E, /* [4467] OBJ_proxyCertInfo */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x00, /* [4475] OBJ_id_ppl_anyLanguage */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x01, /* [4483] OBJ_id_ppl_inheritAll */
|
||||
0x2B,0x06,0x01,0x05,0x05,0x07,0x15,0x02, /* [4491] OBJ_Independent */
|
||||
};
|
||||
|
||||
static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
@@ -1742,6 +1747,15 @@ static ASN1_OBJECT nid_objs[NUM_NID]={
|
||||
{"DES-EDE3-CFB8","des-ede3-cfb8",NID_des_ede3_cfb8,0,NULL},
|
||||
{"streetAddress","streetAddress",NID_streetAddress,3,&(lvalues[4454]),0},
|
||||
{"postalCode","postalCode",NID_postalCode,3,&(lvalues[4457]),0},
|
||||
{"id-ppl","id-ppl",NID_id_ppl,7,&(lvalues[4460]),0},
|
||||
{"proxyCertInfo","Proxy Certificate Information",NID_proxyCertInfo,8,
|
||||
&(lvalues[4467]),0},
|
||||
{"id-ppl-anyLanguage","Any language",NID_id_ppl_anyLanguage,8,
|
||||
&(lvalues[4475]),0},
|
||||
{"id-ppl-inheritAll","Inherit all",NID_id_ppl_inheritAll,8,
|
||||
&(lvalues[4483]),0},
|
||||
{NULL,NULL,NID_undef,0,NULL},
|
||||
{"id-ppl-independent","Independent",NID_Independent,8,&(lvalues[4491]),0},
|
||||
};
|
||||
|
||||
static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
@@ -2046,6 +2060,10 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[271]),/* "id-pkix1-explicit-93" */
|
||||
&(nid_objs[270]),/* "id-pkix1-implicit-88" */
|
||||
&(nid_objs[272]),/* "id-pkix1-implicit-93" */
|
||||
&(nid_objs[662]),/* "id-ppl" */
|
||||
&(nid_objs[664]),/* "id-ppl-anyLanguage" */
|
||||
&(nid_objs[667]),/* "id-ppl-independent" */
|
||||
&(nid_objs[665]),/* "id-ppl-inheritAll" */
|
||||
&(nid_objs[267]),/* "id-qcs" */
|
||||
&(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */
|
||||
&(nid_objs[259]),/* "id-qt" */
|
||||
@@ -2221,6 +2239,7 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={
|
||||
&(nid_objs[415]),/* "prime256v1" */
|
||||
&(nid_objs[385]),/* "private" */
|
||||
&(nid_objs[84]),/* "privateKeyUsagePeriod" */
|
||||
&(nid_objs[663]),/* "proxyCertInfo" */
|
||||
&(nid_objs[510]),/* "pseudonym" */
|
||||
&(nid_objs[435]),/* "pss" */
|
||||
&(nid_objs[286]),/* "qcStatements" */
|
||||
@@ -2406,6 +2425,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[363]),/* "AD Time Stamping" */
|
||||
&(nid_objs[405]),/* "ANSI X9.62" */
|
||||
&(nid_objs[368]),/* "Acceptable OCSP Responses" */
|
||||
&(nid_objs[664]),/* "Any language" */
|
||||
&(nid_objs[177]),/* "Authority Information Access" */
|
||||
&(nid_objs[365]),/* "Basic OCSP Response" */
|
||||
&(nid_objs[285]),/* "Biometric Info" */
|
||||
@@ -2428,6 +2448,8 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[296]),/* "IPSec User" */
|
||||
&(nid_objs[182]),/* "ISO Member Body" */
|
||||
&(nid_objs[183]),/* "ISO US Member Body" */
|
||||
&(nid_objs[667]),/* "Independent" */
|
||||
&(nid_objs[665]),/* "Inherit all" */
|
||||
&(nid_objs[142]),/* "Invalidity Date" */
|
||||
&(nid_objs[504]),/* "MIME MHS" */
|
||||
&(nid_objs[388]),/* "Mail" */
|
||||
@@ -2468,6 +2490,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[164]),/* "Policy Qualifier CPS" */
|
||||
&(nid_objs[165]),/* "Policy Qualifier User Notice" */
|
||||
&(nid_objs[385]),/* "Private" */
|
||||
&(nid_objs[663]),/* "Proxy Certificate Information" */
|
||||
&(nid_objs[ 1]),/* "RSA Data Security, Inc." */
|
||||
&(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */
|
||||
&(nid_objs[188]),/* "S/MIME" */
|
||||
@@ -2704,6 +2727,7 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={
|
||||
&(nid_objs[271]),/* "id-pkix1-explicit-93" */
|
||||
&(nid_objs[270]),/* "id-pkix1-implicit-88" */
|
||||
&(nid_objs[272]),/* "id-pkix1-implicit-93" */
|
||||
&(nid_objs[662]),/* "id-ppl" */
|
||||
&(nid_objs[267]),/* "id-qcs" */
|
||||
&(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */
|
||||
&(nid_objs[259]),/* "id-qt" */
|
||||
@@ -3310,6 +3334,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */
|
||||
&(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */
|
||||
&(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */
|
||||
&(nid_objs[662]),/* OBJ_id_ppl 1 3 6 1 5 5 7 21 */
|
||||
&(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */
|
||||
&(nid_objs[507]),/* OBJ_id_hex_partial_message 1 3 6 1 7 1 1 1 */
|
||||
&(nid_objs[508]),/* OBJ_id_hex_multipart_message 1 3 6 1 7 1 1 2 */
|
||||
@@ -3363,6 +3388,7 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */
|
||||
&(nid_objs[397]),/* OBJ_ac_proxying 1 3 6 1 5 5 7 1 10 */
|
||||
&(nid_objs[398]),/* OBJ_sinfo_access 1 3 6 1 5 5 7 1 11 */
|
||||
&(nid_objs[663]),/* OBJ_proxyCertInfo 1 3 6 1 5 5 7 1 14 */
|
||||
&(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */
|
||||
&(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */
|
||||
&(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */
|
||||
@@ -3433,6 +3459,9 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={
|
||||
&(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */
|
||||
&(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */
|
||||
&(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */
|
||||
&(nid_objs[664]),/* OBJ_id_ppl_anyLanguage 1 3 6 1 5 5 7 21 0 */
|
||||
&(nid_objs[665]),/* OBJ_id_ppl_inheritAll 1 3 6 1 5 5 7 21 1 */
|
||||
&(nid_objs[667]),/* OBJ_Independent 1 3 6 1 5 5 7 21 2 */
|
||||
&(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */
|
||||
&(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */
|
||||
&(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */
|
||||
|
||||
@@ -950,6 +950,10 @@
|
||||
#define NID_id_cct 268
|
||||
#define OBJ_id_cct OBJ_id_pkix,12L
|
||||
|
||||
#define SN_id_ppl "id-ppl"
|
||||
#define NID_id_ppl 662
|
||||
#define OBJ_id_ppl OBJ_id_pkix,21L
|
||||
|
||||
#define SN_id_ad "id-ad"
|
||||
#define NID_id_ad 176
|
||||
#define OBJ_id_ad OBJ_id_pkix,48L
|
||||
@@ -1065,6 +1069,11 @@
|
||||
#define NID_sinfo_access 398
|
||||
#define OBJ_sinfo_access OBJ_id_pe,11L
|
||||
|
||||
#define SN_proxyCertInfo "proxyCertInfo"
|
||||
#define LN_proxyCertInfo "Proxy Certificate Information"
|
||||
#define NID_proxyCertInfo 663
|
||||
#define OBJ_proxyCertInfo OBJ_id_pe,14L
|
||||
|
||||
#define SN_id_qt_cps "id-qt-cps"
|
||||
#define LN_id_qt_cps "Policy Qualifier CPS"
|
||||
#define NID_id_qt_cps 164
|
||||
@@ -1389,6 +1398,21 @@
|
||||
#define NID_id_cct_PKIResponse 362
|
||||
#define OBJ_id_cct_PKIResponse OBJ_id_cct,3L
|
||||
|
||||
#define SN_id_ppl_anyLanguage "id-ppl-anyLanguage"
|
||||
#define LN_id_ppl_anyLanguage "Any language"
|
||||
#define NID_id_ppl_anyLanguage 664
|
||||
#define OBJ_id_ppl_anyLanguage OBJ_id_ppl,0L
|
||||
|
||||
#define SN_id_ppl_inheritAll "id-ppl-inheritAll"
|
||||
#define LN_id_ppl_inheritAll "Inherit all"
|
||||
#define NID_id_ppl_inheritAll 665
|
||||
#define OBJ_id_ppl_inheritAll OBJ_id_ppl,1L
|
||||
|
||||
#define SN_Independent "id-ppl-independent"
|
||||
#define LN_Independent "Independent"
|
||||
#define NID_Independent 667
|
||||
#define OBJ_Independent OBJ_id_ppl,2L
|
||||
|
||||
#define SN_ad_OCSP "OCSP"
|
||||
#define LN_ad_OCSP "OCSP"
|
||||
#define NID_ad_OCSP 178
|
||||
|
||||
@@ -659,3 +659,9 @@ des_ede3_cfb1 658
|
||||
des_ede3_cfb8 659
|
||||
streetAddress 660
|
||||
postalCode 661
|
||||
id_ppl 662
|
||||
proxyCertInfo 663
|
||||
id_ppl_anyLanguage 664
|
||||
id_ppl_inheritAll 665
|
||||
id_ppl_independent 666
|
||||
Independent 667
|
||||
|
||||
@@ -312,6 +312,7 @@ id-pkix 9 : id-pda
|
||||
id-pkix 10 : id-aca
|
||||
id-pkix 11 : id-qcs
|
||||
id-pkix 12 : id-cct
|
||||
id-pkix 21 : id-ppl
|
||||
id-pkix 48 : id-ad
|
||||
|
||||
# PKIX Modules
|
||||
@@ -346,6 +347,7 @@ id-pe 9 : sbqp-routerIdentifier
|
||||
id-pe 10 : ac-proxying
|
||||
!Cname sinfo-access
|
||||
id-pe 11 : subjectInfoAccess : Subject Information Access
|
||||
id-pe 14 : proxyCertInfo : Proxy Certificate Information
|
||||
|
||||
# PKIX policyQualifiers for Internet policy qualifiers
|
||||
id-qt 1 : id-qt-cps : Policy Qualifier CPS
|
||||
@@ -461,6 +463,11 @@ id-cct 1 : id-cct-crs
|
||||
id-cct 2 : id-cct-PKIData
|
||||
id-cct 3 : id-cct-PKIResponse
|
||||
|
||||
# Predefined Proxy Certificate policy languages
|
||||
id-ppl 0 : id-ppl-anyLanguage : Any language
|
||||
id-ppl 1 : id-ppl-inheritAll : Inherit all
|
||||
id-ppl 2 : id-ppl-independent : Independent
|
||||
|
||||
# access descriptors for authority info access extension
|
||||
!Cname ad-OCSP
|
||||
id-ad 1 : OCSP : OCSP
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x0090706FL
|
||||
#define OPENSSL_VERSION_NUMBER 0x0090707fL
|
||||
#ifdef OPENSSL_FIPS
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7f-fips 22 Mar 2005"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7g-fips 11 Apr 2005"
|
||||
#else
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7f 22 Mar 2005"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.7g 11 Apr 2005"
|
||||
#endif
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
lib
|
||||
ctx_size
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -86,7 +86,7 @@ sub get_mem
|
||||
{
|
||||
my($size,$addr,$reg1,$reg2,$idx)=@_;
|
||||
my($t,$post);
|
||||
my($ret)="[";
|
||||
my($ret)="$size [";
|
||||
$addr =~ s/^\s+//;
|
||||
if ($addr =~ /^(.+)\+(.+)$/)
|
||||
{
|
||||
@@ -177,6 +177,11 @@ sub out2
|
||||
my($l,$t);
|
||||
|
||||
push(@out,"\t$name\t");
|
||||
if ($name eq "lea")
|
||||
{
|
||||
$p1 =~ s/^[^\[]*\[/\[/;
|
||||
$p2 =~ s/^[^\[]*\[/\[/;
|
||||
}
|
||||
$t=&conv($p1).",";
|
||||
$l=length($t);
|
||||
push(@out,$t);
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -4,3 +4,5 @@ enc
|
||||
dec
|
||||
sign
|
||||
verify
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -183,7 +183,6 @@ int PKCS7_set_type(PKCS7 *p7, int type)
|
||||
ASN1_INTEGER_set(p7->d.signed_and_enveloped->version,1);
|
||||
if (!ASN1_INTEGER_set(p7->d.signed_and_enveloped->version,1))
|
||||
goto err;
|
||||
break;
|
||||
p7->d.signed_and_enveloped->enc_data->content_type
|
||||
= OBJ_nid2obj(NID_pkcs7_data);
|
||||
break;
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
#include <openssl/rand.h>
|
||||
#include "rand_lcl.h"
|
||||
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN32_CYGWIN)
|
||||
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
|
||||
#include <windows.h>
|
||||
#ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0400
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -66,7 +66,7 @@ asm/rx86bsdi.o: asm/rx86unix.cpp
|
||||
asm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl
|
||||
(cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp)
|
||||
|
||||
asm/rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) $< $@
|
||||
asm/rc4-amd64.s: asm/rc4-amd64.pl; $(PERL) asm/rc4-amd64.pl $@
|
||||
|
||||
asm/rc4-ia64.s: asm/rc4-ia64.S
|
||||
$(CC) $(CFLAGS) -E asm/rc4-ia64.S > $@
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
rx86unix.cpp
|
||||
rx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
r586unix.cpp
|
||||
r586-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
rm86unix.cpp
|
||||
rm86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
sx86unix.cpp
|
||||
sx86-elf.s
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1038,18 +1038,18 @@ int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,
|
||||
int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
|
||||
unsigned char *bytes, int len, int loc, int set);
|
||||
X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
|
||||
char *field, int type, unsigned char *bytes, int len);
|
||||
const char *field, int type, const unsigned char *bytes, int len);
|
||||
X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
|
||||
int type,unsigned char *bytes, int len);
|
||||
int X509_NAME_add_entry_by_txt(X509_NAME *name, char *field, int type,
|
||||
unsigned char *bytes, int len, int loc, int set);
|
||||
int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
|
||||
const unsigned char *bytes, int len, int loc, int set);
|
||||
X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
|
||||
ASN1_OBJECT *obj, int type,unsigned char *bytes,
|
||||
ASN1_OBJECT *obj, int type,const unsigned char *bytes,
|
||||
int len);
|
||||
int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne,
|
||||
ASN1_OBJECT *obj);
|
||||
int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
|
||||
unsigned char *bytes, int len);
|
||||
const unsigned char *bytes, int len);
|
||||
ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
|
||||
ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
|
||||
|
||||
|
||||
@@ -126,6 +126,10 @@ const char *X509_verify_cert_error_string(long n)
|
||||
return ("invalid non-CA certificate (has CA markings)");
|
||||
case X509_V_ERR_PATH_LENGTH_EXCEEDED:
|
||||
return ("path length constraint exceeded");
|
||||
case X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED:
|
||||
return("proxy path length constraint exceeded");
|
||||
case X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED:
|
||||
return("proxy cerificates not allowed, please set the appropriate flag");
|
||||
case X509_V_ERR_INVALID_PURPOSE:
|
||||
return ("unsupported certificate purpose");
|
||||
case X509_V_ERR_CERT_UNTRUSTED:
|
||||
@@ -142,19 +146,16 @@ const char *X509_verify_cert_error_string(long n)
|
||||
return("authority and issuer serial number mismatch");
|
||||
case X509_V_ERR_KEYUSAGE_NO_CERTSIGN:
|
||||
return("key usage does not include certificate signing");
|
||||
|
||||
case X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER:
|
||||
return("unable to get CRL issuer certificate");
|
||||
|
||||
case X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION:
|
||||
return("unhandled critical extension");
|
||||
|
||||
case X509_V_ERR_KEYUSAGE_NO_CRL_SIGN:
|
||||
return("key usage does not include CRL signing");
|
||||
|
||||
case X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE:
|
||||
return("key usage does not include digital signature");
|
||||
case X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION:
|
||||
return("unhandled critical CRL extension");
|
||||
|
||||
default:
|
||||
BIO_snprintf(buf,sizeof buf,"error number %ld",n);
|
||||
return(buf);
|
||||
|
||||
@@ -379,6 +379,8 @@ static int check_chain_extensions(X509_STORE_CTX *ctx)
|
||||
int i, ok=0, must_be_ca;
|
||||
X509 *x;
|
||||
int (*cb)();
|
||||
int proxy_path_length = 0;
|
||||
int allow_proxy_certs = !!(ctx->flags & X509_V_FLAG_ALLOW_PROXY_CERTS);
|
||||
cb=ctx->verify_cb;
|
||||
|
||||
/* must_be_ca can have 1 of 3 values:
|
||||
@@ -390,6 +392,12 @@ static int check_chain_extensions(X509_STORE_CTX *ctx)
|
||||
all certificates in the chain except the leaf certificate.
|
||||
*/
|
||||
must_be_ca = -1;
|
||||
|
||||
/* A hack to keep people who don't want to modify their software
|
||||
happy */
|
||||
if (getenv("OPENSSL_ALLOW_PROXY_CERTS"))
|
||||
allow_proxy_certs = 1;
|
||||
|
||||
/* Check all untrusted certificates */
|
||||
for (i = 0; i < ctx->last_untrusted; i++)
|
||||
{
|
||||
@@ -404,6 +412,14 @@ static int check_chain_extensions(X509_STORE_CTX *ctx)
|
||||
ok=cb(0,ctx);
|
||||
if (!ok) goto end;
|
||||
}
|
||||
if (!allow_proxy_certs && (x->ex_flags & EXFLAG_PROXY))
|
||||
{
|
||||
ctx->error = X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED;
|
||||
ctx->error_depth = i;
|
||||
ctx->current_cert = x;
|
||||
ok=cb(0,ctx);
|
||||
if (!ok) goto end;
|
||||
}
|
||||
ret = X509_check_ca(x);
|
||||
switch(must_be_ca)
|
||||
{
|
||||
@@ -462,7 +478,7 @@ static int check_chain_extensions(X509_STORE_CTX *ctx)
|
||||
}
|
||||
/* Check pathlen */
|
||||
if ((i > 1) && (x->ex_pathlen != -1)
|
||||
&& (i > (x->ex_pathlen + 1)))
|
||||
&& (i > (x->ex_pathlen + proxy_path_length + 1)))
|
||||
{
|
||||
ctx->error = X509_V_ERR_PATH_LENGTH_EXCEEDED;
|
||||
ctx->error_depth = i;
|
||||
@@ -470,8 +486,32 @@ static int check_chain_extensions(X509_STORE_CTX *ctx)
|
||||
ok=cb(0,ctx);
|
||||
if (!ok) goto end;
|
||||
}
|
||||
/* The next certificate must be a CA */
|
||||
must_be_ca = 1;
|
||||
/* If this certificate is a proxy certificate, the next
|
||||
certificate must be another proxy certificate or a EE
|
||||
certificate. If not, the next certificate must be a
|
||||
CA certificate. */
|
||||
if (x->ex_flags & EXFLAG_PROXY)
|
||||
{
|
||||
PROXY_CERT_INFO_EXTENSION *pci =
|
||||
X509_get_ext_d2i(x, NID_proxyCertInfo,
|
||||
NULL, NULL);
|
||||
if (pci->pcPathLengthConstraint &&
|
||||
ASN1_INTEGER_get(pci->pcPathLengthConstraint)
|
||||
< i)
|
||||
{
|
||||
PROXY_CERT_INFO_EXTENSION_free(pci);
|
||||
ctx->error = X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED;
|
||||
ctx->error_depth = i;
|
||||
ctx->current_cert = x;
|
||||
ok=cb(0,ctx);
|
||||
if (!ok) goto end;
|
||||
}
|
||||
PROXY_CERT_INFO_EXTENSION_free(pci);
|
||||
proxy_path_length++;
|
||||
must_be_ca = 0;
|
||||
}
|
||||
else
|
||||
must_be_ca = 1;
|
||||
}
|
||||
ok = 1;
|
||||
end:
|
||||
@@ -835,6 +875,7 @@ static int internal_verify(X509_STORE_CTX *ctx)
|
||||
}
|
||||
|
||||
/* The last error (if any) is still in the error value */
|
||||
ctx->current_issuer=xi;
|
||||
ctx->current_cert=xs;
|
||||
ok=(*cb)(1,ctx);
|
||||
if (!ok) goto end;
|
||||
|
||||
@@ -276,7 +276,7 @@ struct x509_store_ctx_st /* X509_STORE_CTX */
|
||||
#define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 6
|
||||
#define X509_V_ERR_CERT_SIGNATURE_FAILURE 7
|
||||
#define X509_V_ERR_CRL_SIGNATURE_FAILURE 8
|
||||
#define X509_V_ERR_CERT_NOT_YET_VALID 9
|
||||
#define X509_V_ERR_CERT_NOT_YET_VALID 9
|
||||
#define X509_V_ERR_CERT_HAS_EXPIRED 10
|
||||
#define X509_V_ERR_CRL_NOT_YET_VALID 11
|
||||
#define X509_V_ERR_CRL_HAS_EXPIRED 12
|
||||
@@ -307,6 +307,9 @@ struct x509_store_ctx_st /* X509_STORE_CTX */
|
||||
#define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35
|
||||
#define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36
|
||||
#define X509_V_ERR_INVALID_NON_CA 37
|
||||
#define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 38
|
||||
#define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 39
|
||||
#define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 40
|
||||
|
||||
/* The application is not happy */
|
||||
#define X509_V_ERR_APPLICATION_VERIFICATION 50
|
||||
@@ -325,6 +328,8 @@ struct x509_store_ctx_st /* X509_STORE_CTX */
|
||||
#define X509_V_FLAG_IGNORE_CRITICAL 0x10
|
||||
/* Disable workarounds for broken certificates */
|
||||
#define X509_V_FLAG_X509_STRICT 0x20
|
||||
/* Enable proxy certificate validation */
|
||||
#define X509_V_FLAG_ALLOW_PROXY_CERTS 0x40
|
||||
|
||||
int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type,
|
||||
X509_NAME *name);
|
||||
|
||||
@@ -195,8 +195,8 @@ int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int X509_NAME_add_entry_by_txt(X509_NAME *name, char *field, int type,
|
||||
unsigned char *bytes, int len, int loc, int set)
|
||||
int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
|
||||
const unsigned char *bytes, int len, int loc, int set)
|
||||
{
|
||||
X509_NAME_ENTRY *ne;
|
||||
int ret;
|
||||
@@ -273,7 +273,7 @@ err:
|
||||
}
|
||||
|
||||
X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
|
||||
char *field, int type, unsigned char *bytes, int len)
|
||||
const char *field, int type, const unsigned char *bytes, int len)
|
||||
{
|
||||
ASN1_OBJECT *obj;
|
||||
X509_NAME_ENTRY *nentry;
|
||||
@@ -309,7 +309,7 @@ X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
|
||||
}
|
||||
|
||||
X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,
|
||||
ASN1_OBJECT *obj, int type, unsigned char *bytes, int len)
|
||||
ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len)
|
||||
{
|
||||
X509_NAME_ENTRY *ret;
|
||||
|
||||
@@ -347,7 +347,7 @@ int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj)
|
||||
}
|
||||
|
||||
int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
|
||||
unsigned char *bytes, int len)
|
||||
const unsigned char *bytes, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
lib
|
||||
Makefile.save
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -25,11 +25,11 @@ LIB=$(TOP)/libcrypto.a
|
||||
LIBSRC= v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c v3_lib.c \
|
||||
v3_prn.c v3_utl.c v3err.c v3_genn.c v3_alt.c v3_skey.c v3_akey.c v3_pku.c \
|
||||
v3_int.c v3_enum.c v3_sxnet.c v3_cpols.c v3_crld.c v3_purp.c v3_info.c \
|
||||
v3_ocsp.c v3_akeya.c
|
||||
v3_ocsp.c v3_akeya.c v3_pcia.c v3_pci.c
|
||||
LIBOBJ= v3_bcons.o v3_bitst.o v3_conf.o v3_extku.o v3_ia5.o v3_lib.o \
|
||||
v3_prn.o v3_utl.o v3err.o v3_genn.o v3_alt.o v3_skey.o v3_akey.o v3_pku.o \
|
||||
v3_int.o v3_enum.o v3_sxnet.o v3_cpols.o v3_crld.o v3_purp.o v3_info.o \
|
||||
v3_ocsp.o v3_akeya.o
|
||||
v3_ocsp.o v3_akeya.o v3_pcia.o v3_pci.o
|
||||
|
||||
SRC= $(LIBSRC)
|
||||
|
||||
@@ -444,6 +444,50 @@ v3_ocsp.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
v3_ocsp.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
|
||||
v3_ocsp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
v3_ocsp.o: ../cryptlib.h v3_ocsp.c
|
||||
v3_pci.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
v3_pci.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
v3_pci.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
v3_pci.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
|
||||
v3_pci.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
v3_pci.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h
|
||||
v3_pci.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
v3_pci.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
v3_pci.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
v3_pci.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
v3_pci.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
v3_pci.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
v3_pci.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
v3_pci.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
v3_pci.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
v3_pci.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
v3_pci.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
v3_pci.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
v3_pci.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
v3_pci.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
|
||||
v3_pci.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
v3_pci.o: ../cryptlib.h v3_pci.c
|
||||
v3_pcia.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
v3_pcia.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
v3_pcia.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
v3_pcia.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
|
||||
v3_pcia.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
|
||||
v3_pcia.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
|
||||
v3_pcia.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
v3_pcia.o: ../../include/openssl/e_os2.h ../../include/openssl/evp.h
|
||||
v3_pcia.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
v3_pcia.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
v3_pcia.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
v3_pcia.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
v3_pcia.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
v3_pcia.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
|
||||
v3_pcia.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
v3_pcia.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
|
||||
v3_pcia.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
v3_pcia.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
v3_pcia.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
|
||||
v3_pcia.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
|
||||
v3_pcia.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
v3_pcia.o: v3_pcia.c
|
||||
v3_pku.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h
|
||||
v3_pku.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
|
||||
v3_pku.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
|
||||
|
||||
@@ -64,7 +64,7 @@ extern X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_crl_invdate;
|
||||
extern X509V3_EXT_METHOD v3_delta_crl, v3_cpols, v3_crld;
|
||||
extern X509V3_EXT_METHOD v3_ocsp_nonce, v3_ocsp_accresp, v3_ocsp_acutoff;
|
||||
extern X509V3_EXT_METHOD v3_ocsp_crlid, v3_ocsp_nocheck, v3_ocsp_serviceloc;
|
||||
extern X509V3_EXT_METHOD v3_crl_hold;
|
||||
extern X509V3_EXT_METHOD v3_crl_hold, v3_pci;
|
||||
|
||||
/* This table will be searched using OBJ_bsearch so it *must* kept in
|
||||
* order of the ext_nid values.
|
||||
@@ -107,8 +107,9 @@ static X509V3_EXT_METHOD *standard_exts[] = {
|
||||
#endif
|
||||
&v3_sinfo,
|
||||
#ifndef OPENSSL_NO_OCSP
|
||||
&v3_crl_hold
|
||||
&v3_crl_hold,
|
||||
#endif
|
||||
&v3_pci,
|
||||
};
|
||||
|
||||
/* Number of standard extensions */
|
||||
|
||||
313
crypto/x509v3/v3_pci.c
Normal file
313
crypto/x509v3/v3_pci.c
Normal file
@@ -0,0 +1,313 @@
|
||||
/* v3_pci.c -*- mode:C; c-file-style: "eay" -*- */
|
||||
/* Contributed to the OpenSSL Project 2004
|
||||
* by Richard Levitte (richard@levitte.org)
|
||||
*/
|
||||
/* Copyright (c) 2004 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *ext,
|
||||
BIO *out, int indent);
|
||||
static PROXY_CERT_INFO_EXTENSION *r2i_pci(X509V3_EXT_METHOD *method,
|
||||
X509V3_CTX *ctx, char *str);
|
||||
|
||||
X509V3_EXT_METHOD v3_pci =
|
||||
{ NID_proxyCertInfo, 0, ASN1_ITEM_ref(PROXY_CERT_INFO_EXTENSION),
|
||||
0,0,0,0,
|
||||
0,0,
|
||||
NULL, NULL,
|
||||
(X509V3_EXT_I2R)i2r_pci,
|
||||
(X509V3_EXT_R2I)r2i_pci,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int i2r_pci(X509V3_EXT_METHOD *method, PROXY_CERT_INFO_EXTENSION *pci,
|
||||
BIO *out, int indent)
|
||||
{
|
||||
BIO_printf(out, "%*sPath Length Constraint: ", indent, "");
|
||||
if (pci->pcPathLengthConstraint)
|
||||
i2a_ASN1_INTEGER(out, pci->pcPathLengthConstraint);
|
||||
else
|
||||
BIO_printf(out, "infinite");
|
||||
BIO_puts(out, "\n");
|
||||
BIO_printf(out, "%*sPolicy Language: ", indent, "");
|
||||
i2a_ASN1_OBJECT(out, pci->proxyPolicy->policyLanguage);
|
||||
BIO_puts(out, "\n");
|
||||
if (pci->proxyPolicy->policy && pci->proxyPolicy->policy->data)
|
||||
BIO_printf(out, "%*sPolicy Text: %s\n", indent, "",
|
||||
pci->proxyPolicy->policy->data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int process_pci_value(CONF_VALUE *val,
|
||||
ASN1_OBJECT **language, ASN1_INTEGER **pathlen,
|
||||
ASN1_OCTET_STRING **policy)
|
||||
{
|
||||
int free_policy = 0;
|
||||
|
||||
if (strcmp(val->name, "language") == 0)
|
||||
{
|
||||
if (*language)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED);
|
||||
X509V3_conf_err(val);
|
||||
return 0;
|
||||
}
|
||||
if (!(*language = OBJ_txt2obj(val->value, 0)))
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_INVALID_OBJECT_IDENTIFIER);
|
||||
X509V3_conf_err(val);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (strcmp(val->name, "pathlen") == 0)
|
||||
{
|
||||
if (*pathlen)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED);
|
||||
X509V3_conf_err(val);
|
||||
return 0;
|
||||
}
|
||||
if (!X509V3_get_value_int(val, pathlen))
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_PATH_LENGTH);
|
||||
X509V3_conf_err(val);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (strcmp(val->name, "policy") == 0)
|
||||
{
|
||||
unsigned char *tmp_data = NULL;
|
||||
long val_len;
|
||||
if (!*policy)
|
||||
{
|
||||
*policy = ASN1_OCTET_STRING_new();
|
||||
if (!*policy)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE);
|
||||
X509V3_conf_err(val);
|
||||
return 0;
|
||||
}
|
||||
free_policy = 1;
|
||||
}
|
||||
if (strncmp(val->value, "hex:", 4) == 0)
|
||||
{
|
||||
unsigned char *tmp_data2 =
|
||||
string_to_hex(val->value + 4, &val_len);
|
||||
|
||||
if (!tmp_data2) goto err;
|
||||
|
||||
tmp_data = OPENSSL_realloc((*policy)->data,
|
||||
(*policy)->length + val_len + 1);
|
||||
if (tmp_data)
|
||||
{
|
||||
(*policy)->data = tmp_data;
|
||||
memcpy(&(*policy)->data[(*policy)->length],
|
||||
tmp_data2, val_len);
|
||||
(*policy)->length += val_len;
|
||||
(*policy)->data[(*policy)->length] = '\0';
|
||||
}
|
||||
}
|
||||
else if (strncmp(val->value, "file:", 5) == 0)
|
||||
{
|
||||
unsigned char buf[2048];
|
||||
int n;
|
||||
BIO *b = BIO_new_file(val->value + 5, "r");
|
||||
if (!b)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,ERR_R_BIO_LIB);
|
||||
X509V3_conf_err(val);
|
||||
goto err;
|
||||
}
|
||||
while((n = BIO_read(b, buf, sizeof(buf))) > 0
|
||||
|| (n == 0 && BIO_should_retry(b)))
|
||||
{
|
||||
if (!n) continue;
|
||||
|
||||
tmp_data = OPENSSL_realloc((*policy)->data,
|
||||
(*policy)->length + n + 1);
|
||||
|
||||
if (!tmp_data)
|
||||
break;
|
||||
|
||||
(*policy)->data = tmp_data;
|
||||
memcpy(&(*policy)->data[(*policy)->length],
|
||||
buf, n);
|
||||
(*policy)->length += n;
|
||||
(*policy)->data[(*policy)->length] = '\0';
|
||||
}
|
||||
|
||||
if (n < 0)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,ERR_R_BIO_LIB);
|
||||
X509V3_conf_err(val);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
else if (strncmp(val->value, "text:", 5) == 0)
|
||||
{
|
||||
val_len = strlen(val->value + 5);
|
||||
tmp_data = OPENSSL_realloc((*policy)->data,
|
||||
(*policy)->length + val_len + 1);
|
||||
if (tmp_data)
|
||||
{
|
||||
(*policy)->data = tmp_data;
|
||||
memcpy(&(*policy)->data[(*policy)->length],
|
||||
val->value + 5, val_len);
|
||||
(*policy)->length += val_len;
|
||||
(*policy)->data[(*policy)->length] = '\0';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_INCORRECT_POLICY_SYNTAX_TAG);
|
||||
X509V3_conf_err(val);
|
||||
goto err;
|
||||
}
|
||||
if (!tmp_data)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE);
|
||||
X509V3_conf_err(val);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
err:
|
||||
if (free_policy)
|
||||
{
|
||||
ASN1_OCTET_STRING_free(*policy);
|
||||
*policy = NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PROXY_CERT_INFO_EXTENSION *r2i_pci(X509V3_EXT_METHOD *method,
|
||||
X509V3_CTX *ctx, char *value)
|
||||
{
|
||||
PROXY_CERT_INFO_EXTENSION *pci = NULL;
|
||||
STACK_OF(CONF_VALUE) *vals;
|
||||
ASN1_OBJECT *language = NULL;
|
||||
ASN1_INTEGER *pathlen = NULL;
|
||||
ASN1_OCTET_STRING *policy = NULL;
|
||||
int i, j;
|
||||
|
||||
vals = X509V3_parse_list(value);
|
||||
for (i = 0; i < sk_CONF_VALUE_num(vals); i++)
|
||||
{
|
||||
CONF_VALUE *cnf = sk_CONF_VALUE_value(vals, i);
|
||||
if (!cnf->name || (*cnf->name != '@' && !cnf->value))
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_INVALID_PROXY_POLICY_SETTING);
|
||||
X509V3_conf_err(cnf);
|
||||
goto err;
|
||||
}
|
||||
if (*cnf->name == '@')
|
||||
{
|
||||
STACK_OF(CONF_VALUE) *sect;
|
||||
int success_p = 1;
|
||||
|
||||
sect = X509V3_get_section(ctx, cnf->name + 1);
|
||||
if (!sect)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_INVALID_SECTION);
|
||||
X509V3_conf_err(cnf);
|
||||
goto err;
|
||||
}
|
||||
for (j = 0; success_p && j < sk_CONF_VALUE_num(sect); j++)
|
||||
{
|
||||
success_p =
|
||||
process_pci_value(sk_CONF_VALUE_value(sect, j),
|
||||
&language, &pathlen, &policy);
|
||||
}
|
||||
X509V3_section_free(ctx, sect);
|
||||
if (!success_p)
|
||||
goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!process_pci_value(cnf,
|
||||
&language, &pathlen, &policy))
|
||||
{
|
||||
X509V3_conf_err(cnf);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Language is mandatory */
|
||||
if (!language)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED);
|
||||
goto err;
|
||||
}
|
||||
i = OBJ_obj2nid(language);
|
||||
if ((i == NID_Independent || i == NID_id_ppl_inheritAll) && policy)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY);
|
||||
goto err;
|
||||
}
|
||||
|
||||
pci = PROXY_CERT_INFO_EXTENSION_new();
|
||||
if (!pci)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
pci->proxyPolicy = PROXY_POLICY_new();
|
||||
if (!pci->proxyPolicy)
|
||||
{
|
||||
X509V3err(X509V3_F_R2I_PCI,ERR_R_MALLOC_FAILURE);
|
||||
goto err;
|
||||
}
|
||||
|
||||
pci->proxyPolicy->policyLanguage = language; language = NULL;
|
||||
pci->proxyPolicy->policy = policy; policy = NULL;
|
||||
pci->pcPathLengthConstraint = pathlen; pathlen = NULL;
|
||||
goto end;
|
||||
err:
|
||||
if (language) { ASN1_OBJECT_free(language); language = NULL; }
|
||||
if (pathlen) { ASN1_INTEGER_free(pathlen); pathlen = NULL; }
|
||||
if (policy) { ASN1_OCTET_STRING_free(policy); policy = NULL; }
|
||||
if (pci && pci->proxyPolicy)
|
||||
{
|
||||
PROXY_POLICY_free(pci->proxyPolicy);
|
||||
pci->proxyPolicy = NULL;
|
||||
}
|
||||
if (pci) { PROXY_CERT_INFO_EXTENSION_free(pci); pci = NULL; }
|
||||
end:
|
||||
sk_CONF_VALUE_pop_free(vals, X509V3_conf_free);
|
||||
return pci;
|
||||
}
|
||||
55
crypto/x509v3/v3_pcia.c
Normal file
55
crypto/x509v3/v3_pcia.c
Normal file
@@ -0,0 +1,55 @@
|
||||
/* v3_pcia.c -*- mode:C; c-file-style: "eay" -*- */
|
||||
/* Contributed to the OpenSSL Project 2004
|
||||
* by Richard Levitte (richard@levitte.org)
|
||||
*/
|
||||
/* Copyright (c) 2004 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/asn1t.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
ASN1_SEQUENCE(PROXY_POLICY) =
|
||||
{
|
||||
ASN1_SIMPLE(PROXY_POLICY,policyLanguage,ASN1_OBJECT),
|
||||
ASN1_OPT(PROXY_POLICY,policy,ASN1_OCTET_STRING)
|
||||
} ASN1_SEQUENCE_END(PROXY_POLICY)
|
||||
|
||||
IMPLEMENT_ASN1_FUNCTIONS(PROXY_POLICY)
|
||||
|
||||
ASN1_SEQUENCE(PROXY_CERT_INFO_EXTENSION) =
|
||||
{
|
||||
ASN1_OPT(PROXY_CERT_INFO_EXTENSION,pcPathLengthConstraint,ASN1_INTEGER),
|
||||
ASN1_SIMPLE(PROXY_CERT_INFO_EXTENSION,proxyPolicy,PROXY_POLICY)
|
||||
} ASN1_SEQUENCE_END(PROXY_CERT_INFO_EXTENSION)
|
||||
|
||||
IMPLEMENT_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION)
|
||||
@@ -285,7 +285,8 @@ int X509_supported_extension(X509_EXTENSION *ex)
|
||||
NID_key_usage, /* 83 */
|
||||
NID_subject_alt_name, /* 85 */
|
||||
NID_basic_constraints, /* 87 */
|
||||
NID_ext_key_usage /* 126 */
|
||||
NID_ext_key_usage, /* 126 */
|
||||
NID_proxyCertInfo /* 661 */
|
||||
};
|
||||
|
||||
int ex_nid;
|
||||
@@ -306,6 +307,7 @@ int X509_supported_extension(X509_EXTENSION *ex)
|
||||
static void x509v3_cache_extensions(X509 *x)
|
||||
{
|
||||
BASIC_CONSTRAINTS *bs;
|
||||
PROXY_CERT_INFO_EXTENSION *pci;
|
||||
ASN1_BIT_STRING *usage;
|
||||
ASN1_BIT_STRING *ns;
|
||||
EXTENDED_KEY_USAGE *extusage;
|
||||
@@ -334,6 +336,16 @@ static void x509v3_cache_extensions(X509 *x)
|
||||
BASIC_CONSTRAINTS_free(bs);
|
||||
x->ex_flags |= EXFLAG_BCONS;
|
||||
}
|
||||
/* Handle proxy certificates */
|
||||
if((pci=X509_get_ext_d2i(x, NID_proxyCertInfo, NULL, NULL))) {
|
||||
if (x->ex_flags & EXFLAG_CA
|
||||
|| X509_get_ext_by_NID(x, NID_subject_alt_name, 0) >= 0
|
||||
|| X509_get_ext_by_NID(x, NID_issuer_alt_name, 0) >= 0) {
|
||||
x->ex_flags |= EXFLAG_INVALID;
|
||||
}
|
||||
PROXY_CERT_INFO_EXTENSION_free(pci);
|
||||
x->ex_flags |= EXFLAG_PROXY;
|
||||
}
|
||||
/* Handle key usage */
|
||||
if((usage=X509_get_ext_d2i(x, NID_key_usage, NULL, NULL))) {
|
||||
if(usage->length > 0) {
|
||||
@@ -623,7 +635,13 @@ int X509_check_issued(X509 *issuer, X509 *subject)
|
||||
return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
|
||||
}
|
||||
}
|
||||
if(ku_reject(issuer, KU_KEY_CERT_SIGN)) return X509_V_ERR_KEYUSAGE_NO_CERTSIGN;
|
||||
if(subject->ex_flags & EXFLAG_PROXY)
|
||||
{
|
||||
if(ku_reject(issuer, KU_DIGITAL_SIGNATURE))
|
||||
return X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE;
|
||||
}
|
||||
else if(ku_reject(issuer, KU_KEY_CERT_SIGN))
|
||||
return X509_V_ERR_KEYUSAGE_NO_CERTSIGN;
|
||||
return X509_V_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/x509v3/v3err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -79,6 +79,7 @@ static ERR_STRING_DATA X509V3_str_functs[]=
|
||||
{ERR_PACK(0,X509V3_F_NREF_NOS,0), "NREF_NOS"},
|
||||
{ERR_PACK(0,X509V3_F_POLICY_SECTION,0), "POLICY_SECTION"},
|
||||
{ERR_PACK(0,X509V3_F_R2I_CERTPOL,0), "R2I_CERTPOL"},
|
||||
{ERR_PACK(0,X509V3_F_R2I_PCI,0), "R2I_PCI"},
|
||||
{ERR_PACK(0,X509V3_F_S2I_ASN1_IA5STRING,0), "S2I_ASN1_IA5STRING"},
|
||||
{ERR_PACK(0,X509V3_F_S2I_ASN1_INTEGER,0), "s2i_ASN1_INTEGER"},
|
||||
{ERR_PACK(0,X509V3_F_S2I_ASN1_OCTET_STRING,0), "s2i_ASN1_OCTET_STRING"},
|
||||
@@ -129,6 +130,7 @@ static ERR_STRING_DATA X509V3_str_reasons[]=
|
||||
{X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED,"extension setting not supported"},
|
||||
{X509V3_R_EXTENSION_VALUE_ERROR ,"extension value error"},
|
||||
{X509V3_R_ILLEGAL_HEX_DIGIT ,"illegal hex digit"},
|
||||
{X509V3_R_INCORRECT_POLICY_SYNTAX_TAG ,"incorrect policy syntax tag"},
|
||||
{X509V3_R_INVALID_BOOLEAN_STRING ,"invalid boolean string"},
|
||||
{X509V3_R_INVALID_EXTENSION_STRING ,"invalid extension string"},
|
||||
{X509V3_R_INVALID_NAME ,"invalid name"},
|
||||
@@ -140,6 +142,8 @@ static ERR_STRING_DATA X509V3_str_reasons[]=
|
||||
{X509V3_R_INVALID_OBJECT_IDENTIFIER ,"invalid object identifier"},
|
||||
{X509V3_R_INVALID_OPTION ,"invalid option"},
|
||||
{X509V3_R_INVALID_POLICY_IDENTIFIER ,"invalid policy identifier"},
|
||||
{X509V3_R_INVALID_PROXY_POLICY_IDENTIFIER,"invalid proxy policy identifier"},
|
||||
{X509V3_R_INVALID_PROXY_POLICY_SETTING ,"invalid proxy policy setting"},
|
||||
{X509V3_R_INVALID_PURPOSE ,"invalid purpose"},
|
||||
{X509V3_R_INVALID_SECTION ,"invalid section"},
|
||||
{X509V3_R_INVALID_SYNTAX ,"invalid syntax"},
|
||||
@@ -150,9 +154,16 @@ static ERR_STRING_DATA X509V3_str_reasons[]=
|
||||
{X509V3_R_NO_ISSUER_CERTIFICATE ,"no issuer certificate"},
|
||||
{X509V3_R_NO_ISSUER_DETAILS ,"no issuer details"},
|
||||
{X509V3_R_NO_POLICY_IDENTIFIER ,"no policy identifier"},
|
||||
{X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED,"no proxy cert policy language defined"},
|
||||
{X509V3_R_NO_PUBLIC_KEY ,"no public key"},
|
||||
{X509V3_R_NO_SUBJECT_DETAILS ,"no subject details"},
|
||||
{X509V3_R_ODD_NUMBER_OF_DIGITS ,"odd number of digits"},
|
||||
{X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED,"policy language alreadty defined"},
|
||||
{X509V3_R_POLICY_PATH_LENGTH ,"policy path length"},
|
||||
{X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED,"policy path length alreadty defined"},
|
||||
{X509V3_R_POLICY_SYNTAX_NOT ,"policy syntax not"},
|
||||
{X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED,"policy syntax not currently supported"},
|
||||
{X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY,"policy when proxy language requires no policy"},
|
||||
{X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS ,"unable to get issuer details"},
|
||||
{X509V3_R_UNABLE_TO_GET_ISSUER_KEYID ,"unable to get issuer keyid"},
|
||||
{X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT ,"unknown bit string argument"},
|
||||
|
||||
@@ -287,6 +287,23 @@ typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES;
|
||||
DECLARE_STACK_OF(POLICYINFO)
|
||||
DECLARE_ASN1_SET_OF(POLICYINFO)
|
||||
|
||||
/* Proxy certificate structures, see RFC 3820 */
|
||||
typedef struct PROXY_POLICY_st
|
||||
{
|
||||
ASN1_OBJECT *policyLanguage;
|
||||
ASN1_OCTET_STRING *policy;
|
||||
} PROXY_POLICY;
|
||||
|
||||
typedef struct PROXY_CERT_INFO_EXTENSION_st
|
||||
{
|
||||
ASN1_INTEGER *pcPathLengthConstraint;
|
||||
PROXY_POLICY *proxyPolicy;
|
||||
} PROXY_CERT_INFO_EXTENSION;
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(PROXY_POLICY)
|
||||
DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION)
|
||||
|
||||
|
||||
#define X509V3_conf_err(val) ERR_add_error_data(6, "section:", val->section, \
|
||||
",name:", val->name, ",value:", val->value);
|
||||
|
||||
@@ -325,6 +342,7 @@ DECLARE_ASN1_SET_OF(POLICYINFO)
|
||||
#define EXFLAG_INVALID 0x80
|
||||
#define EXFLAG_SET 0x100
|
||||
#define EXFLAG_CRITICAL 0x200
|
||||
#define EXFLAG_PROXY 0x400
|
||||
|
||||
#define KU_DIGITAL_SIGNATURE 0x0080
|
||||
#define KU_NON_REPUDIATION 0x0040
|
||||
@@ -572,6 +590,7 @@ void ERR_load_X509V3_strings(void);
|
||||
#define X509V3_F_NREF_NOS 133
|
||||
#define X509V3_F_POLICY_SECTION 131
|
||||
#define X509V3_F_R2I_CERTPOL 130
|
||||
#define X509V3_F_R2I_PCI 142
|
||||
#define X509V3_F_S2I_ASN1_IA5STRING 100
|
||||
#define X509V3_F_S2I_ASN1_INTEGER 108
|
||||
#define X509V3_F_S2I_ASN1_OCTET_STRING 112
|
||||
@@ -619,6 +638,7 @@ void ERR_load_X509V3_strings(void);
|
||||
#define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103
|
||||
#define X509V3_R_EXTENSION_VALUE_ERROR 116
|
||||
#define X509V3_R_ILLEGAL_HEX_DIGIT 113
|
||||
#define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 153
|
||||
#define X509V3_R_INVALID_BOOLEAN_STRING 104
|
||||
#define X509V3_R_INVALID_EXTENSION_STRING 105
|
||||
#define X509V3_R_INVALID_NAME 106
|
||||
@@ -630,6 +650,8 @@ void ERR_load_X509V3_strings(void);
|
||||
#define X509V3_R_INVALID_OBJECT_IDENTIFIER 110
|
||||
#define X509V3_R_INVALID_OPTION 138
|
||||
#define X509V3_R_INVALID_POLICY_IDENTIFIER 134
|
||||
#define X509V3_R_INVALID_PROXY_POLICY_IDENTIFIER 147
|
||||
#define X509V3_R_INVALID_PROXY_POLICY_SETTING 151
|
||||
#define X509V3_R_INVALID_PURPOSE 146
|
||||
#define X509V3_R_INVALID_SECTION 135
|
||||
#define X509V3_R_INVALID_SYNTAX 143
|
||||
@@ -640,9 +662,16 @@ void ERR_load_X509V3_strings(void);
|
||||
#define X509V3_R_NO_ISSUER_CERTIFICATE 121
|
||||
#define X509V3_R_NO_ISSUER_DETAILS 127
|
||||
#define X509V3_R_NO_POLICY_IDENTIFIER 139
|
||||
#define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED 148
|
||||
#define X509V3_R_NO_PUBLIC_KEY 114
|
||||
#define X509V3_R_NO_SUBJECT_DETAILS 125
|
||||
#define X509V3_R_ODD_NUMBER_OF_DIGITS 112
|
||||
#define X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED 149
|
||||
#define X509V3_R_POLICY_PATH_LENGTH 152
|
||||
#define X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED 150
|
||||
#define X509V3_R_POLICY_SYNTAX_NOT 154
|
||||
#define X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED 155
|
||||
#define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 156
|
||||
#define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS 122
|
||||
#define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID 123
|
||||
#define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT 111
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
test
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
*.so
|
||||
*.so.*
|
||||
*.a
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
*.so
|
||||
*.so.*
|
||||
*.a
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -10,3 +10,5 @@ doc
|
||||
install
|
||||
rdemo
|
||||
source
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
*.so
|
||||
*.so.*
|
||||
*.a
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -2,3 +2,5 @@ example1
|
||||
example2
|
||||
example3
|
||||
example4
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
state_machine
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
tunala
|
||||
|
||||
*.flc
|
||||
semantic.cache
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user