REST:
http://www.informit.com/articles/article.aspx?p=27645
http://www.ajaxonomy.com/2008/xml/web-services-part-1-soap-vs-rest
Mainsoft oferuje intergrację między .NET a Webshpere :
Klient <---> Logika prezentacyjna - poprzez HTTP do klienta zawiera Portlet container (Struts, JSF/JSP portlets oraz ASP.NET JSR 168 Portlets)) <---> Warstwa logiki biznesowej (EJB, COM). Obie warstwy serwerowe korzystają z Serwisów (Security, Messaging, JNDI, Logging i Mail)
Już nikt nie kwestionuje istnienia dwóch ekosystemów Java i .NET. Dlatego powstaje wiele rozwiązań pomostowych (aplikacje heterogeniczne):
- Boulder, Colo.-based JNBridge's new JNBridgePro 4.0
- Thought - rozwiązanie - dynamic object-to-relational mapping (ORM) - CocoBase 5. Mają mieć produkt JPA dla .NET. Technologia JPA została wprowadzona do EJB 3.0 (składa się z API i JPQL)
- Boulder, Colo.-based JNBridge's new JNBridgePro 4.0
- Co jeszcze mamy:
- Bridge Solutions The code infrastructure in most enterprises today is a heterogeneous mix of Microsoft and Java platforms. Many companies have turned to Web services to get these two environments to interoperate, but that need has also spawned a category of "bridge" solutions, including those from JNBridge LLC and the CocoBase JPA solution from Thought Inc. A short list of similar offerings dev shops might want to consider includes:
- JuggerNET A development tool designed to generate .NET bindings for arbitrary Java classes. It can be used to publish .NET versions of Java APIs and COM bindings for Java APIs, and to integrate .NET clients into JMS or EJB applications. Vendor: Codemesh Inc. Developer license: JuggerNET pricing starts at $1,995 for a Starter Kit, which includes one developer license, first year maintenance and support, and up to five client or server CPU deployments.
- J-Integra for COM Bridges Java and Microsoft COM apps using a Java implementation of Microsoft's DCOM wire protocol, with optional native "JNI" mode. Vendor: Intrinsyc Software International Inc. Developer license $399; Server license (1 CPU) $3,999; Server license (multi-CPU) $7,999; Client license (5 pack) $745. Free trial available.
- EZ JCom Enterprise Provides a bridge between Java-based programs and COM/ActiveX objects. Can be used to interface to standard COM objects that don't include a UI, such as COM objects that provide a service. Can also be used from non-Windows platforms-such as Unix, Linux, Mac or handhelds-by using the included Remote Access Service. Vendor: EZ JCom Enterprise license: $1,495; includes royalty-free redistribution license and a license to use as a server component. The professional version, EZ JCom Pro, is available for $895. Evaluation downloads available.
- JACOB A Java-to-COM bridge designed to allow users to call COM Automation components from Java. It uses JNI to make native calls into the COM and Win32 libraries. Vendor: Open source project hosted on SourceForge License: GNU Library or Lesser General Public License (LGPL). The latest milestone release was announced in December 2007.
Wklejono z <http://adtmag.com/news/article.aspx?editorialsid=9923>
Inne ciekawe linki:- Jak nie zasnąć - http://www.wikihow.com/Stay-Awake-at-Work
- Jak się podładować - http://lifehacker.com/5054947/top-10-ways-to-stay-energized
- Forum na temat JACOB - http://sourceforge.net/forum/forum.php?thread_id=2204884&forum_id=375946
- Inny pakiet do łączenia Java z COM (komercyjny niestety) - http://www.teamdev.com/comfyj/purchase.jsf
- Skróty w MS:
- Dublin - application server - rozszerzenie do W2K8 i zintegrowany z BizTalk wykorzystuje .NET Framework 4.0 i służy do budowy aplikacji kompozytowych. Do tej pory WCF (Communication) i WWF (Workflow Foundation) bazowały na .NET 3.5 i wspierały SOAP zamiast REST, który teraz zaczyna królować w aplikacjach webowych. W nowym produkcie ADO.NET Data Services ("ASTORIA") znajdującym się w SP1 do 3.5 można znaleźć zapowiedzi REST. Natomiast w 4.0 zapowiada się jego pełne wsparcie: REST, ATOM, POX wraz z pełnym wsparciem warstwy WS-*. Można znaleźć na CodePlex - tzw. Starte Kit dla WCF (WCF REST Starter Kit on CodePlex). http://adtmag.com/news/article.aspx?editorialsid=10257
- Oslo - platforma do modelowania aplikacji
- Dublin - application server - rozszerzenie do W2K8 i zintegrowany z BizTalk wykorzystuje .NET Framework 4.0 i służy do budowy aplikacji kompozytowych. Do tej pory WCF (Communication) i WWF (Workflow Foundation) bazowały na .NET 3.5 i wspierały SOAP zamiast REST, który teraz zaczyna królować w aplikacjach webowych. W nowym produkcie ADO.NET Data Services ("ASTORIA") znajdującym się w SP1 do 3.5 można znaleźć zapowiedzi REST. Natomiast w 4.0 zapowiada się jego pełne wsparcie: REST, ATOM, POX wraz z pełnym wsparciem warstwy WS-*. Można znaleźć na CodePlex - tzw. Starte Kit dla WCF (WCF REST Starter Kit on CodePlex). http://adtmag.com/news/article.aspx?editorialsid=10257
- Oficjalne zapowiedzi VS 2010 oraz .Net Framewok 4.0 - najwyższy poziom tego pakietu to Team Suite. Ogromna zmiana - MS lansował model tworzenia aplikacji w oparciu w DSL (fizyczny poziom projektowania), teraz będzie wspierał UML (logiczny poziom projektowania) co się ma odbić w nowej wersji narzędzi "OSLO". O swej determinacji do przejścia na UML świadczy fakt wstąpienia MS do Object Management Group (OMG) - http://adtmag.com/news/article.aspx?editorialsid=10246
- Ciekawy protokoł GSS istnieje jego implementacja w Java - http://www.ietf.org/rfc/rfc2853.txt - ma dwie implemetacje:
- The Simple Public-Key GSS-API Mechanism [SPKM]
- The Kerberos Version 5 GSS-API Mechanism [KERBV5]
- The Simple Public-Key GSS-API Mechanism [SPKM]
- REST czy SOAP?
It was surprising enough when four years ago, Microsoft made an historic decision to ditch its own Web services architecture attempts and go with the flow. Today, it announced its next version of Windows will go with a different flow.
For the last four years, one of the most prominent signs of Microsoft's change of thinking with regard to the division of labor in programming, has been its embrace of Simple Object Access Protocol (now just called SOAP, after too much deliberation over the acronym) in Windows Communication Foundation (WCF). It was Web standards organizations, not Microsoft, that initially drove the widespread adoption of so-called WS-* services that use SOAP, but Windows' embrace of SOAP later cemented the standard as a fixture of Web development.
Initially, WS-* support was to be the hallmark of Microsoft's next-generation operating system back when it was still code-named "Longhorn," but later it was retrofitted to later editions of Windows XP, as well as to the .NET Framework.
But now that the tide of developer sentiment has recently shifted toward a new Web services model, that trades SOAP's platform independence for a more simplistic transaction structure called Representational State Transfer (REST), Microsoft is saying that it will be building what it's calling a "unified XAML model" into the next editions of both WCF and .NET. Those components will premiere in Windows 7, and beta testing will begin later this month.
As .NET Framework product manager Steven Martin described on his blog this afternoon, "As developers are broadly adopting the use of web services to build applications (using a spectrum of both advanced WS-* services as well as lighter weight RESTful services), they are reusing services that can live disparately across their enterprises, or on the Web. The best part of composite applications is that they can improve productivity and efficiency on the dev side and give more power to end users for accessing and managing data that's most critical to the business. As a result of the growing popularity of composite apps, developers require new levels of sophistication for building distributed, long-running, and workflow-centric applications."
That's the crux of Microsoft's marketing message explaining the move toward the REST model. But a white paper also released by Microsoft today takes that language somewhat deeper, going so far as to call into question the viability of the very aspects the company had cited as recently as months earlier as its reasons for embracing SOAP in the first place.
"Composite apps present new challenges around scalability, performance and reliability," reads Microsoft's latest "Overview" white paper on its new "RESTful" technology, code-named "Dublin" (DOCX available here). "The tried and true strategies for optimizing traditional applications do not satisfy in the more complex environment of composite applications. To address these requirements, composite applications must adopt more sophisticated application architectures -- including managing of highly asynchronous transactions, automation of long-running durable workflows, coordination of processes across very heterogeneous environments and seamless interoperability across platforms using standards. Increasingly, customers are turning to workflow-centric and 'declarative' approaches of defining application logic to help manage this complexity."
On the day that Microsoft first announced its WS-* technology adoption publicly, its product managers cited as its reasons for doing so what they called the "four pillars:" scalability, performance, availability, and reliability. (Marketers since that time have merged the final two items into one.) This February 2007 study by WCF program manager Saurabh Gupta graphically demonstrated the superior performance, scalability, and availability of WS-* Web services over the technologies that Microsoft had previously employed prior to embracing WS-* and SOAP, including ASP.NET Web Services (ASMX) and the Web Services Enhancements (WSE) add-on to Visual Studio 2005.
"To summarize the results, WCF is 25%-50% faster than ASP.NET Web Services, and approximately 25% faster than .NET Remoting," reads Gupta's conclusions. "Comparison with .NET Enterprise Service is load dependant, as in one case WCF is nearly 100% faster but in another scenario it is nearly 25% slower. For WSE 2.0/3.0 implementations, migrating them to WCF will obviously provide the most significant performance gains of almost 4x." Earlier in the study, Gupta warned that the chief limiting factor in any SOA system is the implementation of that service, rather than the underlying technology.
Whether a REST implementation will be significantly more scalable or perform better than a similar SOAP implementation may yet be proven by similar tests. Perhaps we'll see some of those tests during Microsoft's PDC in Los Angeles at the end of the month.
What's the difference between REST and SOAP, really? The two implementations of Web services architecture are actually completely different; they may accomplish much the same results, but they go about their jobs in entirely separate ways.
With SOAP, each Web service has its own URL, and a request made of that URL is submitted as a message in an XML enclosure. Each request uses an instruction that's part of the namespace of the service, which is itself explained through an XML scheme called Web Services Description Language (WSDL). So a Web client passes a message to the service, using the lexicon outlined by WSDL and enclosed in a SOAP envelope. The service then responds with results that are enclosed in a very symmetrical fashion, so that the queried element and the response tend to match up.
The key benefits of SOAP are that it is transport-agnostic (just because it uses HTTP now doesn't mean it has to in ten or fifteen years' time), and that it's easy to associate a Web service with an appropriate URL. That makes directories of Web services easier to assemble.
REST is actually a bit simpler to explain, especially to someone who hasn't grown too accustomed to SOAP. Unlike SOAP, REST relies entirely on HTTP. But because of that, its request language is already known; there are only four "verbs" in REST which translate directly to the GET, POST, PUT, and DELETE. So the need for WSDL on the request side is completely thwarted.
With REST, the item of data the client requests -- not the Web service itself -- is the target of the URL. For example, the field where a customer's surname would appear in a database may be the URL, whereas in SOAP, the URL refers to the service to which a request for that surname would be placed in an envelope. The server responds with a message in an XML envelope that pairs both the item that was requested and its response, which makes it easier for an auditing application to account for data transactions.
Is REST necessarily an easier way to go? It is if you're developing applications using a new concept called the model view controller scheme. These are the "composite" applications to which Microsoft's marketing literature refers; they involve three separate components which may be programmed in completely different languages, and may be running on separate processors. The model component sets up the data that's the subject of an application, whereas the view component prepares a meaningful relationship of that data for a human reader. This tends to translate well to systems where JavaScript or dynamic language code can do the modeling, and HTML can set up the view. The controller may be a server application that maintains the active state and integrity of the database.
It's an extremely sensible way to think of a network application, and it may be much easier to develop such a system because the three aspects of maintaining it can be delegated to separate development teams. But it almost mandates that the "what" of the application -- the part which the model component is setting up, and the view is preparing to lay out -- have a discrete name, without relying upon some Web service to give it a name later on during the transaction process. That's where the REST model may be a better fit.
Last November, Microsoft unveiled something called the ASP.NET Model View Controller Framework at a developer's conference in Las Vegas. There, one of the company's non-employee MVPs, author Dino Esposito, noted what he perceived to be the new framework's key benefit.
Summing up that benefit for his blog, Esposito wrote, "It uses a REST-like approach to ASP.NET Web development. It implements each request to the Web server as an HTTP call to something that can be logically described as a 'remote service endpoint.' The target URL contains all that is needed to identify the controller that will process the request up to generating the response -- whatever response format you need. I see more REST than MVC in this model. And, more importantly, REST is a more appropriate pattern to describe what pages created with the MVC framework actually do."
That's a sentiment Microsoft evidently took to heart. As Corporate Vice President Scott Guthrie wrote in describing his team's MVC implementation, "It includes a very powerful URL mapping component that enables you to build applications with clean URLs. URLs do not need to have extensions within them, and are designed to easily support SEO and REST-friendly naming patterns. For example, I could easily map the /products/edit/4 URL to the 'Edit' action of the ProductsController class in my project...or map the /Blogs/scottgu/10-10-2007/SomeTopic/ URL to a 'DisplayPost' action of a BlogEngineController class."
PDC in Los Angeles is a little over four weeks away, and BetaNews will be there to see how the first public betas of .NET 4.0 with REST perform in comparison to their predecessors.
Wklejono z <http://www.betanews.com/article/NET_Framework_40_to_become_less_SOAPcentric_embrace_REST/1222895836/2>
- Bridge Solutions The code infrastructure in most enterprises today is a heterogeneous mix of Microsoft and Java platforms. Many companies have turned to Web services to get these two environments to interoperate, but that need has also spawned a category of "bridge" solutions, including those from JNBridge LLC and the CocoBase JPA solution from Thought Inc. A short list of similar offerings dev shops might want to consider includes:
czwartek, października 02, 2008
piątek, września 19, 2008
- http://c2.com/doc/oopsla89/paper.html
- http://javatipsandtricks.blogspot.com/2006/10/cryptography-and-security-on-java-se-6.html
- http://www.frankcornelis.be/dcontract/source-repository.html
- http://www.javaworld.com/javaworld/jw-01-2001/jw-0112-howto.html
- http://www.javaworld.com/javaworld/jw-07-2001/jw-0706-webstart.html
- http://www.javaworld.com/javaworld/jw-03-2003/jw-0321-wssecurity.html
- http://www.javaworld.com/javaworld/jw-06-2005/jw-0627-plugin.html
- http://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.html?
- http://java.sun.com/javase/6/docs/technotes/guides/security/xmldsig/XMLDigitalSignature.html
- http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html#Provider
- http://java.sun.com/webservices/docs/1.5/tutorial/doc/index.html
- http://www.javaworld.com/javaworld/jw-05-2002/jw-0524-j2ee.html?page=2
- http://java.sun.com/j2se/1.5.0/docs/guide/security/p11guide.html
- http://java.sun.com/j2se/1.5.0/docs/guide/security/index.html
środa, września 17, 2008
Zebrane wiadomsci z Chrome:
- Porównanie kodowania znaków w .NET: http://www.billdawson.com/Articles/dotnetstreams.html
- O certyfikatach. Oprogramowanie:
- Oprogramowanie do SSL:
- OpenSSL i XCA - bezpłatne
- Oprogramowanie darmowe do zastosowań profesjonalnych, jak zbudowane na bazie OpenSSL i Perla pakiety OpenCA i OpenXPKI (www.openxpki.org
/ oraz oparty o Javę i serwer JBoss pakiet EJBCA, oprogramowanie komercyjne średniej klasy, takie jak Microsoft Certificate Services) - Oprogramowanie komercyjne z wyższej półki, takie jak RSA Certificate Manager (KEON), Entrust Authority czy Cybertrust Unicert (dawniej Baltimore)
- OpenSSL i XCA - bezpłatne
- Podpis elektroniczny w aplikacjach biurowych (securitystandard.pl) - http://www.securitystandard.pl/news/165699_1.html - wg. zaimplementowany jako XML-DSig w formacie OpenXML (ISO 29500, ECMA 376) rozpoznawalnym przez rozszerzenie DOCX.
- Materiały na temat JS - http://www.webdesignerwall.com/general/javascript-in-modern-web-design/ - widać, że najpopularniejszymi rusztowaniami są MooTools i jQuery. Tutaj są zebrane najpopularniejsze widgety. Bardzo przyjemny wygląd zewnętrzny.
- Cos dla dzieci: http://abrick.sourceforge.net/
- Ciekawe skrypty w różnych j. programowania - http://usefulscripts.wordpress.com/2008/09/08/using-md5-encryption-with-c-and-microsoft-sql-server/ - tutaj pokazene jest jak przechowywać w bazie hasła kodowane MD5.
- Zasoby Pythonowe - http://dawson.webfactional.com/blog/
- Formatowanie liczb w JS - http://usefulscripts.wordpress.com/2008/08/17/javascript-decimals/ na podstawie biblioteki z http://www.javascriptkit.com/javatutors/formatnumber.shtml
- Bardzo fajna strona o JS - http://www.javascriptkit.com/javatutors/formatnumber.shtml
- CodeProject - CertyfikatyX.509 w .NET - http://www.codeproject.com/KB/cpp/X509Certificate.aspx
- C-Sharp - Strumienie w pamięci - http://www.c-sharpcorner.com/UploadFile/Ashish1/memorystream10272005214644PM/memorystream.aspx?ArticleID=90a33ad2-49df-441b-91fc-94ed620f6010
- Dr.Dobbs - XML Sign - http://www.ddj.com/windows/184416926 cz.1
- Najlepsze blogi techniczne - http://itmanagement.earthweb.com/cnews/article.php/3770056/Top+200+Tech+Blogs:+the+Datamation+List.htm a tam sugerują:
piątek, września 05, 2008
Znana witryna - http://today.java.net/pub/a/today/2006/11/21/xml-signature-with-jsr-105.html?page=1 - "XML Signature with JSR-105 in Java SE 5" Standard ten jest już przyjęty tutaj jest dokumentacja - http://jcp.org/aboutJava/communityprocess/final/jsr105/index.html
Celem podpisu cyfrowego jest zapewnienie integralności danych zgodnie z RFC 2828, dodatkowo chodzi o mocniejszy dowód - autentykację (message authentication).
<Signature ID?>
<SignedInfo>
<CanonicalizationMethod/>
<SignatureMethod/>
(<Reference URI? >
(<Transforms>)?
<DigestMethod>
<DigestValue>
</Reference>)+
</SignedInfo>
<SignatureValue>
(<KeyInfo>)?
(<Object ID?>)*
</Signature>
Znaczenie Reference - łącznik między danymi do podpisania a samym podpisem. Wewnątrz dla danych jest liczony skrót wiadomości (hash, digest, footprint, odcisk) w elemencie DigestValue algorytmami (tzw. one way hash) SHA-1, SHA -256, SHA-512. Elementem, który jest podpisywany jest SignedInfo wg algorytmów DSA-SHA1, RSA_SHA1.
Podpisywanie składa się z dwóch etapów:
- Obliczenie wartości hash i wpisanie jej do Digest Value dla każdej wiadomości
- Wygenerowanie podpisu cyfrowego (digital signature) dla całego elementu SignedInfo i wstawienie go do pola SignatureValue. Inaczej mówiąc zaszyfrowanie całego bloku SignedInfo. Do podpisu stosuje się klucz prywatny wysyłającego (podpisującego)
Walidacja podstawowa składa się również z 2 etapów: (http://java.sun.com/developer/technicalArticles/xml/dig_signatures/fig8.gif):
- Reference validation - czy każdy element Reference jest poprawny tzn. oblicza się hash otrzymanego wiadomości i sprawdza z DigestValue
- Signature validation - polega na sprawdzeniu przy pomocy klucz publicznego podpisującego (?) - odszyfrowanie bloku SignedInfo posługując się kluczem publicznym i porównanie tej wartości z wartością hash elementu SignedInfo otrzymanej wiadomości
- Potwierdzenie tego jest na stronach Sun-a - http://java.sun.com/developer/technicalArticles/xml/dig_signatures/
- Inne potwierdzenie "Performing a digital signature involves two steps. In the first step, the data is run through a hashing algorithm. A typical hashing algorithm scans through the data and generates a number of some size -- this is typically called a "digest." If the same data is run through the hashing algorithm again, the same digest should be generated. Good hashing algorithms vary the digest unpredictably if the slightest change is made in the data. This makes it impossible to reverse engineer the original data, given the digest.
The second step in producing a digital signature is to encrypt the digest using the private key of the author. If you're not familiar with the terms public key or private key, then you've probably never heard of public key cryptography. The basic concepts of public key cryptography are simple: anything that is encrypted using an individual's private key, can only be decrypted using the same individual's public key. The reverse is also true: anything encrypted using an individual's public key, can only be decrypted using the same individual's private key. The two keys are mathematically linked. After encrypting the digest with the user's private key, the resulting scrambled data is then appended to the original document data.
Because public keys can be shared with anyone, and private keys should be known only to the signing author, verifying a digital signature is simple. The steps are:
- Rehash the document data that was received.
- Decrypt the encrypted digest with the author's public key that is typically appended to the document.
- Compare the two digests. If they are equal, the signature is valid.
If the two digests are not equal, then either the document has been altered, or the author of the document is not the same as the individual that signed it. However this information does not indicate which of those two faults (or both) have occurred. Wklejono z <http://www.java-tips.org/java-ee-tips/xml-digital-signature-api/using-the-java-xml-digital-signatur-2.html>"
Znaczenie Object -rekomenduje się aby tam umieścić dane które będą podpisywane (w przypadku wersji podpisu enveloping). KeyInfo z kolei może zawierać informacje o kluczu publicznym potrzebnym przy weryfikacji.
Pomocne narzędzia w Javie to keytool - http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html
Lista dyskusyjna:
- http://markmail.org/message/mdeplwlczpa6xub5#query:org.apache.xml.security%20signing+page:1+mid:x537wesoqhhimbmq+state:resultsMetro
- to technologia SUN-a do łączenia się z WS w .NET - https://metro.dev.java.net/getting-started/
- SUN - http://forums.java.net/jive/thread.jspa?messageID=247428 , http://forums.java.net/jive/thread.jspa?messageID=255470
- Derkeiler - http://coding.derkeiler.com/Archive/Java/comp.lang.java/2004-03/0527.html
- Koders - http://www.koders.com/java/fidCEFECC0B536138DCFE919C5324844F8D1A0AC068.aspx
- http://osdir.com/ml/encryption.bouncy-castle.devel/2004-09/msg00046.html
Podpis cyfrowy w Java przy pomocy biblioteki Apache XML Security (DigiSig) - http://www.linux.com/feature/39427
Bardzo ciekawy artykuł "JAVA XML Digital Signature" pokazuje architekturę JCA (Java Cryptographic Architecture) jako rozszerzalną platformę:
Niezbędne biblioteki:
- javax.xml.crypto
- javax.xml.crypto.dsig
- javax.xml.crypto.dsig.keyinfo
- javax.xml.crypto.dsig.spec
- javax.xml.crypto.dom
- javax.xml.crypto.dsig.dom
W celu przyśpieszenia operacji kryptograficznych (zajmują one do 30% CPU) proponuje SUN wykorzystanie rozszerzenia PKCS#11 (Crypto.Token Interface Standard) w celu przeniesienia ciężąru obliczeń na akceleratory sprzętowe lub karty inteligentne.
Na powyższym rysunku Sun PKCS#11 Provider stanowi pomost między warstwami wyższymi a konkretną implementacją obliczeń kryptograficznych. Statycznie określenie rodzaju dostawcy polega na edycji pliku konfiguracyjnego sunpkcs11 umieszczonego w ../jre/lib/scurity/java.security Oto fragment mojego pliku:
#
# List of providers and their preference orders (see above):
#
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
security.provider.4=com.sun.crypto.provider.SunJCE
security.provider.5=sun.security.jgss.SunProvider
security.provider.6=com.sun.security.sasl.Provider
security.provider.7=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.8=sun.security.smartcardio.SunPCSC
security.provider.9=sun.security.mscapi.SunMSCAPI
Jak widać jest nawet obsługa MS CAPI (poprzez wpis 9).
Fundamentalne łącza:
- http://java.sun.com/j2se/1.5.0/docs/guide/security/CryptoSpec.html
- Odpowiedzią APACHE na JSR-105 jest http://santuario.apache.org/
- http://java.sun.com/j2se/1.5.0/docs/guide/security/index.html
- http://java.sun.com/javase/6/docs/technotes/guides/security/xmldsig/XMLDigitalSignature.html
- Totalny przykład jak podpisać i sprawdzić: http://www.java-tips.org/java-ee-tips/xml-digital-signature-api/using-the-java-xml-digital-signatur-2.html
- Tutorial do WS też zawiera przykłady - http://java.sun.com/webservices/docs/1.5/tutorial/doc/index.html, rozdział 4 - http://java.sun.com/webservices/docs/1.5/tutorial/doc/XMLDigitalSignatureAPI.html#wp268799
- Generalnie są pomocne wskazówki z http://www.java-tips.org
- Sign and verify XML documents using Apache WSS4J and Websphere DataPower SOA - http://www.ibm.com/developerworks/library/ws-soa-verifyxml/index.html
- WS w IBM - https://www6.software.ibm.com/developerworks/education/ws-understand-web-services4/index.html
- Świetny servis typu cover - http://xml.coverpages.org/xmlSig.html#URLs
- Pełny przykład aplikacji do podpisu i weryfikacji - http://www.javaworld.com/javaworld/jw-12-2002/jw-1220-xmlsecurity.html?page=2
- Secure Web Services - http://www.javaworld.com/javaworld/jw-03-2003/jw-0321-wssecurity.html
- Plug-in - http://www.javaworld.com/javaworld/jw-06-2005/jw-0627-plugin.html
- Yes you can secure WS - http://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.html?
- Java i XML - http://www.javaworld.com/channel_content/jw-xml-index.shtml
- Construct Secure network application - http://www.javaworld.com/javaworld/jw-01-2001/jw-0112-howto.html
- Web Start to rescue - http://www.javaworld.com/javaworld/jw-07-2001/jw-0706-webstart.html
- Stosowanie SUNCAPI - http://javatipsandtricks.blogspot.com/2006/10/cryptography-and-security-on-java-se-6.html
- Bouncy castle -http://www.bouncycastle.org/index.html
- Tworzenie Rich Client - http://www.ibm.com/developerworks/edu/os-dw-os-eclipse-ganymede-pt1.html?S_TACT=105AGX54&S_CMP=B0904&ca=dnw-935
- Ajax i PHP - http://www.ibm.com/vrm/newsletter_10731_3899_85549_email_DYN_6IN/mcu35457530
- Applets with servlets i XML -http://www.javaworld.com/javaworld/jw-05-2002/jw-0524-j2ee.html?page=2
- Projekty Open-Source:
- OpenXAdES - http://www.openxades.org/
- DigiDOc COM - http://www.openxades.org/download.html
- X509 - http://nixbit.com/search/x509-/
- Dcontract - http://nixbit.com/cat/programming/libraries/dcontract/
- Crypt.509 - http://nixbit.com/cat/programming/libraries/crypt::x509/
- Xca - http://nixbit.com/cat/system/networking/xca/
- DigiDoc - http://sourceforge.net/projects/gdigidoc/
- Closed-Source:
- XML Encryption and Digital Signature - http://msdn.microsoft.com/en-us/library/ms229749.aspx
- How to: - http://msdn.microsoft.com/en-us/library/ms229745.aspx
- Wskazówki:
- Dostęp do EJB z poziomu klienta Javy lub poprzez JWS - http://www.java-tips.org/java-ee-tips/enterprise-java-beans/accessing-a-secure-enterprise-bean-from-a-java-client-or-through-java-web-start-techn.html
- Dostęp do EJB z poziomu appletu - http://www.java-tips.org/java-ee-tips/enterprise-java-beans/accessing-an-ejb-from-an-applet-2.html
- Dostęp do EJB z poziomu servleta - http://www.java-tips.org/java-ee-tips/enterprise-java-beans/accessing-ejb-from-a-servlet-within-the-same-cont-2.html
- Dostęp do EJB z poziomu JSP - http://www.java-tips.org/java-ee-tips/javaserver-pages/accessing-bean-components-from-jsp.html
- http://www.java2s.com/Code/Jar/wsit/xmldsig.jar.htm
- http://www.java2s.com/Tutorial/Java/0140__Collections/0021__Collections.htm
- Można ściągnąć i jest opis klas - http://www.java2s.com/Code/Jar/wsit/Downloadxmldsigjar.htm
Przykład diagramu:
czwartek, września 04, 2008
==========
Nauka DWR - http://directwebremoting.org/dwr/browser/intro
Silne rusztowanie extjs pozwala również współracować z GWT - http://extjs.com/, http://extjs.com/products/gxt/
Niezawodna javalobby - http://java.dzone.com/frontpage?page=4, captain at, rgangon, javapassion
Kurs UML wg. Borland - http://dn.codegear.com/article/31863#use-case-diagram
http://www.rgagnon.com/howto.html
http://java.dzone.com/news/ejb-3-dead-or-alive
http://java.dzone.com/articles/jsf-the-good-bad-and-yes-ugly
http://java.dzone.com/articles/ejb-30-and-spring-25
http://java.dzone.com/articles/javafx-applets-meet-google-chr
mojo jMaki
http://library.dzone.com/assets/request/whitepaper/4671
==========
Jaudices -
with a jaundiced eye -
What Gartner elides is -
So hats off to Carr for limning the trend, presciently predicting it -
http://www.scribemedia.org/2007/02/09/kevin-hakman/
http://www.scribemedia.org/2007/02/13/once-future-web/
http://www.scribemedia.org/2007/02/15/firefox-javascript-eich/
http://www.scribemedia.org/
http://www.netzgesta.de/dev/text/#overview
http://www.liquidx.net/plotkit/zamiast canvas
http://www.owasp.org/index.php/Top_10_2007
==========
Zasoby: Kruger, DaniWeb, Zen Habit, Ajaxian
1. http://www.ajaxtoolbox.com/request/examples.php
2. http://www.mattkruse.com/
==========
1. jsc - sourceforge, chyba to jest to - http://docs.google.com/View?docid=dfmc8fvr_208fmcjqmhm
2. Obsługa JDOM -http://www.informit.com/guides/content.aspx?g=java&seqNum=432&ns=15275, biblioteka - http://jdom.org/
3. Triki optymalizacyjne w JS wykorzystujace najnowsze osiagnięcia optymalizacji - http://arstechnica.com/news.ars/post/20080822-firefox-to-get-massive-javascript-performance-boost.html
4. Nowa gra "Battelfield Heros" z EA - http://arstechnica.com/news.ars/post/20080826-first-look-battlefield-heroes-is-good-free-pc-gaming-fun.html, podobna gra Team Fortress 2
5. Mini Ajax -pomysły na ajaxa - http://miniajax.com/
6. Miętowy Ajax - http://mintajax.pl/
7. JS corral -http://www.crays.com/jsc/index.htm
8. Ściągnij najnowszy MS SQL Server - http://www.microsoft.com/express/sql/default.aspx
9. Zasoby JS na MOzilli - http://www.mozilla.org/js/scripting/
10. Wykorzystanie FireBug-a - http://www.webmonkey.com/tutorial/Build_Better_Pages_With_Firebug#FirePHP_equivalents_for_other_languages
11. UI JWuery - http://docs.jquery.com/UI/Tabs
12. Jak zacząć GWT - http://code.google.com/webtoolkit/
13. Nauka programowania Java - http://java.sun.com/developer/technicalArticles/wombat_basics/
==================================================
24.08.2008
Linki -
1. http://zenhabits.net/2008/08/minimalist-fitness-how-to-get-in-lean-shape-with-little-or-no-equipment/
2. http://nettuts.com/javascript-ajax/submit-a-form-without-page-refresh-using-jquery/
3. http://effectize.com/jquery-developer-guide
4. http://developer.yahoo.com/
5. http://www.qsor.pl/artykuly/skrypty_wsh/transformacja_xml_xsl/
6. http://msdn.microsoft.com/en-us/library/ms229745.aspx
7. Bouncy Castle
===================================================
sly =
parchment -
he jumped bail =
torrid =
technocrati zbiera linki autoró, delicious linki odwiedzających
http://www.informit.com/articles/article.aspx?p=1232366&seqNum=1
was wringing its hands back in - załamał
--------
Izolacja od IE:
===============
<!--[if IE]>
--------
<!--[if IE6]> : allows you target a specific browser version
<!--[if gt IE 5]> : allows you to target all versions after the one you specify
<!--[if lt IE 5]> : allows you to target all versions before the one you specify
<!--[if gte IE7]> : allows you target all versions after and including the one that you specify
<!--[if lte IE6]> : allows you target all versions before and including the one that you specify
--------
.NET for Visual FoxPro
--------
+48601100123 - iPlus
--------
02.08.2008
======================
http://java.about.com/
-
Pożyteczne łącza:
2. Pokaż dane z bazy jako transformowalna strona w kontrolce przeglądarki - codeguru
3. Biblioteka jibu do wsparcia wielowątkowosci
4. Zapis treści dokumentu z MS Word do BLOBa
5. XADes - zawiera również aspekty elementu znacznika czasu -tzn. formaty XAdES-T, XAdES-X oraz XAdES-A
-
http://weblog.infoworld.com/securityadviser/archives/2008/08/user_access_con.html?source=NLC-DAILY&cgd=2008-08-01
http://snippets.dzone.com/posts/show/2439
http://www.hscripts.com/tutorials/index.php
http://bytes.com/forum/thread85596.html
http://thejavamonkey.blogspot.com/2008/07/digital-signatures-in-java-public-key.html
http://forums.sun.com/thread.jspa?threadID=5126495&tstart=0
http://swing-fx.blogspot.com/2008/05/swing-search-engine.html
http://forums.sun.com/thread.jspa?threadID=5317720
http://dotnetslackers.com/XML/re-21255_XAdES_Interop_with_XML_DSIG_as_implemented_by_the_NET_Framework.aspx
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3440889&SiteID=1
http://www.secnewsgroups.net/group/microsoft.public.dotnet.security/topic14281.aspx
http://groups.google.com/group/microsoft.public.dotnet.security/msg/d10a83484f4c19eb
http://groups.google.com/group/microsoft.public.dotnet.security/browse_thread/thread/4bbcbf65a23a5afb/d10a83484f4c19eb
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3173985&SiteID=1
http://www.softwaremaker.net/blog/xadesinteropwithxmldsigasimplementedbythenetframework.aspx
http://snippets.dzone.com/posts/show/2439
Zasoby Javy:
- Bezpieczeństwo appletu i podpisywanie:
- "Java security evolution and concepts" - http://www.javaworld.com/javaworld/jw-12-2001/jw-1221-jdk4security.html
- Podpis cyfrowy w Java:
- http://www.openxades.org/
- http://docs.oasis-open.org/dss/oasis-dss-1.0-profiles-XAdES-spec-cd-01.pdf
- http://xml.coverpages.org/xmlSig.html
- http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.html
- http://xmlbeans.googlepages.com/
- http://sourceforge.net/projects/gdigidoc
- http://sourceforge.net/project/showfiles.php?group_id=99569
- Koncepcja wykorzystania appletów w zespół z servletem do prezentowania danych pochodzących z wartswy biznesowej (na serwerze) - http://www.javaworld.com/javaworld/jw-05-2002/jw-0524-j2ee.html?page=2
- Jak wysyłać dane POST w Javie - http://www.javaworld.com/javatips/jw-javatip34.html?page=2
- W tym samym stylu pobieranie zasobu plikowego z internetu - http://www.javaworld.com/javatips/jw-javatip19.html
- Forum javaworld na temat bezpieczeństwa - http://www.javaworld.com/javaforums/postlist.php?Cat=2&Board=JavaSecurity
- Do przejrzenia:
- http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html
- http://forums.sun.com/thread.jspa?threadID=660634&messageID=3879820
- http://www.linux.com/feature/39427
- http://java.sun.com/developer/technicalArticles/xml/dig_signatures/
- http://osdir.com/ml/encryption.bouncy-castle.devel/2004-09/msg00046.html
- http://forums.java.net/jive/thread.jspa?messageID=247428
- http://forums.java.net/jive/thread.jspa?messageID=255470
- http://www.java-tips.org/java-ee-tips/xml-digital-signature-api/using-the-java-xml-digital-signatur-2.html
- http://java.sun.com/javase/6/docs/technotes/guides/security/xmldsig/XMLDigitalSignature.html
- http://www.java2s.com/Code/Jar/wsit/xmldsig.jar.htm
- http://coding.derkeiler.com/Archive/Java/comp.lang.java/2004-03/0527.html
- http://www.koders.com/java/fidCEFECC0B536138DCFE919C5324844F8D1A0AC068.aspx
- http://geekswithblogs.net/DavidBarrett/archive/2008/04/21/121459.aspx
- http://www.java2s.com/Code/Jar/wsit/Downloadxmldsigjar.htm
- http://www.javaworld.com/javaworld/jw-12-2002/jw-1220-xmlsecurity.html
- http://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.html
- http://www.javaworld.com/javaworld/jw-06-2005/jw-0627-plugin.html
- http://www.javaworld.com/javaworld/jw-03-2003/jw-0321-wssecurity.html
- http://www.javaworld.com/javaworld/jw-01-2001/jw-0112-howto.html
- http://www.javaworld.com/javaworld/jw-07-2001/jw-0706-webstart.html
- http://today.java.net/pub/a/today/2006/11/21/xml-signature-with-jsr-105.html?page=1
- Podpis cyfrowy w MS:
- Podpis cyfrowy w IBM:
- Pobieranie danych z Internetu:
- Key - klucz - informacja służąca do szyfrowania i deszyfrowania danych. Mamy dwa typy kryptografii:
- bazująca na kluczu niejawnych (secret) zwana symetryczną - stosuje jeden typ klucza zarówno do szyfrowania jak i odszyfrowania. Klucz jest wspólny dla odbiorcy i wysyłającego.
- bazująca na kluczach publicznych zwana asymetryczną - ma dwa klucze (jeden klucz służy do szyfrowania, drugi do odszyfrowania:
- publiczny - (public key)stosowany do potwierdzenia autentyczności (informacja zaszyfrowana kluczem prywatnym danej osoby może być odszyfrowana TYLKO JEJ kluczem publicznym i żadnym innym)
- prywatny - (private key) powinnien być znany tylko właścicielowy
- Message digest - skrót wiadomości (obrazowo cyfrowy odcisk - digital footprint) - krótki ciąg informacji unikalny dla niej.
- Digital signature - podpis cyfrowy. Wyliczony na podstawie Message digest i private key ciąg informacji (zazwyczaj ciąg ten jest znacznie krótszy od orginalnej wiadomości, możnaby podpisać cyfrowo całą wiadomość orginalną ale wymagałoby to znacznej mocy obliczeniowej i czasu). Stanowi potwierdzenie, że dana wiadomość została podpisana przez osobę posiadającą w/w klucz prywatny.
- Z uwagi na istniejące i historycznie zaszłe ograniczenia na publikację algorytmów kryptograficznych, twórcy architektury do obsługi w javie kryptografii (JCA - Java Cryptography Architecture) zdecydowali się na zbudowanie jej na koncepcji dostawców usług (providers). JCA jest dostarczana z domyślnymi dostawcami, inne firmy mogą podpiąć własnych dostawców usług kryptograficznych. Dostawca jest pośrednikiem między istniejącą implementacją np. algorytmu MessageDigest a aplikacją.
- Kod wygląda mniej więcej tak:
-
// The getInstance() method is a static method of the // Signature class. It returns an instance of the // installed class that implements the SHA/DSA // digital signature algorithm. Signature signature = Signature.getInstance("SHA/DSA");
- o nowego w przeglądarkach nowej generacji. Pojawiły się nowe wersje przeglądarek internetowych (wszystkie w wersji beta). Porównanie wypada słabo. IE 8 - jest to ciężka przeglądarka, ciągnąca w swym balaście wszystkie dobre i złe cechy poprzednich wersji w ramach zgodności wstecznej (aby nie naruszyć istniejących stron napisanych pod konkretną wersję IE). Jest dla starych użytkowników IE i poszerza o nowe możliwości. Chrome jest lekka, ma spartańskie interfejs.Podobne jest podejście do izolacji stron, w obu przeglądarkach każda zakładka to odrębny, niezależny proces. "Like Chrome, IE 8 uses multiple, discrete processes to isolate and protect each tab's contents. However, while Chrome takes a purist approach and literally launches a new process with each opened tab, IE 8 uses more of a hybrid model: It creates multiple instances of the iexplore.exe process but doesn't specifically assign each tab to its own instance. Thus a look at Task Manager under Windows will show an equal or greater number of Chrome instances than running tabs, whereas IE 8 will generate a fewer number of instances -- for example, six copies of iexplore.exe to support 10 discrete tabs -- and share them among the running tabs." Wklejono z <http://www.computerworld.com.au/index.php?id=1560002236&eid=-44>
- Powoduje to olbrzymie obciążenie systemu i znaczne zużycie pamięci operacyjnej.
- Testy certyfikacyjne Java - http://www.jchq.net/certkey/0803certkey.htm
- Język F# czyli programowanie funkcjonalne - http://www.computerworld.com.au/index.php?id=1826342097&eid=-301
-
Stan języków skryptowych w 2009 roku - http://www.computerworld.com.au/index.php?id=1353202405&eid=-301
-
Portal zakupowy - http://alejka.pl/s/Java%2BServer%2BFaces.html
-
Jak wystartować z Gears - http://gears.google.com/
-
Jak pogodzić życie osobiste z zawodowym - http://www.cio.com.au/index.php?id=1361025773&eid=-153
-
Jak zauważyła Forrest Group jest to pożyteczny język ale ma etykietkę do tworzenia stron internetowych po stronie klienta, czyli nie jest tak popularny.
Trzeba pamiętać, że aplikacje internetowe to są dwie nogi: strona serwerowa (języki Java, .NET, skryptowe jak Python, PHP, Ruby) i kliencka (JS). Proporcje między nimi decydują o rodzaju i charakterystyka użytkowo-funkcjonalnej aplikacji webowych oraz szybkości działania. Jeżeli przeważa część serwerowa to mamy mocne obciążenie łącza oraz serwera (gro przetwarzania odbywa się na serwerze). Jeżeli przewagę ma część kliencka to serwer działa jako dostawca danych rozpakowywanych i prezentowanych u klienta. Tutaj większą część przetwarzania bierze na siebie komputer klienta odciążając serwer. Do tego dochodzi jakość interpretowania JS (teraz w projektach Mozilli FF 3.1 mówi się o kompilatorze języka TraceMonkey, opartego na badaniach uniwersyteckich, obiecującego radykalne przyśpieszenie działania) oraz sprawność motoru przeglądarki. Ponieważ tak czy inaczej strona internetowa wytworzona na serwerze trafia do punktu docelowego jakim jest przeglądarka to tak naprawdę to ona określa efekt końcowy odbierany przez użytkownika. A jeżeli coś się dzieje w przeglądarce (a powinno, choćby renderowanie strony lub wykonywanie jakieś logiki na strukturze DOM tej strony) to jest ona inteligentna tzn. bierze na siebie wykonywanie pewnych operacji w języku JS. Wniosek - dużo zależy do szybkości pracy motoru przeglądarki i jakości i szybkości interpretowania JS. W tym świetle cieszy pogodzenie tendencji ewolucyjnych z rewolucyjnymi w komitecie zajmującym się pracami nad rozwojem i standaryzacją ECMAScript (JS) - ECMA International Commitee . Wygrała frakcja wersji 3 nad wersją 4, tzn. prostszy język i szybsze wykonywanie się w przeglądarce i urządzeniach mobilnych. Zaowocowało to w nowej wersji 3.1 która nosi nazwę Harmony. Duże znaczenie miała opinia twórców rusztowań Dojo, Scriptaculous i innych.
W związku z tym zachodzi nowy trend - przetwarzania aplikacji w kontenerze klienckim (np. przeglądarka) natomiast dostęp do zasobów znajdujących się w Internecie poprzez protokół HTTP i jego wyższe warstwy wykorzystujące technologię AJAX. Wszyscy liczący się gracze na rynku aplikacji web2 mają coś w zanadrzu:
- Adobe - technologię AIR (połączenie odmiany JS - ActionScript i Flasha) - super to wygląda graficzne, wykorzystuje wszystkie dostępne możliwości Windows
- Google - technologię Gears oraz nową przeglądarkę Chrome, która łączy funkcje tradycyjnej przeglądarki (oczywiście wzbogacając ją o prostotę użycia, integrację z Google Apps, wyszukiwarką, szybkością działania dzięki nowoczesnej maszynie wirtualnej JavaScript korzystającej z innowacji Apple -WebKit i Mozilli-Firefox) z uniwersalnym kontenerem umożliwiającym uruchamianie aplikacji klienckich charakteryzujących się możliwością pracy offline (synchronizacja opóżniona), zapamiętaniem stanu aplikacji u klienta (to już nie jest HTTP bezstanowy) w bazie SQL, wykorzystaniem technologii Gears oraz brakiem paska adresu internetowego. Dodatkowo ma specjalne okno tzw. Application window stwarza to iluzję korzystania jak z aplikacji desktopowej. Uwaga: Chrome używa ciągle starej wersji WebKit, która ma wiele znanych przez hackerów dziur.
- Mozilla - prace nad technologią Prism (podobnie jak Google)
- Opera/Yahoo - stosowania widgetów (wihajstrów) pracujących w środowisku maszyny wirtualnej, którą sobie trzeba ściągnąć na początku pracy (potem ewentualne aktualizacje)
- Microsoft - technologia Silverlight o jej możliwościach przekonuje NBC w przekazach z olimpiady w Pekinie. Kawał potężnej technologii zintergrowanej z platformą .NET i przenaszalnej na inne środowiska oprócz Windows dzięki technologii Mono
wtorek, września 02, 2008
The Most Common OpenSSL Commands
One of the most versatile SSL tools is OpenSSL which is an open source implementation of the SSL protocol. There are versions of OpenSSL for nearly every platform, including Windows, Linux, and Mac OS X. OpenSSL is commonly used to create the CSR and private key for many different platforms, including Apache. However, it also has hundreds of different functions that allow you to view the details of a CSR or certificate, compare an MD5 hash of the certificate and private key (to make sure they match), verify that a certificate is installed properly on any website, and convert the certificate to a different format. A compiled version of OpenSSL for Windows can be found here.
Below, we have listed the most common OpenSSL commands and their usage:
General OpenSSL Commands
These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.
- Generate a new private key and Certificate Signing Request
openssl req -out CSR.csr -pubkey -new -keyout privateKey.key
- Generate a certificate signing request (CSR) for an existing private key
openssl req -out CSR.csr -key privateKey.key -new
- Generate a certificate signing request based on an existing certificate
openssl x509 -x509toreq -in MYCRT.crt -out CSR.csr -signkey privateKey.key
- Generate a self-signed certificate
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout privateKey.key -out certificate.crt
- Remove a passphrase from a private key
openssl rsa -in privateKey.pem -out newPrivateKey.pem
Checking Using OpenSSL
If you need to check the information within a Certificate, CSR or Private Key, use these commands.
- Check a Certificate Signing Request (CSR)
openssl req -text -noout -verify -in CSR.csr
- Check a private key
openssl rsa -in privateKey.key -check
- Check a certificate
openssl x509 -in certificate.crt -text -noout
- Check a PKCS#12 file (.pfx or .p12)
openssl pkcs12 -info -in keyStore.p12
Debugging Using OpenSSL
If you are receiving an error that the private doesn't match the certificate or that a certificate that you installed to a site is not trusted, try one of these commands.
- Check an MD5 hash of the public key to ensure that it matches with what is in a CSR or private key
openssl x509 -noout -modulus -in certificate.crt | openssl md5
openssl rsa -noout -modulus -in privateKey.key | openssl md5
openssl req -noout -modulus -in CSR.csr | openssl md5 - Check an SSL connection. All the certificates (including Intermediates) should be displayed
openssl s_client -connect https://www.paypal.com:443
Converting Using OpenSSL
These commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software. For example, you can convert a normal PEM file that would work with Apache to a PFX (PKCS#12) file and use it with Tomcat or IIS.
- Convert a DER file (.crt .cer .der) to PEM
openssl x509 -inform der -in certificate.cer -out certificate.pem
- Convert a PEM file to DER
openssl x509 -outform der -in certificate.pem -out certificate.der
- Convert a PKCS#12 file (.pfx .p12) containing a private key and certificates to PEM
openssl pkcs12 -in keyStore.pfx -out keyStore.pem -nodes
You can add -nocerts to only output the private key or add -nokeys to only output the certificates.
- Convert a PEM certificate file and a private key to PKCS#12 (.pfx .p12)
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.txt -in certificate.crt -certfile CACert.crt