asn.1

How to decode non-key ASN1 data?

放肆的年华 提交于 2019-12-10 22:46:02
问题 Is it possible to use crypto++ library to decode arbitrary ASN1 data (which has couple of sequences and integers) which I have in a byte array. ash.h contains methods which all take BufferedTransformation as input, but that class is interface for different ciphers and hashes, which really seems to be not related to my simple case at all. I also found ASN1Object in cryptlib.h but it's another interface and I haven't managed to find any implementing classes. Have I thought it way too complex

Confused about BER (Basic Encoding Rules)

拈花ヽ惹草 提交于 2019-12-10 21:27:59
问题 I'm trying to study and understand BER (Basic Encoding Rules). I've been using the website http://asn1-playground.oss.com/ to experiment with different ASN.1 objects and encoding them using BER. However, even the simplest encodings seem to confuse me. Let's take a simple ASN.1 schema: World-Schema DEFINITIONS AUTOMATIC TAGS ::= BEGIN Human ::= SEQUENCE { name UTF8String } END So basically this is just a SEQUENCE with a single UTF8String type field called name . An example of a value that

Distinguished Name length constraint in X.509 certificate

橙三吉。 提交于 2019-12-10 18:45:49
问题 In the common name field of the DN of a X509 certificate, as defined in ASN.1 notation for OID "2.5.4.3", the limit is up to 64 characters. Is there any turnaround if we want to have a common name of more than 64 characters? 回答1: Even if you could cajole your certificate generation code to have a longer CN, it's also the clients that will need to change, of which most you have no control over. Clients could well reject a certificate with a too-long CN and then you'll have no certificate at

Creating ASN1 encoded signature in C# to send to Java

泄露秘密 提交于 2019-12-10 10:25:19
问题 I have a private/public secure cert. My Java counterparts have the public key. I have the need to take a string, sign it, and send it along to Java to then verify the data and signature. There appears to be a well known issue with how Microsoft and the rest of the world encodes/signs data, something about the way bytes are handled. It's so well known, that I can't find a solution. If they take my string and the private key, they can obviously sign it correctly, and verify it. If I take my

SNMP MIB SMIv2 Conformance Group Issue

女生的网名这么多〃 提交于 2019-12-10 02:13:47
问题 I have a MIB that I started working on but smilint complains about a missing conformance group. How do I add this conformance group to my file? BLEH-PRODUCT-MIB DEFINITIONS ::= BEGIN -- Objects in this MIB are implemented in the local SNMP agent. IMPORTS MODULE-IDENTITY, OBJECT-TYPE, Integer32, enterprises FROM SNMPv2-SMI; blehProductMIB MODULE-IDENTITY LAST-UPDATED "201305290000Z" ORGANIZATION "Bleh Corporation" CONTACT-INFO " Joe Shmoe Postal: Bleh Corporation 23 Telnet Road Ottawa, ON, K1K

OpenSSL ASN.1 programming tutorial

雨燕双飞 提交于 2019-12-08 15:56:14
问题 I'm looking for any C/C++ tutorial, sample code or documentation about using OpenSSL library for ASN.1 DER encoding. 回答1: Well, as you can see on openssl website there is no official documentation for ASN.1 functions. But you can always download openssl sources. After unpack you can see in doc/crypto directory documentation for ASN.1. # ~/tmp/openssl-1.0.1c/doc/crypto> ls -1 | grep -i asn ASN1_generate_nconf.pod ASN1_OBJECT_new.pod ASN1_STRING_length.pod ASN1_STRING_new.pod ASN1_STRING_print

Do any PHP libraries exist for parsing ASN.1 or generating PHP code based on it?

雨燕双飞 提交于 2019-12-08 15:45:06
问题 I've already looked myself but it seems my Google-fu is not strong today. I'm working to develop a standardized protocol for exchanging data structures over a TCP/IP connection between an Apache / PHP server and embedded C code on a microcontroller. We are using ASN.1 notation, and what I would really like to do is to have a piece of PHP code that can parse the ASN.1 document and use it to interpret incoming data. It would produce a PHP object (or array) that is structured appropriately based

Is there an alternative of SignedCMS in WinRT?

≯℡__Kan透↙ 提交于 2019-12-08 08:28:28
问题 And again I ran into trouble while porting a .NET Desktop App to a Windows Store App... Long story short, I have a ZIP File with an encrypted and signed XML File and a certificate in it. The decryption is working (more or less) but now I have to "unsign" the XML and I'm stuck. In the .NET App the unsigning is done with System.Security.Cryptography.Pkcs.SignedCms but that class does not exist in WinRt (as always...) Is there any alternative in WinRT? here is some of the code used in the .NET

X.509v3 ASN.1 to C datastructs

杀马特。学长 韩版系。学妹 提交于 2019-12-07 12:59:51
问题 I'm trying to create a X509 Request for a Proxy Certificate (ProxyCertInfo Extension RFC3820) in C (OpenSSL), but I cannot figure out how the datastructures of the ProxyCertInfo should be defined. The RFC defines the ASN.1 language as follows: PKIXproxy88 { iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) proxy-cert-extns(25) } DEFINITIONS EXPLICIT TAGS ::= BEGIN -- EXPORTS ALL -- -- IMPORTS NONE -- -- PKIX specific OIDs id-pkix OBJECT

ASN.1 AUTOMATIC TAGS and EXTENSIBILITY IMPLIED Attributes

旧城冷巷雨未停 提交于 2019-12-06 13:16:50
问题 I have been presented with an ASN.1 document that includes two encoding/decoding attributes; AUTOMATIC TAGS My understanding; the tags are defined automatically using the encoding rules unless a tag notation is present in the definition EXTENSIBILITY IMPLIED My understanding; types may have elements that are not defined within the ASN.1 document. If found, the encoder should silently ignore. Additionally, my decoder should also be ready to handle values with unspecified tags. Q1: Are my