This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package kz.gov.pki.provider.utils; | |
| import java.security.InvalidAlgorithmParameterException; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.NoSuchProviderException; | |
| import java.security.cert.CertPathBuilder; | |
| import java.security.cert.CertPathBuilderException; | |
| import java.security.cert.CertPathBuilderResult; | |
| import java.security.cert.CertStore; | |
| import java.security.cert.CollectionCertStoreParameters; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package kz.gov.pki.kalkan.pkix.checker; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.OutputStream; | |
| import java.math.BigInteger; | |
| import java.net.HttpURLConnection; | |
| import java.net.URL; | |
| import java.net.URLEncoder; | |
| import java.security.cert.CertPathBuilder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package kz.exploit.hape | |
| import java.net.URL | |
| import java.io.File | |
| import java.io.BufferedWriter | |
| import java.io.OutputStreamWriter | |
| import java.net.HttpURLConnection | |
| fun main(args: Array<String>) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package kz.sample.test; | |
| import kz.gov.pki.kalkan.asn1.pkcs.PKCSObjectIdentifiers; | |
| import kz.gov.pki.kalkan.jce.provider.KalkanProvider; | |
| import kz.gov.pki.kalkan.xmldsig.KncaXS; | |
| import org.apache.ws.security.WSConstants; | |
| import org.apache.ws.security.message.WSSecHeader; | |
| import org.apache.ws.security.message.token.SecurityTokenReference; | |
| import org.apache.xml.security.c14n.Canonicalizer; | |
| import org.apache.xml.security.encryption.XMLCipherParameters; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package kz.gov.pki.live; | |
| import java.io.StringWriter; | |
| import java.security.KeyPair; | |
| import java.security.KeyPairGenerator; | |
| import java.security.PrivateKey; | |
| import java.security.PublicKey; | |
| import java.security.Security; | |
| import java.security.spec.ECGenParameterSpec; | |
| import kz.gov.pki.kalkan.asn1.ASN1Set; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package kz.gov.pki.provider.utils; | |
| import java.io.FileInputStream; | |
| import java.io.IOException; | |
| import java.security.InvalidAlgorithmParameterException; | |
| import java.security.KeyStore; | |
| import java.security.KeyStoreException; | |
| import java.security.MessageDigest; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.NoSuchProviderException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Keybase proof | |
| I hereby claim: | |
| * I am as1an on github. | |
| * I am as1an (https://keybase.io/as1an) on keybase. | |
| * I have a public key ASC_DEO1yJeSOBwWI7qFhrhL6DVgBPGioPbnVwQyvMEVAwo | |
| To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Providers { | |
| public static void main(String[] args) { | |
| java.util.Arrays.asList(java.security.Security.getProviders()).stream().forEach(System.out::println); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BIO *in = NULL, *out = NULL; | |
| CMS_ContentInfo *cms = NULL; | |
| CMS_SignerInfo *si = NULL; | |
| unsigned char *cms_pem = NULL; | |
| int cms_flags = CMS_NOSMIMECAP | CMS_BINARY | CMS_PARTIAL | CMS_STREAM; | |
| int cms_pem_len = 0; | |
| NSString *nsstring = @"c2FtcGxl"; | |
| const unsigned char *cstring = (const unsigned char *) [nsstring UTF8String]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BIO *not_before_bio = BIO_new(BIO_s_mem()); | |
| ASN1_TIME_print(not_before_bio, X509_get_notBefore(cert)); // format MMM DD HH:MM:SS YYYY [GMT] | |
| // ASN1_STRING_print_ex(not_before_bio, X509_get_notAfter(cert), ASN1_STRFLGS_UTF8_CONVERT); // UTC format YYMMDDHHMMSSZ | |
| int not_before_len = BIO_number_written(not_before_bio); | |
| unsigned char *not_before = (unsigned char *)calloc(not_before_len, sizeof(unsigned char)); | |
| BIO_read(not_before_bio, not_before, not_before_len); | |
| NSLog(@"not before: %s", not_before); | |
| BIO_free(not_before_bio); |
OlderNewer