Converting a .pfx certificate to x509 format

Hi Java Gurus,
I am not able to convert .pfx certificate to x509 format. The jdk1.3 keytool command is not recognizing it.
I have to do the following.
1. Open internet explorer
2. Type website address, click on go
3. Browser pops a "Client Authencitation" window.
I click the required certificate and click on ok
4. Get connected to the website
Now how do I do the same thing from the command line using a Java Client.
Any help/hints/guidance is highly appericiated.
Thanx in advance
Moses

If you have windows 2000, you can convert the cert to PKCS#7 format by (1) install the cert within windows; (2) goto Run and type in MMC and add the component "Certificates"; (3) find the cert listed and right-click and select Export. This will allow you to export the file out in a couple differing formats, including PKCS#7 (*.p7b) which keytool will see as a valid cert chain. (Make sure when you export as *p7b file, you check the option for "Include all certificates...")                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How to convert a PFX file into mobileconfig format?

    Hi,
    I'm trying to automate the task of creating a mobileconfig file with a client certificate in it.
    I understand that this is some kind of base64 encoding, but I don't get what they're encoding.
    My PFX files are protected with a password (Although I tried to create a PFX without the password, and the base64 version of it differs from the .mobileconfig from iPCU version of it).
    I already saw Alginald99 tip in: https://discussions.apple.com/message/15080631
    That tip didn't work for me. When I convert my PFX file to base64, the encoded string is nothing like the string in the .mobileconfig I created by iPCU.
    Alginald99 - If you're still hang here - please help!
    Thanks,
    Bar.

    Yes, the key container GUID and the cert container GUID are different. That's normal.
    You can reproduce this:
    Delete the cert in windows mmc/certificate console, reimport the same cert in mmc/certificate and import this cert in iPCU. You can see the difference in mobileconfig.
    Catch only the cert part from mobileconfig and dump it with <certutil.exe -v user.enc>. You see different container GUIDs.
    I hope this helps.

  • Using PFX certificate to call web services

    Hi,
    I need to use a PFX certificate to invoke a web services over HTTPS using a simple Java client; I've followed these steps:
    1 - convert .pfx certificate in .cer format: I've imported the certificate in Internet Explorer and then exported in .cer format
    2 - write a simple code before invocation of web service like this:           System.setProperty("javax.net.ssl.trustStore","C:\\myCertificate.cer");
    System.setProperty("javax.net.ssl.trustStoreType","PKCS12");
    System.setProperty("javax.net.ssl.trustStorePassword","myPwd");but it does'nt work and this exception occured:
    java.net.SocketException: Default SSL context init failed: DerInputStream.getLength(): lengthTag=109, too big.Then I've tried to import my certificate in a jsk keystore by keystore tool; after I've changed my code like this:
    System.setProperty("javax.net.ssl.keyStore","C:\\myjks.jks");          
    System.setProperty("javax.net.ssl.keyStoreType","JKS");     
    System.setProperty("javax.net.ssl.keyStorePassword","myPwd");but the eception is:
    sun.security.validator.ValidatorException: No trusted certificate foundWich are the right stpes to use a pfx certificate in a Java environment?
    Thanks in advance.
    Rob

    I've resolved my problem coding a custom SecureSocketFactory which I load programmatically into my SSL Context and then activate in my Axis client:
    public class MySocketFactory implements SecureSocketFactory {
         private Hashtable ht;
         public MySocketFactory(Hashtable ht) throws Exception {
         this.ht = ht;
         public Socket create(String host, int port, StringBuffer hds,
                   BooleanHolder bh) throws Exception {
              SSLSocket theSocket = null;
              try {
                   KeyStore keyStoreKeys;
                   KeyManagerFactory keyMgrFactory;
                   SSLContext sslContext;
                   keyStoreKeys = KeyStore.getInstance("PKCS12");               
                   keyStoreKeys.load(new FileInputStream("mykey.pfx"),"mypwd".toCharArray());
                   keyMgrFactory = KeyManagerFactory.getInstance("SunX509");
                   keyMgrFactory.init(keyStoreKeys, "mypwd".toCharArray());
                   sslContext = SSLContext.getInstance("SSL");
                   sslContext.init(keyMgrFactory.getKeyManagers(), null, null);
                   SSLSocketFactory socketFactory = sslContext.getSocketFactory();
                   theSocket = (SSLSocket) socketFactory.createSocket(host, port);
              } catch (Exception e) {
                   e.printStackTrace();
              return theSocket;
    }Then, in my proxy client, I activate in Axis my factory by this statement:
                   AxisProperties.setProperty("org.apache.axis.components.net.SecureSocketFactory", "socketfactory.MySocketFactory");bye
    Rob

  • Converting Signature data into PKCS#7 format

    Hi All,
    Is there any java api available to convert signature bytes in to PKCS#7 format.
    Here is the scenario.
    downloaded a trail digital id(abc.pfx) file from verisign site.
    then retrieved the private key, certificate and public key information from the pfx file.
    with the help of private key and pdf data, digital signature created.
    Sample code:
    KeyStore keyStore = KeyStore.getInstance("PKCS12");
    // aa.pfx is the Digital ID got from VeriSign
    keyStore.load(new FileInputStream("aa.pfx"), storepswd);
    for(Enumeration e = keyStore.aliases() ; e.hasMoreElements() ;) {
    alias = e.nextElement().toString();
    PrivateKey privKey = (PrivateKey)keyStore.getKey(alias, storepswd);
    java.security.cert.Certificate cert = keyStore.getCertificate(alias);
    PublicKey pubKey = cert.getPublicKey();
    Signature rsa = Signature.getInstance("MD5withRSA");
    rsa.initSign(privKey);
    /* Update and sign the data */
    FileInputStream fis = new FileInputStream("Testing.pdf");
    BufferedInputStream bufin = new BufferedInputStream(fis);
    byte[] buffer = new byte[1024];
    int len;
    while (bufin.available() != 0) {
    len = bufin.read(buffer);
    rsa.update(buffer, 0, len);
    bufin.close();
    /* Returns the signature of all the data updated*/
    byte[] rsaSign = rsa.sign();
    now i want to convert this signature(rsaSign bytes) in to PKCS#7 format and embed in to pdf file. so acrobat reader can verify the signature in pdf file.
    I've found the PdfSignature class in the iText lib. But it is poor.
    so plz let me know if any body know how to convert signature in to PKCS#7 format. any sample code or any URL.
    Thanks in Advance.
    Subhani.

    Use BouncyCastle provider
    http://www.bouncycastle.org/docs/mdocs1.4/index.html
    The package: org.bouncycastle.cms
    Download the package and get the examples in the package org.bouncycastle.cms.test .
    (CMS stands for Cryptographic Message Syntax and is defined in RFC 3369, and is an evolution of PKCS#7 v. 1.5, that is defined in RFC 2315. )

  • Convert seconds to [h]:mm:ss format on report text box

    I want to convert seconds to hh:mm:ss format on the report text box.
    I use =Format(Sum([MyTime])/(24*60*60),"hh:nn:ss"), but it does not work if the hours more than 24 hours, since the format is for  the time format for the day.
    I need the result shows more than 24 hours, because I want to show how many hours and minutes from my seconds value.
    I can use [h]:mm:ss for Excel that it gives me the total hours more than 24 hours.
    I tried to use the following to my text box
    Int((sum(MyTime)) / 3600) & Format(Int((sum(MyTime) / 60) Mod 60, "\:00") & Format(sum(MyTime) Mod 60, "\:00"),
    but for some reason it only shows seconds part without minute and hour part of the value.
    Your help and information is great appreciated,
    Regards,
    Souris,

    I want to convert seconds to hh:mm:ss format on the report text box.
    I use =Format(Sum([MyTime])/(24*60*60),"hh:nn:ss"), but it does not work if the hours more than 24 hours, since the format is for  the time format for the day.
    I need the result shows more than 24 hours, because I want to show how many hours and minutes from my seconds value.
    Hi sourises,
    You can use the next function. Place it in a general module.
    Function Sec_to_str(seconds)
    Dim uur As Integer
    Dim min As Integer
    Dim sec As Integer
    Dim cur_sec As Variant
    cur_sec = seconds
    If (IsNull(cur_sec)) Then
    Sec_to_str = Null
    Else
    sec = cur_sec Mod 60
    cur_sec = cur_sec \ 60
    min = cur_sec Mod 60
    cur_sec = cur_sec \ 60
    uur = cur_sec
    If (uur = 0) Then
    Sec_to_str = Format(min, "#0") & ":" & Format(sec, "00")
    Else
    Sec_to_str = Format(uur, "#0") & ":" & Format(min, "00") & ":" & Format(sec, "00")
    End If
    End If
    End Function
    Imb.

  • I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?

    I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
    Thank you

    So it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB

  • How can I convert DVD- video into Apple's format so that it can be played and streamed from my Mac?

    How can I convert DVD- video into Apple's format so that I can play the content on my Mac and also stream it to my Apple TV? A few years ago, I transferred all of my home videos onto DVD but now would really like to put these onto my Mac and stream them through Apple TV to watch on the "big screen". Any advice would be most welcome!! Thanks

    MPEG Streamclip.
    Apple do not have their "own" format. You need to convert your DVDs to H.264 though.

  • IPod Classic 160GB film library sync problem -  trying to sync films that have converted from purchased DVD to mp4 format locally, not purchases from the online store - all other libraries sync perfect - why?

    Hello Apple and the iTunes Windows PC users community.
    I am trying to sync films that I have converted from purchased DVD to mp4 format locally, not purchases from the online store. The mp4s all appear and play successfully in my iTunes application but will not sync across to the iPod film library folder.
    For your information: I am using iTunes 11.1.3.8 on a Windows 7 64bit machine with 500GB hard disk and 8GB of Ram in the UK.
    I have restored the iPod classic 160GB three times now to see if it was a hardware problem with no joy. Each time all the music restores properly as do the podcasts and all the items in TV programmes all appear to sync and work fine.
    I have also tried to copy films into the TV Programmes to get around it with no joy. They always go to the films section to start with. It is just the Films library that does not sync - all others work perfectly. As a last resort I have uninstalled and re-installed iTunes with no joy either.
    I am technically savvy and have gone through the itunes and ipod settings but nothing appears to make a difference - This is the first time I have had to post here as I can usually solve the majority of the ipod anomilies but this one has me flummoxed.
    Has the film encoding type changed in the newest itunes update? - Has this happened to anybody else and is it a hardware, software, or operating system problem.

    Having uninstalled the current version 11.1.3.8 and loaded and older version of iTunes 10.7.0.21 I can now categorically confirm that the newest update seems to be causing the problem as the films and TV Programmes are syncing perfectly on this older version.
    If you are going to do this please dont forget to remove the  ' iTunes Library.itl' file as this stops the older versions from running as I've just found out

  • Creation of program for converting the invoices in the PDF format

    Hi Guru
    Can any one tell me any standard prog. for converting the invoices in the PDF format.
    All invoices should be send through FTP.
    Plz help.
    Thanks

    u can use FM.
    CONVERT_OTF which convers OTF code into PDF afterthat u can download or do FTP.
    check sample flow.
    Re: how to convert po to pdf
    Regards
    Peram

  • The online conversion of my pdf file to word did not correctly convert the tables and certain other formatting.  I wish to obtain a refund.

    The online conversion of my pdf file to word did not correctly convert the tables and certain other formatting.  I wish to obtain a refund.

    Hi yammyamm,
    I'm sorry that your conversion didn't work out for you. Please contact Adobe Customer Support via phone or chat, and an agent will be able to process that cancellation/refund for you. Here is the contact information: Contact Customer Care
    Best,
    Sara

  • When I convert a pdf file to word format, it show the error "Save As failed to process this document

    Hi,
    I have just upgrade the creative cloud CC version and upgrade the acrobat pro to XI version.
    when I convert a pdf file to word format, it show the error "Save As failed to process this document. No file was created."
    Actually, I have delete the image, use other pdf file and download a sample pdf file to test it. Same error is shown. I have try all the other format , like the excel, rtf, text, powerpoint, still same thing happen.
    Please show me what else I can do to fix this problem.
    Thx.
    Alfred Li

    alfredadli wrote:
    Please show me what else I can do to fix this problem.
    Fisrt step would be to ask in the proper forum.
    http://forums.adobe.com/community/acrobat

  • Howto use SSL-2 (https) and .pfx certificate in SOAP cc - padding error!

    I'm working on a rfc to soap scenario in PI 7.1, and I must connect PI to some external web services through https.
    We must use a two-sided SSL connection (SSL-2), we received a .pfx certificate to achieve this.
    SAP Basis installed the certificate in the (java)nwa. In the SOAP communication channel i can choose the installed ceritifcate when i set the 'Configure Certificate Authentication'. Tried this, got the "error: iaik.security.ssl.SSLException: Padding length error: 106"
    Other option tried is to set the 'Select security profile'and choose Web Services Security. Then in the receiver agreement i can set the certificate for the encryption and/or decryption. Various scenario's tried, not succesful. We've seen that the pfx certificate contains two certificates (private and public one). But in the receiver agreement there is no choice between those two, we can only select the .pfx
    We also added a user with transaction EXTID_DN. Still got the same error.
    Does somebody have a suggestion what to do?  Must we split the .pfx certificate in two separate files/certificates?  Do we use the incorrect DN/CN in the EXTID_DN?

    Hi,
    What is your requirement ? The "2-sides" concept of SSL, what is it exactly ? Or does it simply mean that you're going to connect to a SSL target providing a SSL client certificate ?
    Usually, you import the SSL target's CA chain (ie Verisign CAs, etc) into the NWA key store, provide the CA chain for your own SSL client cerificate to the target and configure channels accordingly
    Rgds
    Chris

  • ITunes 11 has converted some songs to Quicktime movie format. How can I convert them back to MPEGs? format

    iTunes 11 has converted some songs to Quicktime movie format. How can I convert them back to MPEGs?

    I didn't mess with the iTunes Media folder previously, so I don't think that was the cause. Anyway, I manually fixed most of the songs, but I still can't figure out how to fix the movies that became listed as songs.
    Here is a screenshot of what it looks like when I click on "Get Info" for one of the movies (which has ended up in the music section on iTunes):
    There is no option to change the media kind to "movie" or "video" even though it is a movie and it still plays as a movie if I press play.

  • Converting the WAD applications into PDF format

    Hi SAPians,
    I'm in need to convert WAD results into PDF Format using SAP BW 3.5 and Acrobat Reader 7.0. And I've referred some documents in Net, But,they gave ideas only for 3.5 and Acorobat 5 version.
    But i've to convert the WAD results into PDF format only by using Acrobat Reader 7.0. So, kindly let me know the steps to do so.
    Thanks in Advance.
    Jayaprakash J

    Hi Shahid syed,
    Thanks for your reply.
    It was very useful.
    But, i've askd the solution for sap bw 3.5 with Acrobat reader 7.0.
    So, plz let me knw if any solutions for that to make wad reports into pdf format.
    Points will be awarded.
    Thanks & Regards
    Jayaprakash J

  • Converting dvd vidoes into a .mov format

    If I convert my DVD videos into .mov format files for the web, will the Quicktime player or plug in be the only available player to open these files. Basically what I am asking is does everyone have to have the Quicktime player or plugin available to open these files?

    .mov is a container file form, not a compression type. You can use any one of dozens of compressors for a .mov file. Widely used are mpeg-4 and Sorenson 3. Those will both play in QT 6. H264 is also being used a lot but it requires QT 7 to be installed.
    By the way, the QT mpeg2playbackcomponent will not export mpeg-2 format. It is playback only. Also, note that QT will not export sound from muxed files like mpeg-1 or mpeg-2. This freeware will export to various formats with the sound included. Note that there are both Windows XP and Mac versions of this freeware. Mpeg StreamClip

Maybe you are looking for

  • How to create a header in csv file

    I´m still newbie in Labview, I just learnt it this week.. I want to make a data translation for temperature sensor.. I´m having trouble to create a header in csv file,can anybody help me ? I also attach my csv file, what I wanted to make is like this

  • F110 - output using Form and Driver program

    Hi All, I need to prepare Sap Script Form for F110 tcode. standard scriptname to be use is F110_IN_AVIS standard driver program to be use is RFFOAVIS_FPAYM. but i dont know, where to assign these to F110 and check the output weather Form is displayin

  • XI R3.1 publication success / fail notifications not sent

    I have a set of 3 publications created and working fine in R3.1 (EDGE), each of which distributes a report to a UNC fileshare location. Upon success or failure, each is configured to send an email notification to an admin. The publications work and d

  • C API: Destinations!

    Is there any way to query a destination (MQDestinationHandle) to get the name? For processing, we will receive a message, and get the destination from the reply-to field in the headers. For a number of reasons we need to query the object for that pro

  • How to access the magnifier/marquee zoom tool in Reader XI?

    The subject says it all, really. Richard