Mysql
 sql >> डेटाबेस >  >> RDS >> Mysql

JDBC का उपयोग करके X509 के साथ MySQL से कैसे कनेक्ट करें?

फटा, यहाँ सूचीबद्ध, मेरी टिप्पणी में पृष्ठ के नीचे:http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-using-ssl.html

ऐसा करने में एक सप्ताह का सचमुच खर्च करने के बाद मैं अंत में एक क्लाइंट सर्टिफिकेट (उपयोगकर्ता परिभाषा पर X509 की आवश्यकता है) का उपयोग करके कनेक्ट करने में कामयाब रहा है!!!!

rem NOTE: these commands are run using the Java 6 (1.6) JDK as it requires the "-importkeystore" command
rem which is not available before this JDK version.

rem Import the self signed Certifacte Authority certificate into a keystore.
keytool -import -alias mysqlCACert -file ca-cert.pem -keystore truststore -storepass truststore
rem Shows only the signed certificate.
keytool -v -list -keystore truststore -storepass truststore

rem Create a PKCS12 file from an existing signed client certifcate and its private key.
rem set password to "keystore".
openssl pkcs12 -export -in client-cert.pem -inkey client-key.pem -out client.p12 -name clientalias -CAfile ca-cert.pem -caname root
rem Import the combined certificate and private key into the keystore.
keytool -importkeystore -deststorepass keystore -destkeystore keystore -srckeystore client.p12 -srcstoretype PKCS12 -srcstorepass keystore -alias clientalias

फिर अपने जावा एप्लिकेशन में जेवीएम स्टार्ट-अप पैरामीटर तर्कों (-D=,...), या System.setProperty(var,val),...

यह वास्तव में काम करता है!!!




  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. इसके कॉलम के आधार पर क्वेरी कैसे लिखें

  2. क्या होगा यदि 2 या अधिक लोग एक ही समय में एक ही MySQL तालिका को अपडेट करने का प्रयास करते हैं?

  3. चेतावनी:mysql_result() पैरामीटर 1 को संसाधन, बूलियन दिए जाने की अपेक्षा करता है

  4. MySql स्पेनिश कैरेक्टर डेटा

  5. mysql_insert_id () का उपयोग किए बिना अंतिम सम्मिलित रिकॉर्ड की आईडी प्राप्त करें