Differences From Artifact [0fcacfecab]:
- File
asn1-x509.c
— part of check-in
[a3d727289c]
at
2010-05-12 14:52:58
on branch trunk
— Added test driver (from libssh-agent-pkcs11-provider)
Added basic ASN.1 X.509 BER decoder (from libssh-agent-pkcs11-provider)
Work towards updating CACKey to talk to CAC using PC/SC (user: rkeene, size: 3695) [annotate] [blame] [check-ins using]
To Artifact [330bebdc8e]:
- File
asn1-x509.c
— part of check-in
[9b6cdd281c]
at
2010-05-13 15:58:32
on branch trunk
— Updated to use certificate from identity in attribute finding
Updated to correctly pass certificate number (user: rkeene, size: 3752) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
141 142 143 144 145 146 147 | int read_ret; read_ret = asn1_x509_read_object(x509_der_buf, x509_der_buf_len, &x509); if (read_ret != 0) { return(-1); } | > | > > | > > | > | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | int read_ret; read_ret = asn1_x509_read_object(x509_der_buf, x509_der_buf_len, &x509); if (read_ret != 0) { return(-1); } if (outbuf) { *outbuf = x509.issuer.asn1rep; } return(x509.issuer.asn1rep_len); } ssize_t x509_to_subject(void *x509_der_buf, size_t x509_der_buf_len, void **outbuf) { struct x509_object x509; int read_ret; read_ret = asn1_x509_read_object(x509_der_buf, x509_der_buf_len, &x509); if (read_ret != 0) { return(-1); } if (outbuf) { *outbuf = x509.subject.asn1rep; } return(x509.subject.asn1rep_len); } ssize_t x509_to_serial(void *x509_der_buf, size_t x509_der_buf_len, void **outbuf) { struct x509_object x509; int read_ret; read_ret = asn1_x509_read_object(x509_der_buf, x509_der_buf_len, &x509); if (read_ret != 0) { return(-1); } if (outbuf) { *outbuf = x509.serial_number.asn1rep; } return(x509.serial_number.asn1rep_len); } |