//서버 인증서 생성
openssl genrsa -des3 -out server.cakey.pem
openssl req -new -x509 -key server.cakey.pem -out root.crt
openssl genrsa -out server.key
openssl req -new -key server.key -out server.csr
//서명
openssl x509 -req -in server.csr -days 365 -sha1 -CAcreateserial -CA root.crt -CAkey server.cakey.pem -out server.crt
//클라이언트 인증서
openssl genrsa -out client.key
openssl req -new -key client.key -out client.csr
//서명
openssl x509 -req -in client.csr -days 365 -sha1 -CAcreateserial -CA root.crt -CAkey server.cakey.pem -out client.crt
폴더 리스트 가져오기 String path="C:\"; File dirFile=new File(path); File []fileList=dirFile.listFiles(); for(File tempFile : fileList) { if(tempFile.isFile()) { String tempPath=tempFile.getParent(); String tempFileName=tempFile.getName(); System.out.println("Path="+tempPath); System.out.println("FileName="+tempFileName); /*** Do something withd tempPath and temp FileName ^^; ***/ } } 정렬해서 가져오기 import java.io.FileFilter; import java.io.IOException; import java.util.Arrays; import java.util.Date; import org.apache.commons.io.comparator.LastModifiedFileComparator; import org.apache.commons.io.filefilter.FileFileFilter; public class LastModifiedFileComparatorTest { public static void main(String[] args) throws IOException { File directory = new File("."); // get just files, not directories File[] files = directory.listFiles((FileFilter) FileFileFilter.FILE); System.out.println("Defaul...
댓글
댓글 쓰기