24 #define HTTP_BUFFER_SIZE 4096
48 case CRYPT_IKEYID_KEYID:
51 case CRYPT_IKEYID_ISSUERID:
52 return(
"iAndSHash" );
54 case CRYPT_IKEYID_CERTID:
82 HTTP_INFO *httpInfo = keysetInfoPtr->keysetHTTP;
92 assert(
isReadPtr( keyID, keyIDlength ) );
99 REQUIRES( auxInfo == NULL && *auxInfoLength == 0 );
103 if( keyIDlength != 6 ||
strCompare( keyID,
"[none]", 6 ) )
109 hasExplicitKeyID =
TRUE;
113 if( keysetInfoPtr->keyData == NULL )
116 if( ( keysetInfoPtr->keyData =
clAlloc(
"getItemFunction", \
117 HTTP_BUFFER_SIZE ) ) == NULL )
119 keysetInfoPtr->keyDataSize = HTTP_BUFFER_SIZE;
124 if( hasExplicitKeyID )
126 const char *keyName =
getKeyName( keyIDtype );
130 keyNameLen = strlen( keyName );
132 keysetInfoPtr->keyDataSize, &httpReqInfo );
133 memcpy( httpReqInfo.attribute, keyName, keyNameLen );
135 memcpy( httpReqInfo.value, keyID, keyIDlength );
141 keysetInfoPtr->keyDataSize );
156 status = sread( &httpInfo->
stream, &httpDataInfo,
163 keysetInfoPtr->keyData = httpDataInfo.buffer;
164 keysetInfoPtr->keyDataSize = httpDataInfo.
bufSize;
168 sNetGetErrorInfo( &httpInfo->
stream, &keysetInfoPtr->errorInfo );
175 sClearError( &httpInfo->
stream );
184 status = getLongObjectLength( keysetInfoPtr->keyData,
208 HTTP_INFO *httpInfo = keysetInfoPtr->keysetHTTP;
222 connectInfo.name =
name;
224 connectInfo.
port = 80;
226 &connectInfo, &keysetInfoPtr->errorInfo );
243 HTTP_INFO *httpInfo = keysetInfoPtr->keysetHTTP;
249 sNetDisconnect( &httpInfo->
stream );
250 if( keysetInfoPtr->keyData != NULL )
252 zeroise( keysetInfoPtr->keyData, keysetInfoPtr->keyDataSize );
253 clFree(
"getItemFunction", keysetInfoPtr->keyData );
254 keysetInfoPtr->keyData = NULL;
268 keysetInfoPtr->initFunction = initFunction;
269 keysetInfoPtr->shutdownFunction = shutdownFunction;
270 keysetInfoPtr->getItemFunction = getItemFunction;