Development

How to add new object id in openssl library.

JayKim🙂 2017. 7. 17. 10:02

If you want to add new object id in openssl library.
before compiling, you have to add information in object.txt file.
The file is in crypto/objects folder.
you can add like this.

# FIDO OID ( jykim add )
1 3 6 1 4 1 45724 1 1 4 : aaguid : idFidoGenCeAaguid  
2 23 133 8 3 : aikCertificate : AIKCertificate

and then you have to run below commands.

#perl objects.pl objects.txt obj_mac.num > obj_mac.h

it displayed, Added OID DeviceUID

#perl obj_dat.pl obj_mac.h > obj_dat.h

and then copy the obj_mac.h to include/openssl

# copy obj_mac.h ../../include/openssl/obj_mac.h
OpenSSL 3 경우

objects.txt 파일에 값을 작성 후 아래 명령 실행

# perl objects.pl objects.txt obj_mac.num > obj_mac.h  
# perl obj_dat.pl obj_mac.h > obj_dat.h  
# copy obj_mac.h ../../include/openssl/obj_mac.h

obj_mac.h 파일을 include/openssl 폴더에 복사 해주면 된다.
기존 파일이 있으니 덮어 쒸우면 된다.

실제 objects.txt 입력 값

# SCEP OID ( jykim add )

2 16 840 1 113733 1 9 2 : messageType : messageType  
2 16 840 1 113733 1 9 3 : pkiStatus : pkiStatus  
2 16 840 1 113733 1 9 4 : failInfo : failInfo  
2 16 840 1 113733 1 9 5 : senderNonce : senderNonce  
2 16 840 1 113733 1 9 6 : recipientNonce : recipientNonce  
2 16 840 1 113733 1 9 7 : transId : transId  
2 16 840 1 113733 1 9 8 : extensionReq : extensionReq