public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiler Internal error #191, what does that mean?
@ 2002-07-24  7:16 Tat.Chan
  2002-07-24  8:12 ` Ben Elliston
  0 siblings, 1 reply; 2+ messages in thread
From: Tat.Chan @ 2002-07-24  7:16 UTC (permalink / raw)
  To: gcc-help


[-- Attachment #1.1: Type: text/plain, Size: 1308 bytes --]

Hi,

I am compiling a software library called S/MIME Freeware Library (SFL) developed by Getronics (http://www.getronicsgov.com/hot/sfl_home.htm). The library itself compiled alright on my Redhat Linux 7.3 machine. However, when I tried to compile the attached test utility program, I got the following error:

-------------------------------------------------------------------------
g++ -c -Wall -g -DLINUX -DSTDC_HEADERS   -I../../testsrc/include -I../../include -I../../libcert/include -I../../libCtilMgr/include -I../../../SMPDist/cml/include -I../../../SMPDist/Algs/crypto++4.2  -I../../../SMPDist/util/VDASnacc/cpplib/inc -I../../include/cmapi  sm_testTripleUnwrap.cpp
sm_testTripleUnwrap.cpp: In function `void testTripleUnwrap (int, char 
**)':
sm_testTripleUnwrap.cpp:234: Internal error #191.
sm_testTripleUnwrap.cpp:234: confused by earlier errors, bailing out
make: *** [sm_testTripleUnwrap.o] Error 1
-------------------------------------------------------------------------

My gcc version is 2.96 20000731 (Red Hat Linux 7.3 2.96-110)

Anyone has any idea of what that error means?

Thanks in advance.

Tat Chan
Senior Reserach Engineer
Nokia Research Center
NOKIA INC
5 Wayside Road, Burlington, MA 01803
Phone (781) 993-5776, Fax (781) 993-1907
tat.chan@nokia.com

[-- Attachment #1.2: Type: text/html, Size: 2290 bytes --]

[-- Attachment #2: testTripleWrap.cpp --]
[-- Type: TEXT/PLAIN, Size: 671 bytes --]

// testTripleWrap.cpp : Defines the entry point for the console application.
//

#ifdef WIN32
#include "stdafx.h"
#endif //WIN32
#include <stdio.h>
#include "string.h"

void    testTripleWrap(int argc, char* argv[]);
void    testTripleUnwrap(int argc, char* argv[]);
void    testSmimeV2();

int main(int argc, char* argv[])
{
   if (argc > 1 && (
       strcmp(argv[1], "/?") == 0 ||
       strstr(argv[1], "help") != NULL))
   {
      printf("USAGE: testTripleWrap [EncapContentFile.bin 1.2.?.?.? (EncapContentOid)]\n");
      return(0);
   }
   testSmimeV2();
   testTripleWrap(argc, argv);
   testTripleUnwrap(argc, argv);
   return(0);
}


[-- Attachment #3: StdAfx.cpp --]
[-- Type: TEXT/PLAIN, Size: 301 bytes --]

// stdafx.cpp : source file that includes just the standard includes
//	testTripleWrap.pch will be the pre-compiled header
//	stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"

// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

[-- Attachment #4: testTripleWrap.dsp --]
[-- Type: TEXT/PLAIN, Size: 5152 bytes --]

# Microsoft Developer Studio Project File - Name="testTripleWrap" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Console Application" 0x0103

CFG=testTripleWrap - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE 
!MESSAGE NMAKE /f "testTripleWrap.mak".
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "testTripleWrap.mak" CFG="testTripleWrap - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "testTripleWrap - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "testTripleWrap - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE 

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe

!IF  "$(CFG)" == "testTripleWrap - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386

!ELSEIF  "$(CFG)" == "testTripleWrap - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "../mimelib" /I "../../../SMPDist/util/VDASnacc/cpplib/inc" /I "../../include" /I "../../testsrc/include" /I "../../include/cmapi" /I "../../libcert/include" /I "../../libCtilMgr/include" /I "../../../SMPDist/CML/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 wsock32.lib ../../lib/libsmutild.lib ../../lib/libsmd.lib ../../lib/libCertDLLd.lib ../../lib/libCtilMgrd.lib ../../../SMPDist/util/VDASnacc/cpplib/lib/snaccCpp_d.lib ..\mimelib\Debug\mimelibd.lib ../../../SMPDist/Cml/lib/cmlasn_d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept

!ENDIF 

# Begin Target

# Name "testTripleWrap - Win32 Release"
# Name "testTripleWrap - Win32 Debug"
# Begin Group "Source Files"

# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File

SOURCE=.\sm_testTripleUnwrap.cpp
# End Source File
# Begin Source File

SOURCE=.\sm_testTripleWrap.cpp
# End Source File
# Begin Source File

SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# Begin Source File

SOURCE=.\testTripleWrap.cpp

!IF  "$(CFG)" == "testTripleWrap - Win32 Release"

!ELSEIF  "$(CFG)" == "testTripleWrap - Win32 Debug"

# SUBTRACT CPP /YX /Yc /Yu

!ENDIF 

# End Source File
# End Group
# Begin Group "Header Files"

# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File

SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"

# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Source File

SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project

[-- Attachment #5: StdAfx.h --]
[-- Type: TEXT/PLAIN, Size: 769 bytes --]

// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__E9CE8463_B0C1_11D5_803D_0000863260D8__INCLUDED_)
#define AFX_STDAFX_H__E9CE8463_B0C1_11D5_803D_0000863260D8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers

#include <stdio.h>

// TODO: reference additional headers your program requires here

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__E9CE8463_B0C1_11D5_803D_0000863260D8__INCLUDED_)

[-- Attachment #6: sm_testTripleWrap.cpp --]
[-- Type: TEXT/PLAIN, Size: 21740 bytes --]

// sm_testTripleWrap.cpp : Defines the entry point for the console application.
//

//RWC;1/31/02; MUST DISABLE SM_FREE3_TEST in order to test CAPI CTIL on win.
//RWC;1/31/02;
#define SM_FREE3_TEST

#ifdef WIN32
#include "stdafx.h"
#endif //WIN32
#include <stdio.h>
#include <stdlib.h>
#include "sm_api.h"
#include "sm_AppLogin.h"

#ifndef OLD_SFL_VERSION
using namespace SFL;
using namespace CERT;
using namespace CTIL;
using namespace SNACC;
#else
#define AsnOid CSM_OID // NOT A GOOD idea for code; kludge for testing old logic.
#endif //OLD_SFL_VERSION


// RWC; NO PATH ON THESE FILES...
#define TMPFirstSignedDataBinary "TMPFirstSignedDataBinary.dat"  
#define TMPSecondEnvelopedDataBinary  "TMPSecondEnvelopedDataBinary.dat" 
#define TMPThirdSignedDataBinary  "TMPThirdSignedDataBinary.dat" 

void testTripleWrap(int argc, char* argv[])
{
    CSMIME *pCSMIME=NULL;//DUMMY for error macro...
    CSM_AppLogin *pAppLogin;
    char *lpszError=NULL;
    CSM_Buffer *pFirstSignedDataBuffer=NULL;
    CSM_Buffer *pSecondEnvelopedDataBuffer=NULL;
    CSM_Buffer *pThirdSignedDataBuffer=NULL;
    CSM_Buffer EncapContentBuf;
    const char *msgData;
    long msgLength;
    AsnOid msgOid;
    char *pszCertificateFileNamesForEncrypters[]={
       "./CarlRSASelf.cer",            // Arbitrary certificate, no private key.
       "./AliceRSASignByCarl.cer",     // Happens to match sm_free3 CTIL login
                                       //  for later decrypt (must have private
                                       //  key).
       "./BobRSASignByCarl.cer",       // Arbitrary certificate, no private key.
       "./CAPI_RobertColestock.cer",   // NEED THIS cert to decrypt using CAPI;
                                       //   IT MUST MATCH YOUR USER ENTRY.
                                       //   (This cert can be exported from MS 
                                       //   InternetExplorer Tools/InternetOptions/
                                       //   Content/Certificates, should be in 
                                       //   the Personal Tab with YOUR NAME)
       ""};                            // NULL terminate array of data.

    SME_SETUP("testTripleWrap");
         // construct message to encrypt.
    if (argc > 2)
    {
       EncapContentBuf.SetFileName(argv[1]);
       msgData = EncapContentBuf.Access();
       msgLength = EncapContentBuf.Length();
       AsnOid TmpOid(argv[2]);
       msgOid = TmpOid;
    }
    else
    {
       msgData = "Content-Type: Text/Plain\nContent-Transfer-Encoding:7bit\n\rTestMessage\n\r";
       msgLength = strlen(msgData) + 1;
       msgOid = id_data;
    }

    // Login and setup our instance.


        ////////////////////////////////////////////////////////////////
        // SETUP login details.
        pAppLogin = new CSM_AppLogin();
        // FOR THE FOLLOWING AddLogin(...) calls, the DLL file can be in the 
        //  PATH, where you could simply specify "sm_fere3DLLd" OR "sm_capiDLLd".
#ifdef SM_FREE3_TEST
        // NOTE::: IMPORTANT::: UNFORTUNATELY it is not possible to encrypt 
        //   RSA using both SM_FREE3 AND CAPI CTILs due to the content encryption
        //   MEK construction.  This logic will only encrypt to 1 or the other
        //   for demonstration.
        pAppLogin->AddLogin("../../test/sm_free3DLLd", "sm_free3DLL ./AlicePrivRSASign.pri_12.pfx password");
#else       // SM_FREE3_TEST
#ifdef WIN32
        // NOTE:: for the Capi CTIL, that the unique ID is encapsulated in quotes 
        //  so that spaces(" ") are interpreted correctly.  This ID could be as short 
        //  as Colestock, so long as it is unique in the MS System Registry.
        // ALSO NOTE:: you will have to modify this login to match your private 
        //  key/cert in the system registry (can be seen using MS InternetExplorer, 
        //    Tools/InternetOptions/Content/Certificates, should be in the Personal
        //    Tab; you can view the subject DN from here, double click).
        pAppLogin->AddLogin("../../test/sm_capiDLLd", "sm_capiDLLd \"emailAddress=Robert.Colestock@getronicsgov.com,CN=Robert Colestock,OU=NIST,O=US Government,C=US\" MS_ENHANCED_PROV flag=signer");
        pAppLogin->AddLogin("../../test/sm_capiDLLd", "sm_capiDLLd \"emailAddress=Robert.Colestock@getronicsgov.com,CN=Robert Colestock,OU=NIST,O=US Government,C=US\" MS_ENHANCED_PROV flag=encrypter");
#endif     //WIN32  CAPI is only available in MS Windows platforms.
#endif      // SM_FREE3_TEST
#ifdef OLD_SFL_VERSION
        //NOTE:::IMPORTANT:::Any application linking to SFL 2.0 SHOULD REMOVE THESE
        //   STATEMENTS FROM THEIR LOGIC!!!!!!!!!!!!
        if (pAppLogin->m_pCSInsts2 == NULL)  // RWC; SOMETHING we need to fix.
           pAppLogin->m_pCSInsts2 = (CSM_CSInstLst *)pAppLogin->m_pCSInsts;
#endif //OLD_SFL_VERSION

        pAppLogin->UseAll();
        pAppLogin->UseAllEncryptors();


        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////
        // The 1st 2 steps DO NOT ContentInfo wrap the results.  Only the last SignedData is
        //  ContentInfo wrapped.  (This demonstrates the P772 format of triple wrapping, not
        //  the IETF MIME triple wrapping).

        ////////////////////////////////////////////////////////////////
        // FIRST setup SignedData class, and sign results
        CSM_MsgToSign MsgToSign;
        CSM_Buffer EncapContent(msgData, msgLength);// single (char *) is file.
        AsnOid     EncapContentOid(msgOid); // COULD be P772
        MsgToSign.SetEncapContent(&EncapContent, CSM_Content::CONTENT_DATA_DATA);
        MsgToSign.setContentType(EncapContentOid);
        MsgToSign.SetIncludeContentFlag(true);
        MsgToSign.SetIncludeOrigCertsFlag(true);
            /////////////////////
            // Demonstrate setting attribute.
            CSM_Time *ptmptime=new CSM_Time("2001101010", strlen("2001101010"),
                    SigningTime::generalTimeCid);
            CSM_Attrib *pAttr = new CSM_Attrib(*ptmptime);
            delete ptmptime;
            if (MsgToSign.m_pSignedAttrs == NULL)
               MsgToSign.m_pSignedAttrs = new CSM_MsgAttributes;
            if (MsgToSign.m_pSignedAttrs->m_pAttrs == NULL)
               MsgToSign.m_pSignedAttrs->m_pAttrs = new CSM_AttribLst;
            MsgToSign.m_pSignedAttrs->m_pAttrs->AppendL(pAttr);
            // DO NOT DELETE pAttr, since relinquished to m_pAttrs.
            CSM_Buffer ErrBuf;
            if (!MsgToSign.m_pSignedAttrs->CheckSignedAttrs(&ErrBuf))
               cout << "sm_testTripleWrap: We loaded an invalid attribute into the SignedAttrs.\n ";
               // CAN CHECK unsigned, enveloped and encrypted in a similar manner.

             if (MsgToSign.Sign(pAppLogin) == SM_NO_ERROR)
             {
                  cout << "sm_testTripleWrap:  Signing operation worked fine.\n";
                  cout.flush();

                 // WRITES TMP OUTPUT FILE
                 //MUST be called to force final signing operation.
                 CSM_Buffer *pbufContent = MsgToSign.GetEncodedContentInfo();
                 delete pbufContent;
                 if (MsgToSign.AccessEncodedBlob())
                 {
                       pFirstSignedDataBuffer = new CSM_Buffer(
                          MsgToSign.AccessEncodedBlob()->Access(), MsgToSign.AccessEncodedBlob()->Length());
                       MsgToSign.AccessEncodedBlob()->ConvertMemoryToFile(TMPFirstSignedDataBinary);
                 }
             }
             else
             {
                SME_THROW(22, "sm_testTripleWrap: MsgToSign.Sign(...) failed.", NULL);
             }

        ////////////////////////////////////////////////////////////////
        // SECOND, setup EnvelopedData class and encrypt SignedData.
        if (pFirstSignedDataBuffer)
        {
            CSM_MsgToEncrypt MsgToEncrypt;
            SME(MsgToEncrypt.SetEncapContent(pFirstSignedDataBuffer, CSM_Content::CONTENT_DATA_DATA));
            AsnOid oidContent(id_signedData);      // COULD be P772 OID.
            MsgToEncrypt.setContentType(oidContent);
            AsnOid oidContentEncryption(des_ede3_cbc); // OID definition in .ASN file(s)
            MsgToEncrypt.SetContentEncryptOID(&oidContentEncryption);
            MsgToEncrypt.SetIncludeOrigCertsFlag(false); 
                                 //DEFAULT, should only be necessary for DH.

            // NOW, load RecipientInfo list from certificate files.
            CSM_Buffer *pbufCert;
            CSM_RecipientInfo *pRecipInfo;
            char *ptr = pszCertificateFileNamesForEncrypters[0];
            for (int ii=1; ptr != NULL && strlen(ptr) > 0; ii++)
            {
                                    // COULD be any recipient cert, in this 
                                    //  case ONE MUST BE the originator cert
                                    //  so that we can decrypt the results.
               pbufCert = new CSM_Buffer(ptr);  //Create buffer with file contents.
               /////////////////////
               // Demonstrate Loading RSA recipient (can load any Cert-based 
               //   recip this way).  KEK is slightly more detailed.
               pRecipInfo = new CSM_RecipientInfo(*pbufCert);
               if (MsgToEncrypt.m_pRecipients == NULL)   // ONLY if we have at least 1.
                  if ((MsgToEncrypt.m_pRecipients = new CSM_RecipientInfoLst) == NULL)
                     SME_THROW(SM_MEMORY_ERROR, NULL, NULL);
               MsgToEncrypt.m_pRecipients->AppendL(pRecipInfo);
                           // NOTE:: the "AppendL(...)" call above takes the 
                           //   memory IT DOES NOT COPY THE MEMORY, SO DO NOT
                           //   DELETE "pRecipInfo.
               ptr = pszCertificateFileNamesForEncrypters[ii]; // GET next cert file name.
            }     // END for each recipient certificate file to load.
            // MsgToEncrypt.m_pUnprotectedAttrs AND 
            // MsgToEncrypt.m_pUnprotectedAttrs->CheckUnprotectedAttrs(&ErrBuf) 
            //  can be filled and checked as in CSM_MsgToSign.
            SME(MsgToEncrypt.Encrypt(pAppLogin));
            cout << "sm_testTripleWrap:  Encrypting operation worked fine.\n";
            cout.flush();
            if (MsgToEncrypt.AccessEncodedBlob())
            {
               MsgToEncrypt.AccessEncodedBlob()->ConvertMemoryToFile(
                  TMPSecondEnvelopedDataBinary);
               pSecondEnvelopedDataBuffer = new CSM_Buffer(
                  MsgToEncrypt.AccessEncodedBlob()->Access(), 
                  MsgToEncrypt.AccessEncodedBlob()->Length());
            }
        }      // END if (pFirstSignedDataBuffer)

        ////////////////////////////////////////////////////////////////
        // THIRD, setup SignedData class and sign the EnvelopedData results.
        if (pSecondEnvelopedDataBuffer)
        {
           CSM_MsgToSign MsgToSign2;
           CSM_Buffer EncapContent(pSecondEnvelopedDataBuffer->Access(), 
                                   pSecondEnvelopedDataBuffer->Length());
           AsnOid     EncapContentOid(id_envelopedData); // COULD be P772 Wrappd OID?
           MsgToSign2.SetEncapContent(&EncapContent, CSM_Content::CONTENT_DATA_DATA);
           MsgToSign2.setContentType(EncapContentOid);
           MsgToSign2.SetIncludeContentFlag(true);
           MsgToSign2.SetIncludeOrigCertsFlag(true);
           // WE WANT TO FORCE default attributes, messageDigest and contentType.
           //  YOU CAN LOAD any desired attrs as above...
           if (MsgToSign2.m_pSignedAttrs == NULL)
               MsgToSign2.m_pSignedAttrs = new CSM_MsgAttributes;

                if (MsgToSign2.Sign(pAppLogin) == SM_NO_ERROR)
                {                // SAME signature as 1st, but you could 
                                 //  change UseThis flags to change.
                     cout << "sm_testTripleWrap:  2nd Signing operation worked fine.\n";
                     cout.flush();

                    // WRITES TMP OUTPUT FILE
                    //MUST be called to force final signing operation.
                    pThirdSignedDataBuffer = MsgToSign2.GetEncodedContentInfo();
                }
                else
                {
                   SME_THROW(22, "sm_testTripleWrap: MsgToSign.Sign(...) failed.", NULL);
                }
        }      // END if (pSecondEnvelopedDataBuffer)



        ////////////////////////////////////////////////////////////////
        // Lastly, retrieve the results and place in a file.
        if (pThirdSignedDataBuffer)
        {
           pThirdSignedDataBuffer->ConvertMemoryToFile(TMPThirdSignedDataBinary);
           delete pThirdSignedDataBuffer; //DONE with results.
        }

        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////


    SME_FINISH
    SME_CATCH_SETUP
    SME_CATCH_FINISH_C22(lpszError);
    if (lpszError)
       cout << "EXCEPTION IN PROCESSING:  " << lpszError << "\n";

    if (pAppLogin)
       delete pAppLogin;

}


/***
<<<<<< from rfc2630
<<<<<< FOR SignedData/SignerInfo
...
      version is the syntax version number.  If no attribute
      certificates are present in the certificates field, the
      encapsulated content type is id-data, and all of the elements of
      SignerInfos are version 1, then the value of version shall be 1.
      Alternatively, if attribute certificates are present, the
      encapsulated content type is other than id-data, or any of the
      elements of SignerInfos are version 3, then the value of version
      shall be 3.
...
      version is the syntax version number.  If the SignerIdentifier is
      the CHOICE issuerAndSerialNumber, then the version shall be 1.  If
      the SignerIdentifier is subjectKeyIdentifier, then the version
      shall be 3.

...
<<<<<< for EnvelopedData/RecipientInfo
...
      version is the syntax version number.  If originatorInfo is
      present, then version shall be 2.  If any of the RecipientInfo
      structures included have a version other than 0, then the version
      shall be 2.  If unprotectedAttrs is present, then version shall be
      2.  If originatorInfo is absent, all of the RecipientInfo
      structures are version 0, and unprotectedAttrs is absent, then
      version shall be 0.
...
      version is the syntax version number.  If the RecipientIdentifier
      is the CHOICE issuerAndSerialNumber, then the version shall be 0.
      If the RecipientIdentifier is subjectKeyIdentifier, then the
      version shall be 2.
...
***/
void testSmimeV2()
{
    CSMIME *pCSMIME=NULL;//DUMMY for error macro...
    CSM_AppLogin *pAppLogin;
    char *lpszError=NULL;
    CSM_Buffer *pFirstSignedDataBuffer=NULL;
    CSM_Buffer *pSecondEnvelopedDataBuffer=NULL;
    CSM_Buffer EncapContentBuf;
    const char *msgData;
    long msgLength;
    AsnOid msgOid;
    char *pszCertificateFileNamesForEncrypters[]={
       "./AliceRSASignByCarl.cer",     // Happens to match sm_free3 CTIL login
                                       //  for later decrypt (must have private
                                       //  key).
       ""};                            // NULL terminate array of data.

    SME_SETUP("testSmimeV2");
    // construct message to encrypt.
    msgData = "Content-Type: Text/Plain\nContent-Transfer-Encoding:7bit\n\rTestMessage\n\r";
    msgLength = strlen(msgData) + 1;
    msgOid = id_data;

    // Login and setup our instance.


        ////////////////////////////////////////////////////////////////
        // SETUP login details.
        pAppLogin = new CSM_AppLogin();
        // FOR THE FOLLOWING AddLogin(...) calls, the DLL file can be in the 
        //  PATH, where you could simply specify "sm_fere3DLLd" OR "sm_capiDLLd".
        pAppLogin->AddLogin("../../test/sm_free3DLLd", "sm_free3DLL ./AlicePrivRSASign.pri_12.pfx password");
        pAppLogin->UseAll();
        pAppLogin->UseAllEncryptors();


        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////
        // FIRST setup SignedData class, and sign results
        CSM_MsgToSign MsgToSign;
        CSM_Buffer EncapContent(msgData, msgLength);// single (char *) is file.
        AsnOid     EncapContentOid(msgOid); // COULD be P772
        MsgToSign.SetEncapContent(&EncapContent, CSM_Content::CONTENT_DATA_DATA);
        MsgToSign.setContentType(EncapContentOid);
        MsgToSign.SetIncludeContentFlag(true);
        MsgToSign.SetIncludeOrigCertsFlag(true);

            /////////////////////
            // (SMIME V2 CANNOT HAVE SigningAttrs)Demonstrate setting attribute.

            // NOW Sign...
             if (MsgToSign.Sign(pAppLogin) == SM_NO_ERROR)
             {
                  cout << "testSmimeV2:  Signing operation worked fine.\n";
                  cout.flush();

                 // WRITES TMP OUTPUT FILE
                 //MUST be called to force final signing operation.
                 CSM_Buffer *pbufContent = MsgToSign.GetEncodedContentInfo();
                 delete pbufContent;
                 if (MsgToSign.AccessEncodedBlob())
                 {
                       pFirstSignedDataBuffer = new CSM_Buffer(
                          MsgToSign.AccessEncodedBlob()->Access(), MsgToSign.AccessEncodedBlob()->Length());
                       char pszFileName[1024];
                       sprintf(pszFileName, "SmimeV2_%s", TMPFirstSignedDataBinary);
                       MsgToSign.AccessEncodedBlob()->ConvertMemoryToFile(pszFileName);
                 }
             }
             else
             {
                SME_THROW(22, "testSmimeV2: MsgToSign.Sign(...) failed.", NULL);
             }

        ////////////////////////////////////////////////////////////////
        // SECOND, setup EnvelopedData.
            CSM_MsgToEncrypt MsgToEncrypt;
            SME(MsgToEncrypt.SetEncapContent(&EncapContent, CSM_Content::CONTENT_DATA_DATA));
            AsnOid oidContent(msgOid);
            MsgToEncrypt.setContentType(oidContent);
            AsnOid oidContentEncryption(des_ede3_cbc); // OID definition in .ASN file(s)
            MsgToEncrypt.SetContentEncryptOID(&oidContentEncryption);
            MsgToEncrypt.SetIncludeOrigCertsFlag(false); 
                                 //DEFAULT, MUST BE OFF FOR Smime V2.

            // NOW, load RecipientInfo list from certificate files.
            CSM_Buffer *pbufCert;
            CSM_RecipientInfo *pRecipInfo;
            char *ptr = pszCertificateFileNamesForEncrypters[0];
            for (int ii=1; ptr != NULL && strlen(ptr) > 0; ii++)
            {
                                    // COULD be any recipient cert, in this 
                                    //  case ONE MUST BE the originator cert
                                    //  so that we can decrypt the results.
               pbufCert = new CSM_Buffer(ptr);  //Create buffer with file contents.
               /////////////////////
               // Demonstrate Loading RSA recipient (can load any Cert-based 
               //   recip this way).  KEK is slightly more detailed.
               pRecipInfo = new CSM_RecipientInfo(*pbufCert);
               if (MsgToEncrypt.m_pRecipients == NULL)   // ONLY if we have at least 1.
                  if ((MsgToEncrypt.m_pRecipients = new CSM_RecipientInfoLst) == NULL)
                     SME_THROW(SM_MEMORY_ERROR, NULL, NULL);
               MsgToEncrypt.m_pRecipients->AppendL(pRecipInfo);
                           // NOTE:: the "AppendL(...)" call above takes the 
                           //   memory IT DOES NOT COPY THE MEMORY, SO DO NOT
                           //   DELETE "pRecipInfo.
               ptr = pszCertificateFileNamesForEncrypters[ii]; // GET next cert file name.
            }     // END for each recipient certificate file to load.
            // MsgToEncrypt.m_pUnprotectedAttrs AND 
            // MsgToEncrypt.m_pUnprotectedAttrs->CheckUnprotectedAttrs(&ErrBuf) 
            //  can be filled and checked as in CSM_MsgToSign.
            SME(MsgToEncrypt.Encrypt(pAppLogin));
            cout << "testSmimeV2:  Encrypting operation worked fine.\n";
            cout.flush();
            if (MsgToEncrypt.AccessEncodedBlob())
            {
               char pszFileName[1024];
               sprintf(pszFileName, "SmimeV2_%s", TMPSecondEnvelopedDataBinary);
               MsgToEncrypt.AccessEncodedBlob()->ConvertMemoryToFile(
                  pszFileName);
            }



        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////


    SME_FINISH
    SME_CATCH_SETUP
    SME_CATCH_FINISH_C22(lpszError);
    if (lpszError)
       cout << "EXCEPTION IN PROCESSING:  " << lpszError << "\n";

    if (pAppLogin)
       delete pAppLogin;

}



// EOF    sm_testTripleWrap.cpp

[-- Attachment #7: sm_testTripleUnwrap.cpp --]
[-- Type: TEXT/PLAIN, Size: 12029 bytes --]

// sm_testTripleUnwrap.cpp : Defines the entry point for the console application.
//
#ifdef WIN32
#include "stdafx.h"
#endif //WIN32
#include <stdio.h>
#include <stdlib.h>
#include "sm_api.h"
#include "sm_AppLogin.h"

#ifndef OLD_SFL_VERSION
using namespace SFL;
using namespace CERT;
using namespace CTIL;
using namespace SNACC;
#endif //OLD_SFL_VERSION

#define TMPFirstSignedDataBinary "./TMPFirstSignedDataBinaryU.dat"  
#define TMPSecondEnvelopedDataBinary  "./TMPSecondEnvelopedDataBinaryU.dat" 
#define TMPThirdSignedDataBinary  "./TMPThirdSignedDataBinary.dat" 

void testTripleUnwrap(int argc, char* argv[])
{
    CSMIME *pCSMIME=NULL;//DUMMY for error macro...
    CSM_AppLogin *pAppLogin;
    char *lpszError=NULL;
    CSM_Buffer *pFirstSignedDataBuffer=NULL;
    CSM_Buffer *pSecondEnvelopedDataBuffer=NULL;
    CSM_Buffer *pThirdSignedDataBuffer=NULL;

    SME_SETUP("testTripleUnwrap");
         // construct message to encrypt.
        char *lpszExpected_msgStr = "Content-Type: Text/Plain\nContent-Transfer-Encoding:7bit\n\rTestMessage\n\r";
        // Login and setup our instance.


        ////////////////////////////////////////////////////////////////
        // SETUP login details.
        pAppLogin = new CSM_AppLogin();
        pAppLogin->AddLogin("sm_free3DLLd", "sm_free3DLL ./AlicePrivRSASign.pri_12.pfx password");
        pAppLogin->UseAll();
        pAppLogin->UseAllEncryptors();
#ifdef WIN32
        // NOTE:: See CAPI CTIL Login notes in sm_testTripleWrap.cpp.
        pAppLogin->AddLogin("../../test/sm_capiDLLd", "sm_capiDLLd \"emailAddress=Robert.Colestock@getronicsgov.com,CN=Robert Colestock,OU=NIST,O=US Government,C=US\" MS_ENHANCED_PROV flag=signer");
        pAppLogin->AddLogin("../../test/sm_capiDLLd", "sm_capiDLLd \"emailAddress=Robert.Colestock@getronicsgov.com,CN=Robert Colestock,OU=NIST,O=US Government,C=US\" MS_ENHANCED_PROV flag=encrypter");
#endif   //WIN32
#ifdef OLD_SFL_VERSION
        //NOTE:::IMPORTANT:::Any application linking to SFL 2.0 SHOULD REMOVE THESE
        //   STATEMENTS FROM THEIR LOGIC!!!!!!!!!!!!
        if (pAppLogin->m_pCSInsts2 == NULL)  // RWC; SOMETHING we need to fix.
           pAppLogin->m_pCSInsts2 = (CSM_CSInstLst *)pAppLogin->m_pCSInsts;
#endif //OLD_SFL_VERSION


        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////
        // The last 2 steps DO NOT expect a ContentInfo wrapped result.  Only the outer SignedData is
        //  ContentInfo wrapped.  (This demonstrates the P772 format of triple wrapping, not
        //  the IETF MIME triple wrapping).

        ////////////////////////////////////////////////////////////////
        // FIRST setup SignedData class, and Verify outer results
        CSM_MsgToVerify MsgToVerify;
        CSM_Buffer OriginalInputMessage(TMPThirdSignedDataBinary);  
                                 // FROM Wrap test in this project.
        CSM_ContentInfoMsg contentInfo(&OriginalInputMessage);
        if (!contentInfo.IsSignedData())
        {
           SME_THROW(SM_UNKNOWN_ERROR, "content doesn't contain a SignedData", NULL);
        }
        // Load into buffer for later use (demonstration only).
        pThirdSignedDataBuffer = new CSM_Buffer(
           contentInfo.AccessEncapContent()->m_content.Access(),
           contentInfo.AccessEncapContent()->m_content.Length());
        // Pre-process the message in case the application must fill in other info.
        if (MsgToVerify.PreProc(pAppLogin, 
              &(contentInfo.AccessEncapContent()->m_content), NULL) == 
              SM_NO_ERROR)
        {
           // Here, the app would attempt to fill in cert from an outside source
           //  if necessary (e.g. ldap).  Usually, the cert if provided (as 
           //  in this case from the Wrap demo).
           if (MsgToVerify.Verify(pAppLogin) == SM_NO_ERROR)
           {
               // Access verify info directly here.  Reported again afterward.
               CSM_MsgSignerInfo  *pTmpSI;
               long lCount=0;
               for (pTmpSI = MsgToVerify.m_pSignerInfos->SetCurrToFirst();
                    pTmpSI; pTmpSI = MsgToVerify.m_pSignerInfos->GoNext())
                    {
                       if (pTmpSI->IsVerified())
                       cout << "Number "
                            << ++lCount
                            << " signer info WAS VERIFIED.\n";
                       CSM_RecipientIdentifier *pTmpSID = 
                          new CSM_RecipientIdentifier(*pTmpSI->AccessSignerInfo()->sid);
                       pTmpSID->ReportMsgData(cout);
                       if (pTmpSID)
                           delete pTmpSID;
                    }
               MsgToVerify.ReportMsgData(cout);  
                     // ALSO prints out verify report.
                     // NOTE::: All of the higher-level classes have a report 
                     //    method taking an "ostream" operator.  You can use 
                     //       strstream AA; MsgToVerify.ReportMsgData(AA);
                     //       char *ptr=AA;  //returns a character pointer
                     //       to the report produced by the CSM_MsgToVerify
                     //       for any memory, internal based log result.
               pSecondEnvelopedDataBuffer = new CSM_Buffer(
                  MsgToVerify.AccessEncapContent()->m_content.Access(), 
                  MsgToVerify.AccessEncapContent()->m_content.Length());
               pSecondEnvelopedDataBuffer->ConvertMemoryToFile(TMPSecondEnvelopedDataBinary);
           }
           else
           {
              SME_THROW(22, "sm_testTripleUnwrap:  Verify(...) failed.", NULL);
           }
        }

        ////////////////////////////////////////////////////////////////
        // SECOND, decrypt EnvelopedData class and save SignedData.
        CSM_MsgToDecrypt MsgToDecrypt;
        if (pSecondEnvelopedDataBuffer && 
            MsgToVerify.AccessEncapContent()->m_contentType == id_envelopedData)
        {
            /* RWC; NORMALLY, EnvelopedData is encapsulated in a ContentInfo.
            //  IN this case, it is raw, not wrapped.  This is how to handle it
            //  if it is wrapped:
            CSM_ContentInfoMsg contentInfo(pSecondEnvelopedDataBuffer);
            if (!contentInfo.IsEnvelopedData())
               SME_THROW(SM_UNKNOWN_ERROR, "content doesn't contain an EnvelopedData",
                  NULL);*/

               // Pre Process the encoded blob
            SME(MsgToDecrypt.PreProc(pAppLogin, pSecondEnvelopedDataBuffer));
            SME(MsgToDecrypt.Decrypt(pAppLogin));
            // FINISHED decrypting; the PreProc will align only the 1st valid 
            //  RecipientInfo.  This logic checks which RecipientInfo was 
            //  decrypted.
            MsgToDecrypt.ReportMsgData(cout);
#ifdef WIN32
            // THE FOLLOWING re-decrypt operation is not necessary, it simply 
            //  demonstrates how to manipulate the login list to target a 
            //  specific private key after CSM_MsgToDecrypt::PreProc(...).
            //  (RWC;It also forces the CAPI CTIL to be invoked, if setup 
            //   properly.)
            pAppLogin->ClearFlag(SM_INST_ALL/*SM_INST_APPLICABLE*/);  
                        // CLEAR all flags, no login will be used for decryption.
            bool bFound=false;
            for (CSM_CSInst *tmpInst = pAppLogin->m_pCSInsts2->SetCurrToFirst(); tmpInst;
                tmpInst = pAppLogin->m_pCSInsts2->GoNext())
            {
               if (strncmp(tmpInst->AccessID(), "CAPI", 4) == 0)
               {     // See if this is a CAPI CTIL (the string is unique for the 
                     //  logins, but the 1st 4 letters are "CAPI".  It will 
                     //  pick up both signer and encrypter.
                  tmpInst->SetApplicable();  // ONLY allow this login to decrypt.
                  tmpInst->SetUseThis();
                  bFound = true;
               }     // END if CAPI CTIL.
            }        // END for each login.
            if (bFound)    // re-attempt to decrypt with CAPI specific login(s).
            {
               //RWC;THIS WORKS, forcing the CAPI CTIL to process the same message.
               //  There are some games being played here for MS CAPI that can cause
               //  problems if you mix CTILs (as in this case for the unwrap). 
               //  For example, it is not possible to use CAPI to get the MEK, then
               //  use the free3 CTIL to decrypt the content.  They must be 
               //  consistent.  This is why the WRAP operation MUST be performed by
               //  one or the other, but not both.
                  SME(MsgToDecrypt.Decrypt(pAppLogin));  // RE-Decrypt to CAPI
                  cout << "  sm_testTripleUnwrap:  2nd Decryption, CAPI attempt.\n";
                  MsgToDecrypt.ReportMsgData(cout);
            }
#endif       // WIN32
            cout << "sm_testTripleUnwrap:  Decrypting operation worked fine.\n";
            cout.flush();
            pFirstSignedDataBuffer = new CSM_Buffer(
               MsgToDecrypt.AccessEncapContent()->m_content.Access(), 
               MsgToDecrypt.AccessEncapContent()->m_content.Length());
            pFirstSignedDataBuffer->ConvertMemoryToFile(TMPFirstSignedDataBinary);
        }      // END if pSecondEnvelopedDataBuffer


        ////////////////////////////////////////////////////////////////
        // THIRD, setup SignedData class and sign the EnvelopedData results.
        if (pFirstSignedDataBuffer &&
            MsgToDecrypt.AccessEncapContent()->m_contentType == id_signedData)

        {
           CSM_MsgToVerify MsgToVerify2;
           /* RWC; NORMALLY, SignedData is encapsulated in a ContentInfo.
            // IN this case, it is raw, not wrapped...
           CSM_ContentInfoMsg contentInfo(pFirstSignedDataBuffer);
           if (!contentInfo.IsSignedData())
           {
              SME_THROW(SM_UNKNOWN_ERROR, "content doesn't contain a SignedData", NULL);
           }*/
           // Pre-process the message in case the application must fill in other info.
           if (MsgToVerify2.PreProc(pAppLogin, pFirstSignedDataBuffer, NULL) == 
                 SM_NO_ERROR)
           {
              if (MsgToVerify2.Verify(pAppLogin) == SM_NO_ERROR)
              {
                  cout << "########### OUTER SIGNED DATA RESULTS. ########\n";
                  MsgToVerify2.ReportMsgData(cout);  // SIMPLY report success/failure.
                  CSM_Buffer *pOrigContent = new CSM_Buffer(
                     MsgToVerify2.AccessEncapContent()->m_content.Access(), 
                     MsgToVerify2.AccessEncapContent()->m_content.Length());
                  if (strcmp(pOrigContent->Access(), lpszExpected_msgStr) == 0)
                     cout << "####### OUTER SIGNED DATA CONTENT matched original.\n";
                  else
                     cout << "####### OUTER SIGNED DATA CONTENT DID NOT matched original.\n";
              }
              else
              {
                 SME_THROW(22, "sm_testTripleUnwrap:  Verify(...) failed.", NULL);
              }
           }
        }      // END if (pSecondEnvelopedDataBuffer)



        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////


        
	SME_FINISH
        SME_CATCH_SETUP
	SME_CATCH_FINISH_C22(lpszError);
	if (lpszError)
	  cout << "EXCEPTION IN PROCESSING:  " << lpszError << "\n";

}




// EOF    sm_testTripleUnwrap

[-- Attachment #8: Makefile --]
[-- Type: TEXT/PLAIN, Size: 2930 bytes --]

#
# Modify these variables as necessary for your specific
# environment.
#
#

# C++ Compiler information
CC            = gcc
CXX           = g++

# AR information
AR            = ar
ARFLAGS       = ruv

##RWC;5/1/01;CFLAGS        = -Wall -ftraditional-cpp -DLINUX -DSTDC_HEADERS -U__GNUC__
CFLAGS        = -Wall -ftraditional-cpp -DLINUX -DSTDC_HEADERS
CXXFLAGS      = -Wall -g -DLINUX -DSTDC_HEADERS 

LFLAG1		= -shared -g -rdynamic -Wl,-soname,$(LIBRARYOUT)
LFLAG2		=
# DO NOT MODIFY these varialbles unless you have to.
#

# Directory where SNACC header files reside was installed in
#
SNACCDIR      = ../../../SMPDist/util/VDASnacc/cpplib/inc

# Directory where Crypto++ headers are
#
#CRYPTO3++      = ../../../crypto++.30
#CRYPTO3++      = ../../../SMPDist/Algs/crypto++3.2
CRYPTO++      = ../../../SMPDist/Algs/crypto++4.2

# Directory where CMAPI headers are located
#
CMAPI         = ../../include/cmapi

# Directory where BSAFE was installed
BSAFE         = ../../../SMPDist/Algs/BSafe60

# Directory where CML was installed
CML	      = ../../../SMPDist/cml

# Directory where CI Library was installed
#
CI_PATH       = /usr2/msp/litronic


#
# END OF NOT MODIFY

# Directory where SNACC compiler lives.  This is a only used if if the .asn
# files in the ./libsrc/asn1 directory need to be compiled.
#
SNACC         = snacc
SNACCFLAGS    = -D -C -u ../../../SMPDist/util/VDASnacc/cpplib/asn1/asn-usefulVDA.asn1

# Indicate whether this system uses 'ranlib'.  
RANLIB        =
INCLUDE = -I../../testsrc/include -I../../include -I../../libcert/include \
	-I../../libCtilMgr/include -I$(CML)/include \
	-I$(CRYPTO++)  -I$(SNACCDIR) -I$(CMAPI) \


# uncomment this line if linking with BSAFE and Common CTILs
#LIBPATH = -L../../lib

LIBPATH = -L../../lib -L$(CRYPTO++)  \
	-L../../../SMPDist/util/VDASnacc/cpplib/lib \
	-L../../../SMPDist/cml/lib \
	-L../../libcert 


LIBS     = $(LIBPATH) -lsmutil -lsm -lcert -lsmutil -lasn1c++ -lcmlasn_d -ldl

OBJS = sm_testTripleUnwrap.o sm_testTripleWrap.o  testTripleWrap.o


TARGET = testTripleWrap
MIMETARGET = $(TARGET)

all: $(TARGET)

clean:
	rm *.o
	rm *.a
	rm -f $(OBJS) 
bare: clean
	rm -f $(TARGET)

$(OBJS):
	$(CXX) -c $(CXXFLAGS) $(CMNFLGS) $(INCLUDE) $*.cpp


testTripleWrap: $(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LFLAG2)


.SUFFIXES : .asn .cpp .cpp.o 

.asn.cpp: 
	snacc $(SNACCFLAGS) $(ASNEXTERN) $(ASNMODULES)
	make $(ASNMODCPP)
	make cleanup
cleanup:
	for asnfile in $(ASNEXTERN); do \
	  strip=`basename $$asnfile`; \
	  strip2=`echo $$strip | sed "s/\.asn//"`; \
	  rm -f $$strip2.[Ch]; \
	  rm -f $$strip2.cpp; \
	done
.c.o:
	$(CC) -c $(CFLAGS) $(CMNFLGS) $(INCLUDE) $<
.C.cpp:
	mv $*.C $*.cpp
	@if [ ! "$(ASN_H_PATH)" = "" ]; then \
	    mv $*.h $(ASN_H_PATH); \
	fi
.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(CMNFLGS) $(INCLUDE) $<  -o$*.o


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Compiler Internal error #191, what does that mean?
  2002-07-24  7:16 Compiler Internal error #191, what does that mean? Tat.Chan
@ 2002-07-24  8:12 ` Ben Elliston
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Elliston @ 2002-07-24  8:12 UTC (permalink / raw)
  To: Tat.Chan; +Cc: gcc-help

>>>>> "Tat" == Tat Chan <Tat.Chan@nokia.com> writes:

  Tat> I am compiling a software library called S/MIME Freeware
  Tat> Library (SFL) developed by Getronics
  Tat> (http://www.getronicsgov.com/hot/sfl_home.htm). The library
  Tat> itself compiled alright on my Redhat Linux 7.3
  Tat> machine. However, when I tried to compile the attached test
  Tat> utility program, I got the following error:

  Tat> sm_testTripleUnwrap.cpp:234: Internal error #191.
  Tat> sm_testTripleUnwrap.cpp:234: confused by earlier errors, bailing out

  Tat> Anyone has any idea of what that error means?

It means that it an internal error occurred within the compiler -- and
this should (almost) never happen.  Can you try compiling your program
with the latest version of GCC and, if pain persists, please submit a
bug report (including your source file).

Ben

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-24 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-24  7:16 Compiler Internal error #191, what does that mean? Tat.Chan
2002-07-24  8:12 ` Ben Elliston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).