- WARNING
NONE OF THE CODE PRESENTED HERE HAS BEEN CHECKED! The code is just examples to show you how things could be done. There might be typos or type conflicts, and you will have to resolve them.
意思就是,这里代码只是示意性的,有错别找俺。。 - Introduction
Proxy certificates are defined in RFC 3820. They are really usual certificates with the mandatory extension proxyCertInfo.
Proxy certificates are issued by an End Entity (typically a user), either directly with the EE certificate as issuing certificate, or by extension through an already issued proxy certificate. Proxy certificates are used to extend rights to some other entity (a computer process, typically, or sometimes to the user itself). This allows the entity to perform operations on behalf of the
owner of the EE certificate.
以上内容说,证书的发布可以是证书链形式。
See http://www.ietf.org/rfc/rfc3820.txt for more information. A warning about proxy certificates
No one seems to have tested proxy certificates with security in mind. To this date, it seems that proxy certificates have only been used in a context highly aware of them. Existing applications might misbehave when trying to validate a chain of certificates which use a proxy certificate. They might incorrectly consider the leaf to be the certificate to check for authorisation data, which is controlled
by the EE certificate owner. subjectAltName and issuerAltName are forbidden in proxy certificates, and this is enforced in OpenSSL. The subject must be the same as the issuer, with one commonName added on.
Possible threats we can think of at this time include:- impersonation through commonName (think server certificates).
- use of additional extensions, possibly non-standard ones used in certain environments, that would grant extra or different authorisation rights.
For these reasons, OpenSSL requires that the use of proxy certificates be explicitly allowed. Currently, this can be done using the following methods: - if the application directly calls X509_verify_cert(), it can first call:
X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS);
Where ctx is the pointer which then gets passed to X509_verify_cert(). - proxy certificate validation can be enabled before starting the application by setting the environment variable OPENSSL_ALLOW_PROXY_CERTS.
In the future, it might be possible to enable proxy certificates by editing openssl.cnf.
How to create proxy certificates
如何生成代理证书呢?
首先生成代理证书设置部分,里边包含证书信息
Creating proxy certificates is quite easy, by taking advantage of a lack of checks in the ‘openssl x509’ application (ahem). You must first create a configuration section that contains a definition of the proxyCertInfo extension, for example:
举个例子
[ v3_proxy ]A proxy certificate MUST NEVER be a CA certificate.
basicConstraints=CA:FALSE
首先代理证书不是个CA证书Usual authority key ID
authorityKeyIdentifier=keyid,issuer:always
授权KEYIDThe extension which marks this certificate as a proxy
证书扩展
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:1,policy:text:AB
It’s also possible to specify the proxy extension in a separate section:
proxyCertInfo=critical,@proxy_ext
[ proxy_ext ]
language=id-ppl-anyLanguage
pathlen=0
policy=text:BC
The policy value has a specific syntax, {syntag}:{string}, where the syntag determines what will be done with the string. The following syntags are recognised: text indicates that the string is simply bytes, without any encoding:
policy=text:räksmörgås
Previous versions of this design had a specific tag for UTF-8 text. However, since the bytes are copied as-is anyway, there is no need for such a specific tag.hex indicates the string is encoded in hex, with colons between each byte
(every second hex digit):
policy=hex:72:E4:6B:73:6D:F6:72:67:E5:73
Previous versions of this design had a tag to insert a complete DERblob. However, the only legal use for this would be to surround the bytes that would go with the hex: tag with whatever is needed to construct a correct OCTET STRING. The DER tag therefore felt superfluous, and was removed.
file indicates that the text of the policy should really be taken from a file. The string is then really a file name. This is useful for
policies that are large (more than a few lines, e.g. XML documents).
太长了,,,翻译不下去了,,,,
openssl howto代理证书
最新推荐文章于 2023-08-03 02:02:33 发布