您如何在CRL_DIST_POINT结构中默认字段? [英] How do you default fields in the CRL_DIST_POINT structure?

查看:72
本文介绍了您如何在CRL_DIST_POINT结构中默认字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http: //msdn.microsoft.com/zh-CN/library/windows/desktop/aa379874(v=vs.85).aspx

定义

typedef struct _CRL_DIST_POINT {
  CRL_DIST_POINT_NAME DistPointName;
  CRYPT_BIT_BLOB     ReasonFlags;
  CERT_ALT_NAME_INFO  CRLIssuer;
} CRL_DIST_POINT

typedef struct _CRL_DIST_POINT {
  CRL_DIST_POINT_NAME DistPointName;
  CRYPT_BIT_BLOB      ReasonFlags;
  CERT_ALT_NAME_INFO  CRLIssuer;
} CRL_DIST_POINT

并说:

A CRL_DIST_POINT_NAME 结构,用于标识CRL源的位置.如果 NULL ,分发点名称默认为 CRLIssuer 名称.

A CRL_DIST_POINT_NAME structure that identifies the location of a CRL source. If NULL, the distribution point name defaults to the CRLIssuer name.

A CRYPT_BIT_BLOB ,其中包含一个字节,用于指示CRL所涵盖的吊销原因.

A CRYPT_BIT_BLOB that contains a byte that indicates the revocation reasons covered by the CRL.

如果 NULL ,则指示的CRL分发点将分发一个CRL,如果该证书已被吊销,则将包含该证书的条目,而不考虑吊销原因.

If NULL, the indicated CRL distribution point distributes a CRL that will contain an entry for this certificate if this certificate has been revoked, regardless of the revocation reason.

我该如何编写代码以使 DistPointName和ReasonFlags为NULL?

How would I write code to make DistPointName and ReasonFlags NULL ?

CRL_DIST_POINT crlPoint;

crlPoint.ReasonFlags = NULL;

crlPoint.CRLIssuer = NULL;

出现以下错误:

1> c:\ users \ andrew \ src2011 \ c ++ \ win32 \ io \ httpcrypto.cpp(441):错误C2679:二进制'=' (或没有可接受的转化)

1>c:\users\andrew\src2011\c++\win32\io\httpcrypto.cpp(441): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)

1> c:\ program files(x86)\ microsoft sdks \ windows \ v7.0a \ include \ wincrypt.h(1929):可能是'_CRYPT_BIT_BLOB& _CRYPT_BIT_BLOB :: operator =(const _CRYPT_BIT_BLOB&)'

1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\wincrypt.h(1929): could be '_CRYPT_BIT_BLOB &_CRYPT_BIT_BLOB::operator =(const _CRYPT_BIT_BLOB &)'

1>尝试匹配参数列表'(CRYPT_BIT_BLOB,int)'

1> while trying to match the argument list '(CRYPT_BIT_BLOB, int)'

1> c:\ users \ andrew \ src2011 \ c ++ \ win32 \ io \ httpcrypto.cpp(442):错误C2679:二进制'=':未找到采用'int'类型的右侧操作数的运算符(或没有可接受的转化)

1>c:\users\andrew\src2011\c++\win32\io\httpcrypto.cpp(442): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int' (or there is no acceptable conversion)

1> c:\ program files(x86)\ microsoft sdks \ windows \ v7.0a \ include \ wincrypt.h(4014):可能是'_CERT_ALT_NAME_INFO& _CERT_ALT_NAME_INFO :: operator =(const _CERT_ALT_NAME_INFO&)'

1> c:\program files (x86)\microsoft sdks\windows\v7.0a\include\wincrypt.h(4014): could be '_CERT_ALT_NAME_INFO &_CERT_ALT_NAME_INFO::operator =(const _CERT_ALT_NAME_INFO &)'

1>尝试匹配参数列表'(CERT_ALT_NAME_INFO,int)'

1> while trying to match the argument list '(CERT_ALT_NAME_INFO, int)'

 

谢谢.

 

 

 

推荐答案

在2011年11月23日下午4:51,Andrew7Webb写道:

On 11/23/2011 4:51 PM, Andrew7Webb wrote:

http://msdn.microsoft.com/en-us/库/windows/desktop/aa379874 (v = vs.85).aspx

定义

typedef struct _CRL_DIST_POINT {
   CRL_DIST_POINT_NAME DistPointName;
   CRYPT_BIT_BLOB      ReasonFlags;
   CERT_ALT_NAME_INFO  CRLIssuer;
} CRL_DIST_POINT

并说:* DistPointName *

A
* CRL_DIST_POINT_NAME *< http://msdn.microsoft.com/zh-我们/library/windows/desktop/aa379877 (v = vs.85).aspx>
标识CRL源位置的结构.如果* NULL *,则
分发点名称默认为* CRLIssuer *名称.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa379874(v=vs.85).aspx

defines

typedef struct _CRL_DIST_POINT {
   CRL_DIST_POINT_NAME DistPointName;
   CRYPT_BIT_BLOB      ReasonFlags;
   CERT_ALT_NAME_INFO  CRLIssuer;
} CRL_DIST_POINT

and says:*DistPointName*

A
*CRL_DIST_POINT_NAME*<http://msdn.microsoft.com/en-us/library/windows/desktop/aa379877(v=vs.85).aspx>
structure that identifies the location of a CRL source. If*NULL*, the
distribution point name defaults to the *CRLIssuer* name.

我怀疑文档为NULL表示其dwDistPointNameChoice成员设置为CRL_DIST_POINT_NO_NAME.

I suspect that by NULL the doc means that its dwDistPointNameChoice member is set to CRL_DIST_POINT_NO_NAME.

* ReasonFlags *
A
* CRYPT_BIT_BLOB *< http://msdn.microsoft.com/zh-我们/library/windows/desktop/aa381165 (v = vs.85).aspx>
包含一个字节,该字节指示
所涵盖的吊销原因 CRL.

如果为* NULL *,则指示的CRL分发点分发CRL
如果该证书将包含该证书的条目
无论吊销原因如何,都已被吊销.

*ReasonFlags*
A
*CRYPT_BIT_BLOB*<http://msdn.microsoft.com/en-us/library/windows/desktop/aa381165(v=vs.85).aspx>
that contains a byte that indicates the revocation reasons covered by
the CRL.

If *NULL*, the indicated CRL distribution point distributes a CRL
that will contain an entry for this certificate if this certificate
has been revoked, regardless of the revocation reason.

这里NULL可能意味着CRYPT_BIT_BLOB的所有三个字段都设置为0或NULL.

And here NULL likely means that all three fields of CRYPT_BIT_BLOB are set to 0 or NULL.


这篇关于您如何在CRL_DIST_POINT结构中默认字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆