[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] AW: problem about dealing with pkcs12 file



Please ensure to add the IAIK provider.
 
Dieter Bratko
-----Ursprüngliche Nachricht-----
Von: Endrew [mailto:98050132d@polyu.edu.hk]
Gesendet: Freitag, 13. Oktober 2000 21:16
An: Dieter.Bratko@iaik.at; iaik-jce@iaik.at
Betreff: problem about dealing with pkcs12 file

I get the error message "iaik.pkcs.PKCSException: java.security.NoSuchAlgorithmException: Algorithm PKCS#12-MAC not available" when I run the followings code:
 
try{
        InputStream is = new FileInputStream(myfile);
                  
        PKCS12 myp12 = new PKCS12(is);
        char[] password= "12345678".toCharArray();
        

        if (myp12.verify(password)== true){
            myp12.decrypt(password);
           }
        else {
        System.out.println("not verify");}
}
catch(IOException ioe){System.out.println(ioe.toString());}
catch (PKCSParsingException pkcspe){System.out.println(pkcspe.toString());}
catch (PKCSException pkcse){System.out.println(pkcse.toString());}
 
It cant run the IF ELSE statement due to that error message.
It seems the problem occured in the method verify() and decrypt(), any one can help me ?

***************************************************************************
*                                                                         *
* IAIK S/MIME Mapper Security Info                                        *
* ===================================                                     *
*                                                                         *
* for message:                                                            *
*   From: "dbratko" <Dieter.Bratko@iaik.at>                               *
*   Date: Mon, 16 Oct 2000 12:35:39 +0200                                 *
*   Subject: [iaik-jce] AW: problem about dealing with pkcs12 file        *
*                                                                         *
* Message S/MIME properties:                                              *
*                                                                         *
*   Encrypted using:    not encrypted                                     *
*                                                                         *
*   Digitally signed:   yes                                               *
*   Signature valid:    yes                                               *
*   Signature trusted:  yes                                               *
*                                                                         *
*                                                                         *
* Compliance with policy for email addresses *@iaik.at:                   *
*                                                                         *
*   Encryption:         OK (None or better required)                      *
*                                                                         *
*   Digital Signature:  OK (digital signature required)                   *
*                                                                         *
***************************************************************************