Posted from teched INSTRUCTOR: Niu Ke
Basic concepts:
Service master key at the first layer
Backup Service master keyBackup service master key to file = 'C:/smk. Bak'Encryption by password = 'P @ ssw0rd'Restore service master key from file = 'C:/smk. Bak'Decryption by password = 'P @ ssw0rd'Layer 2 database master key1) You must create a database master key on the database before using it.Create master key encryption by password = 'P @ ssw0rd'2) use the database master key-If the database master
= (x509certinfo) cimp2.get (x509certimpl. Name
+ "." + X509certimpl. info );
} Catch (exception e ){
System. Out. println (E. getmessage ());
}
Return certinfo;
}
// Modify the validity period
Private void updatevalidity (x509certinfo Cinfo, int days ){
// Obtain the current time
Date d1 = new date ();
// The validity period is extended by N days after the current date
Date D2 = new date (d1.gettime () + days * 24*60*60 * 1000l );
// Create a validity period object
Certificatevalidity CV = ne
1. Generate a key and save it as a certificate file
Keytool-genkey-alias bogus-keysize 512-validity 3650-keyalg RSA-dname "cn = bogus.com, ou = xxx ca, O = bogus Inc, L = Stockholm, S = Stockholm, C = Se "-keypass boguspw-storepass boguspw-keystore Sean. CERT
2. Generate a keyD: \> keytool-genkey-alias Wenger-keysize 1024-keypass abcdef-keystore mykeysTore-storepass abcdef-dname "cn = Chen Sr, ou = tanglab, O = lab, L = GZ, St = Gd, c = cn"
3. Expo
During development, we often use the built-in JDK keytool to create a self-issued certificate and save it to the keystore file. If you want to import a keystore to another keystore (such as installing it on another machine without overwriting files), what should you do?
For example, we import the content with the alias Tomcat from AAA. jks to BBB. jks. The illusion is that the certificate is first exported from AAA. jks and then imported to BBB. jks.
To illustrate the error, we start from sc
In the past two days, the company needs to use digital certificates to retrieve and paste the code N years ago.
Package COM. jinhill. util; import Java. io. *; import Java. security. *; import Java. security. cert. certificateexception; import Java. security. cert. certificatefactory; import Java. security. cert. x509certificate; import Java. util. properties; p
authentication stored in the file
In this way, a self-signed certificate mycert. CRT is obtained. Note that the RFC protocol outputs the certificate in the format defined in rfc1421 and encoded in base64.
Read Certificate
Java provides a wide range of APIS for secure applications. JSSE (javatm Secure Socket Extension) of j2sdk1.4 includes the javax. Security. Certificate package and provides operation methods for certificates. Only java. Security.
project, we are very happy to find the source code of signapk. jar! Path:/build/tools/signapk/SignApk. java.
Comparing an unsigned APK and a signed APK, we will find that there is a folder named META-INF in the signed APK package. There are three files named MANIFEST. MF, CERT. SF, and CERT. RSA. Signapk. jar generates these files (other files have not changed. So we can easily remove the original signatur
APK File Analysis-AndroidAfter Android is packaged, an APK file is generated.The APK file is actually a zip file.For example, if you change the suffix of filecycler.apk to zip, it becomes filecycler.zip.The ultimate file also has an Excel file, such as fansunion.xlsx, which is suffixed with fansunion.zip. After decompression:_ RelsDocPropsXl[Content_Types]. xmlIf you are interested, try it by yourself ~After decompression:META-INF-- CERT. RSA--
Configuration method:
1. A Running System in the kernel (centos 6.5)
2. Install squid on the server
3. Generate a certificate on the server and use an encrypted proxy.
4. Install Stunnel in the wall. It can be a Windows system or a Linux system (this case is Linux)
1. Server Configuration
1. Install squid
#yuminstall-ysquid
2. Generate a certificate
#opensslreq-new>charlie.csr#opensslrsa-inprivkey.pem-outcharlie.key#opensslx509-incharlie.csr-outcharlie.crt-req-signkeycharlie.key-days365#mkdir/
{54 //55 // todo: add the constructor logic here56 //57}58}59}60
Then write a read method in the CERT class to read the certificate. Note: The pfx file may contain several certificates.
1 using system;2 using system. IO;3 using system. runtime. interopservices;4 using system. Security. cryptography. x509certificates;56 namespace x509cert7 {8/** // 9 // a summary of cert.10 /// 11 public class cert12 {1
Tomcat supports the JKS format certificate, and the PFX format certificate is supported starting from TOMCAT7, with either of the two certificate formats selected. File Description: 1. Certificate file 21397867314xxxx.pem, which contains two pieces of content, do not delete any part of the content. 2. If the CSR is created by the certificate system, it also contains: Certificate private key File 21397867314xxxx.key, PFX format certificate file 21397867314xxxx.pfx, PFX format certificate password
? apprtc git: (RESTAPI)? OpenSSL req-x509-newkey rsa:2048-keyout key.pem-out cert.pem-days 99999-nodesgenerating a 2048 bit RSA private key: ..... +++....................................................+++writing new private key to ' KEY.PEM '-----You is about to is asked to enter information that'll be incorporatedinto your certificate request. What's about-to-enter is called a distinguished Name or a DN. There is quite a few fields but can leave some blankfor some fields there would be a defau
issues.
first, the establishment of Windows users
Set up a separate Windows user account cert for each site, delete the user group for the account, and add cert to the Guest user group. The user cannot change the password, the password never expires two options selected.
Second, set folder permissions
1, set the non-site-related directory permissions
When Windows is installed, many directories and file
enabled by default.-S,--silent is more silent. Print results with a tab as separator,Each row on the new line.--shared-memory-base-name=nameBase name of shared memory.-S,--socket=name socket file to use for connection.--SSL Enable SSL for connection (automatically enabled withOther flags). Disable with--skip-ssl.--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies--SSL).--ssl-capath=name CA directory (check OpenSSL docs, implies--ssl).--ssl-cert
format certificate library cannot be imported directly, we must first export the client certificate as a separate CER file, using the following command:keytool-export-alias tianli-keystore d:/downloads/p12/tianli.p12-storetype pkcs12-storepass tianli-rfc-file D: /downloads/cert/tianli.cerwith the above command, the client certificate is exported to the "D:/downloads/cert/tianli.cer r" file. The next step i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.