34 const long startPos = stell( stream );
50 status = getStreamObjectLength( stream, &length );
55 tag = peekTag( stream );
58 readGenericHole( stream, NULL, 16, tag );
62 queryInfo->version =
value;
108 DEBUG_DIAG((
"Found unknown RecipientInfo %X", tag ));
116 sseek( stream, startPos );
117 return( sMemDataLeft( stream ) < queryInfo->size ? \
131 const long startPos = stell( stream );
145 status = pgpReadPacketHeader( stream, &ctb, &length, 8 );
150 offset = stell( stream );
153 queryInfo->size = ( offset -
startPos ) + length;
175 DEBUG_DIAG((
"Found unrecognised ctb %X", ctb ));
182 return( ( sMemDataLeft( stream ) < length ) ? \
200 const long startPos = stell( stream );
211 status = getObjectInfo( stream, &basicQueryInfo );
216 switch( basicQueryInfo.
type )
220 const READKEK_FUNCTION readKekFunction = \
223 if( readKekFunction == NULL )
225 status = readKekFunction( stream, queryInfo );
231 const READKEYTRANS_FUNCTION readKeytransFunction = \
235 if( readKeytransFunction == NULL )
237 status = readKeytransFunction( stream, queryInfo );
243 const READSIG_FUNCTION readSigFunction = \
247 if( readSigFunction == NULL )
249 status = readSigFunction( stream, queryInfo );
255 status = readUniversal( stream );
261 sseek( stream, startPos );
270 queryInfo->formatType = basicQueryInfo.
formatType;
271 queryInfo->type = basicQueryInfo.
type;
272 queryInfo->size = basicQueryInfo.
size;
273 queryInfo->version = basicQueryInfo.
version;
285 const long startPos = stell( stream );
296 status = getPgpPacketInfo( stream, &basicQueryInfo );
297 sseek( stream, startPos );
302 switch( basicQueryInfo.
type )
306 const READKEK_FUNCTION readKekFunction = \
309 if( readKekFunction == NULL )
311 status = readKekFunction( stream, queryInfo );
317 const READKEYTRANS_FUNCTION readKeytransFunction = \
320 if( readKeytransFunction == NULL )
322 status = readKeytransFunction( stream, queryInfo );
328 const READSIG_FUNCTION readSigFunction = \
331 if( readSigFunction == NULL )
333 status = readSigFunction( stream, queryInfo );
339 status = readPgpOnepassSigPacket( stream, queryInfo );
345 sseek( stream, startPos );
354 queryInfo->formatType = basicQueryInfo.
formatType;
360 queryInfo->type = basicQueryInfo.
type;
362 queryInfo->size = basicQueryInfo.
size;
363 if( queryInfo->version == 0 )
370 queryInfo->version = basicQueryInfo.
version;
398 if( !
isReadPtr( objectData, objectDataLength ) )
408 sMemConnect( &stream, (
void * ) objectData, length );
409 status = value = sPeek( &stream );
412 sMemDisconnect( &stream );
416 status = queryAsn1Object( &stream, &queryInfo );
420 status = queryPgpObject( &stream, &queryInfo );
425 sMemDisconnect( &stream );
430 cryptObjectInfo->objectType = queryInfo.
type;
431 cryptObjectInfo->cryptAlgo = queryInfo.
cryptAlgo;
432 cryptObjectInfo->cryptMode = queryInfo.
cryptMode;
434 cryptObjectInfo->hashAlgo = queryInfo.
hashAlgo;
438 memcpy( cryptObjectInfo->salt, queryInfo.salt, queryInfo.
saltLength );
439 cryptObjectInfo->saltSize = queryInfo.
saltLength;