|
|
|
@ -39,13 +39,19 @@ import org.bouncycastle.cms.CMSException;
|
|
|
|
|
import org.bouncycastle.cms.CMSSignedData;
|
|
|
|
|
import org.bouncycastle.cms.CMSSignedDataGenerator;
|
|
|
|
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
|
|
|
|
import org.bouncycastle.openssl.PEMWriter;
|
|
|
|
|
import org.bouncycastle.operator.ContentSigner;
|
|
|
|
|
import org.bouncycastle.operator.OperatorCreationException;
|
|
|
|
|
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
|
|
|
|
|
import org.bouncycastle.pkcs.PKCS10CertificationRequest;
|
|
|
|
|
import org.bouncycastle.util.Store;
|
|
|
|
|
import org.jscep.message.*;
|
|
|
|
|
import org.jscep.message.PkcsPkiEnvelopeDecoder;
|
|
|
|
|
import org.jscep.message.PkiMessageDecoder;
|
|
|
|
|
import org.jscep.message.PkiMessage;
|
|
|
|
|
import org.jscep.message.CertRep;
|
|
|
|
|
import org.jscep.message.PkcsPkiEnvelopeEncoder;
|
|
|
|
|
import org.jscep.message.PkiMessageEncoder;
|
|
|
|
|
import org.jscep.message.MessageEncodingException;
|
|
|
|
|
import org.jscep.message.MessageDecodingException;
|
|
|
|
|
import org.jscep.transaction.FailInfo;
|
|
|
|
|
import org.jscep.transaction.Nonce;
|
|
|
|
|
import org.jscep.transaction.TransactionId;
|
|
|
|
@ -65,7 +71,6 @@ import org.wso2.carbon.device.mgt.common.TransactionManagementException;
|
|
|
|
|
import javax.security.auth.x500.X500Principal;
|
|
|
|
|
import javax.xml.bind.DatatypeConverter;
|
|
|
|
|
import java.io.*;
|
|
|
|
|
import java.math.BigInteger;
|
|
|
|
|
import java.security.*;
|
|
|
|
|
import java.security.cert.Certificate;
|
|
|
|
|
import java.security.cert.*;
|
|
|
|
@ -629,7 +634,6 @@ public class CertificateGenerator {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String extractChallengeToken(X509Certificate certificate) {
|
|
|
|
|
|
|
|
|
|
byte[] challengePassword = certificate.getExtensionValue(
|
|
|
|
|